# 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

- [x] **Root Initialization** (AC: 1)
  - [x] Initialize git repository.
  - [x] Create `.gitignore` for monorepo.
- [x] **Backend Service Setup** (AC: 2)
  - [x] Initialize FastAPI project structure.
  - [x] Add `main.py` with health check.
  - [x] Initialize **uv** project (`pyproject.toml`, `uv.lock`) and add dependencies.
  - [x] Create multi-stage `Dockerfile` using `uv` for fast builds.
- [x] **Frontend Service Setup** (AC: 3)
  - [x] Initialize Next.js 16 project.
  - [x] Configure standalone output.
  - [x] Create multi-stage `Dockerfile`.
- [x] **Docker Orchestration** (AC: 4, 5)
  - [x] Create `compose.yaml`.
  - [x] 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