Rescope T-2 to Docker-only, defer DB wiring to T-4

T-2 was "Dockerfile + configuration" but database connectivity
cannot be meaningfully verified without JPA and migrations (T-4).
Split: T-2 focuses on the multi-stage Dockerfile, T-4 absorbs
DATABASE_URL config, env vars, and docker-compose documentation.

Updated dependency graph and Mermaid diagram accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 18:35:36 +01:00
parent 958222d0c0
commit 96ef8656bd
2 changed files with 23 additions and 15 deletions

View File

@@ -9,10 +9,10 @@ All setup tasks must complete before any user story work begins. T-3 can run in
| Order | Task | Depends on | Notes | | Order | Task | Depends on | Notes |
|-------|------|------------|-------| |-------|------|------------|-------|
| 1 | T-1: Initialize monorepo structure | — | Scaffolds empty backend + frontend projects | | 1 | T-1: Initialize monorepo structure | — | Scaffolds empty backend + frontend projects |
| 2 | T-2: Deployment setup (Dockerfile + config) | T-1 | Docker build, DB connection, health check | | 2 | T-5: API-first tooling setup | T-1 | OpenAPI spec, codegen plugins, generated types |
| 2* | T-5: API-first tooling setup | T-1 | OpenAPI spec, codegen plugins, generated types — parallelizable with T-2 | | 3 | T-2: Docker deployment setup | T-1, T-5 | Multi-stage Dockerfile — builds backend + frontend into one container |
| 3 | T-4: Development infrastructure | T-2, T-5 | Migrations, router, test infra — gates all user stories | | 4 | T-4: Development infrastructure | T-2, T-5 | Migrations, DB wiring, router, test infra, docker-compose docs — gates all user stories |
| 3* | T-3: CI/CD pipeline | T-1, T-2 | Parallelizable with T-4. Uses Gitea Actions (per Q-5 resolution) | | 4* | T-3: CI/CD pipeline | T-1, T-2 | Parallelizable with T-4. Uses Gitea Actions (per Q-5 resolution) |
## Phase 1: Core Event Flow (Vertical Slice) ## Phase 1: Core Event Flow (Vertical Slice)
@@ -110,9 +110,10 @@ graph TD
classDef shell fill:#7f8c8d,stroke:#566566,color:#fff classDef shell fill:#7f8c8d,stroke:#566566,color:#fff
%% Phase 0: Infrastructure %% Phase 0: Infrastructure
T1(["T-1: Monorepo"]):::infra --> T2(["T-2: Docker & DB"]):::infra T1(["T-1: Monorepo"]):::infra --> T5(["T-5: API-First Tooling"]):::infra
T1 --> T5(["T-5: API-First Tooling"]):::infra T1 --> T2(["T-2: Docker"]):::infra
T2 --> T4(["T-4: Dev Infra"]):::infra T5 --> T2
T2 --> T4(["T-4: Dev Infra + DB"]):::infra
T5 --> T4 T5 --> T4
T2 --> T3(["T-3: CI/CD"]):::infra T2 --> T3(["T-3: CI/CD"]):::infra

View File

