Skip to main content

WP-00 Shared HTTP and persistence scaffold

Load AGENTS.md, contracts.md, and api-map.md first. Tech specs: api/common.md, app/common.md, exchange/common.md. Implement only when the user asks.

Group G0. No other feature package starts before this lands.

Owns​

  • afia-api/src/main/java/health/afia/app/common/EndpointUri.java
  • afia-api/src/main/java/health/afia/app/common/ApiEnvelope.java
  • afia-api/src/main/resources/db/
  • afia-api/src/main/resources/application.properties
  • afia-app/lib/core/const/api_config.dart
  • ai-agent/docs/api-map.md

Features F-18 and F-19 are already live. Keep those two paths working.

Must not write​

  • Any health.afia.app.identity, patient, clinician, diagnostics, or admin package
  • Flutter presentation/ feature folders
  • Stitch exports or invented screens

Depends on​

Nothing. This is the first implementation package.

Done when​

  1. EndpointUri has constants for every row in manifest/api-prefixes.tsv.
  2. ApiConfig copies those paths. It does not invent new ones.
  3. docs/api-map.md lists each reserved path and its owner work package.
  4. Persistence rule from ADR 0003 is in application.properties when the first write lands. Use Postgres and Liquibase. Set ddl-auto=none.
  5. GET /api/v1/afia/health and GET /api/v1/afia/app-version still pass their existing tests.
  6. cd afia-api && mvn test passes.
  7. cd afia-app && flutter test passes.
  8. After you edit docs/api-map.md or the pack, python3 ai-agent/scripts/check-agent-pack.py prints PASS.

Do not invent screens​

This package has no UI beyond the current health check. Leave Flutter home as it is unless the user asks to keep the health button.