Analysis/_bmad-output/implementation-artifacts/1-1-initialisation-du-monorepo-docker.md
2026-01-11 22:56:02 +01:00

2.2 KiB

Story 1.1: Initialisation du Monorepo & Docker

Status: review

Story

As a Développeur, I want to initialiser la structure du projet (Next.js + FastAPI + Docker), so that I have a functional and consistent development environment.

Acceptance Criteria

  1. Root Structure: Root directory contains compose.yaml (2026 standard) and subdirectories frontend/ and backend/.
  2. Backend Setup: backend/ initialized with FastAPI (Python 3.12) using uv package manager.
  3. Frontend Setup: frontend/ initialized with Next.js 16 (standalone mode).
  4. Orchestration: docker-compose up builds and starts both services on a shared internal network.
  5. Connectivity: Frontend is accessible at localhost:3000 and Backend at localhost:8000.

Tasks / Subtasks

  • Root Initialization (AC: 1)
    • Initialize git repository.
    • Create .gitignore for monorepo.
  • Backend Service Setup (AC: 2)
    • Initialize FastAPI project structure.
    • Add main.py with health check.
    • Initialize uv project (pyproject.toml, uv.lock) and add dependencies.
    • Create multi-stage Dockerfile using uv for fast builds.
  • Frontend Service Setup (AC: 3)
    • Initialize Next.js 16 project.
    • Configure standalone output.
    • Create multi-stage Dockerfile.
  • Docker Orchestration (AC: 4, 5)
    • Create compose.yaml.
    • Verify inter-service communication configuration.

Dev Notes

  • Architecture Patterns: Two-Service Monorepo pattern.
  • Tooling: Updated to use uv (Astral) instead of pip/venv for Python management (2026 Standard).
  • Naming Conventions: snake_case for Python files/API; PascalCase for React components.

References

  • [Source: architecture.md#Project Structure & Boundaries]
  • [Source: project-context.md#Technology Stack & Versions]

Dev Agent Record

Completion Notes List

  • Migrated backend package management to uv.
  • Updated Dockerfile to use ghcr.io/astral-sh/uv for building.
  • Initialized pyproject.toml and uv.lock.

File List

  • /compose.yaml
  • /backend/Dockerfile
  • /backend/main.py
  • /backend/pyproject.toml
  • /backend/uv.lock
  • /frontend/Dockerfile
  • /frontend/next.config.mjs
  • /frontend/package.json