إنتقل إلى المحتوى الرئيسي

WP-04 Admin directory

Load AGENTS.md, contracts.md, and this file. Tech specs: api/admin.md, app/admin.md, exchange/admin.md. Implement only when the user asks and WP-00 has landed.

Group G1. May run beside WP-01, WP-02, and WP-03.

Owns​

  • afia-api/src/main/java/health/afia/app/admin/
  • afia-api/src/test/java/health/afia/app/admin/
  • afia-app/lib/presentation/admin/
  • afia-app/lib/data/admin/
  • afia-app/lib/domain/admin/

Features: F-09 staff directory and roles, F-10 clinic configuration.

Reserved path: /api/v1/afia/admin.

Must not write​

  • EndpointUri.java, api_config.dart, docs/api-map.md
  • health.afia.app.identity persistence or a second user table
  • afia-web/ (landing and legal stay marketing)
  • Patient, clinician, or diagnostics packages

Depends on​

WP-00. Calls identity for Account and Role. Do not duplicate those types.

Done when​

  1. Admin HTTP can list accounts and assign roles that already exist on Account.
  2. Clinic configuration has one resource under /api/v1/afia/admin. Keep the first model small. Name and timezone are enough until WP-10.
  3. afia-app has an ADMIN role shell under presentation/admin/. Other roles do not open it. See ADR 0007.
  4. Tests cover /api/v1/afia/admin and the Flutter admin shell does not appear for a PATIENT session.
  5. cd afia-api && mvn test passes.
  6. cd afia-app && flutter test passes.

Do not invent screens​

Admin is a Stitch mobile module. Screens were not exported. Do not name admin screens. Ship API plus the smallest Flutter shell that calls the reserved paths. Replace that shell after WP-10.