@@ -21,19 +21,20 @@
--- ---
### T-2: Deployment setup (Dockerfile + configuration) ### T-2: Docker deployment setup
**Description:** Create the Docker-based deployment infrastructure so the app can be built and run as a single container connecting to an external PostgreSQL database. **Description:** Create a multi-stage Dockerfile that builds backend and frontend and produces a single runnable container. This task focuses exclusively on the Docker build — database wiring, environment variable configuration, and docker-compose documentation are deferred to T-4 (where JPA and migration tooling are introduced).
**Acceptance Criteria:** **Acceptance Criteria:**
- [ ] Single multi-stage Dockerfile at repo root that builds backend and frontend and produces one container - [ ] Single multi-stage Dockerfile at repo root that builds backend and frontend and produces one container
- [ ] App connects to external PostgreSQL via environment variable (e.g. `DATABASE_URL`) - [ ] `.dockerignore` excludes build artifacts, IDE files, and unnecessary files from the build context
- [ ] All runtime configuration via environment variables: database connection, optional Unsplash API key, optional max active events
- [x] Health-check endpoint so Docker/orchestrators can verify the app is alive - [x] Health-check endpoint so Docker/orchestrators can verify the app is alive
- [ ] README documents setup with a docker-compose example (app + postgres) - [ ] `docker build .` succeeds and produces a working image
- [ ] Container starts and responds to health checks with an empty database (migrations run on startup or are documented) - [ ] Container starts and the health-check endpoint responds
**Dependencies:** T-1 **Dependencies:** T-1, T-5
**Addendum (2026-03-04):** Scope reduced from original "Dockerfile + configuration" to Docker-only. Database connectivity (`DATABASE_URL`), runtime environment variable configuration (Unsplash API key, max active events), and README docker-compose documentation are deferred to T-4, where JPA and Flyway are introduced and the configuration can be tested end-to-end. Rationale: without JPA and migrations, database wiring cannot be meaningfully verified.
--- ---
@@ -77,15 +78,21 @@
### T-4: Development infrastructure setup ### T-4: Development infrastructure setup
**Description:** Set up the development foundation needed before the first user story can be implemented with TDD (as required by CLAUDE.md). This bridges the gap between project scaffolds and actual feature development. **Description:** Set up the development foundation needed before the first user story can be implemented with TDD (as required by CLAUDE.md). This bridges the gap between project scaffolds and actual feature development. Also includes the database and environment variable configuration deferred from T-2.
**Acceptance Criteria:** **Acceptance Criteria:**
- [ ] Database migration framework (Flyway or Liquibase) is configured in the backend with a first empty migration that runs successfully against a PostgreSQL instance - [ ] Database migration framework (Flyway or Liquibase) is configured in the backend with a first empty migration that runs successfully against a PostgreSQL instance
- [ ] App connects to external PostgreSQL via environment variable (e.g. `DATABASE_URL` or Spring-native `SPRING_DATASOURCE_*`)
- [ ] All runtime configuration via environment variables: database connection, optional Unsplash API key, optional max active events
- [ ] SPA router is configured in the Vue frontend (Vue Router) so pages can be navigated by URL path - [ ] SPA router is configured in the Vue frontend (Vue Router) so pages can be navigated by URL path
- [ ] Backend test infrastructure is set up: JUnit 5 with Spring Boot Test, plus integration test support using Testcontainers (PostgreSQL) so tests can run against a real database without external setup - [ ] Backend test infrastructure is set up: JUnit 5 with Spring Boot Test, plus integration test support using Testcontainers (PostgreSQL) so tests can run against a real database without external setup
- [ ] Frontend test infrastructure is set up: Vitest with @vue/test-utils configured and a sample test runs successfully - [ ] Frontend test infrastructure is set up: Vitest with @vue/test-utils configured and a sample test runs successfully
- [ ] Both test suites (backend and frontend) can be executed via their respective build tools (`mvn test` and `npm test` / `npx vitest`) - [ ] Both test suites (backend and frontend) can be executed via their respective build tools (`mvn test` and `npm test` / `npx vitest`)
- [ ] README documents deployment setup with a docker-compose example (app + postgres)
- [ ] Container starts and responds to health checks with a running PostgreSQL (migrations run on startup)
**Dependencies:** T-2, T-5 **Dependencies:** T-2, T-5
**Notes:** T-4 is the prerequisite for all user story implementation. Without migration tooling, router, and test infrastructure, TDD (the mandated methodology per CLAUDE.md) cannot begin. The API client layer is provided by T-5 (openapi-fetch + generated types). All user stories that previously depended on T-1 and/or T-2 now depend on T-4 instead, since T-4 transitively includes T-1, T-2, and T-5. **Notes:** T-4 is the prerequisite for all user story implementation. Without migration tooling, router, and test infrastructure, TDD (the mandated methodology per CLAUDE.md) cannot begin. The API client layer is provided by T-5 (openapi-fetch + generated types). All user stories that previously depended on T-1 and/or T-2 now depend on T-4 instead, since T-4 transitively includes T-1, T-2, and T-5.
**Addendum (2026-03-04):** Absorbed database connectivity, environment variable configuration, and docker-compose documentation from T-2 (see T-2 addendum). These criteria require JPA and Flyway to be testable, so they belong here.