Skip to content

Repository ​

This is the single canonical structure. Where another document shows a different layout, this one is correct.

Layout ​

text
KHAWI/
├── apps/
│   ├── web/            React + Vite + MapLibre consumer application
│   └── admin/          Operations dashboard
├── services/
│   └── api/            Node.js API — the controlled application gateway
├── packages/
│   ├── matching/       Route compatibility engine
│   ├── compliance/     Policy and risk engine
│   ├── validation/     Shared request/response schemas
│   └── config/         Shared configuration
├── database/
│   ├── migrations/     Numbered SQL migrations
│   └── seeds/          Development seed data
├── cms/
│   └── strapi/         Strapi 5 headless CMS
├── docs/               VitePress documentation
├── brand/              Brand assets, tokens and guidelines
├── context/            Working context notes
├── scripts/            Repository build and maintenance scripts
├── public/             Static assets served as-is
├── .github/            CI workflows
├── .env.example        Documented environment variables
├── docker-compose.yml  Local Postgres/PostGIS, Redis, Strapi
├── package.json
├── README.md
├── SECURITY.md
└── LICENSE

Notes ​

  • The API lives in services/api. apps/ holds client applications only.
  • database/migrations/ is the executable schema. The narrative version lives in Schema & Migrations; the migrations are the artefact that actually runs.
  • packages/matching and packages/compliance are separate on purpose. They are different concerns with different owners. See System Architecture.
  • cms/strapi is a separate deployment with its own database. It shares no tables with the operational database.
  • site/ and landing/ are build output, not source. site/ is generated by scripts/build-site.mjs and is not edited by hand.

Migration numbering ​

Migrations are append-only. A schema change is a new numbered file, never an edit to a released one. The sequence is listed in Schema & Migrations.

KHAWI — same route, go together.