Waypoint Logistics connects ordering, assisted fleet planning, loading, delivery, receipt, proof, and claims across four roles. The backend runs as Docker services with PostgreSQL and Drizzle migrations.
Install Docker Desktop, then run:
docker compose up --buildOpen Waypoint or Swagger UI. Compose waits for PostgreSQL and the Drizzle migration service before starting the app. In another terminal, seed reference data and demo accounts with docker compose --profile demo run --rm seed.
These accounts use synthetic competition data. All four use the demo password Peliyagoda2026!.
| Role | Scope | |
|---|---|---|
| Dispatcher | dispatcher@waypoint.lk |
Both depots |
| Loader | loader@waypoint.lk |
Peliyagoda depot |
| Driver | driver@waypoint.lk |
Peliyagoda depot |
| Store manager | manager.out001@waypoint.lk |
OUT001 |
The role cards fill an email address; each sign-in still verifies the password against the database. Change JWT_SECRET, DEMO_PASSWORD, and the database credentials before public deployment. APP_ORIGIN must be the HTTPS public origin in production.
Use Node.js 24 and pnpm 10.32.1. Copy .env.example to .env, then start PostgreSQL using Docker or another local instance. Install and run:
corepack enable
cp .env.example .env
pnpm install
pnpm dev:setup
pnpm devdev:setup starts only PostgreSQL in Docker, waits for it to be healthy, applies migrations, and safely reseeds the synthetic data. Run it again whenever a migration or seed changes. The Vite client runs at port 3000 with hot module replacement and proxies /api and /docs to the Fastify watch server at port 8000. Source changes therefore do not require an image rebuild.
If the full Docker application is already running, stop its app container before local development so Vite can use port 3000:
docker compose stop app
pnpm devThe server loads the repository-root .env automatically while preserving any environment variables supplied by Docker or CI. Check changes with pnpm verify; pnpm format applies the shared Prettier style. Run pnpm verify:database for Drizzle migration and integration checks using the Docker PostgreSQL service and an isolated test database.
The client, server, and shared contracts are pnpm workspaces. The same TypeBox schemas describe validation, responses, TypeScript types, and OpenAPI. PostgreSQL stores normalized network/catalog references, orders, dated plans, trip load manifests, fulfillment, receipts, claims, forecasts, users, and revocable sessions. Architecture and data model document the boundaries.
The API is under /api/v1. Use POST /api/v1/auth/login, GET /api/v1/auth/me, POST /api/v1/auth/logout, and the role-specific /api/v1/portal/{role}/overview endpoints. Swagger UI is at /docs; the generated document is at /docs/json.
- Run
docker compose up --buildand open the application. - Select each role card, enter the demo password, and sign in. Each account opens its own workspace.
- Check the role, depot or outlet, and scoped reference counts; sign out between roles.
- Open
/docs, call login, then call/api/v1/auth/mein the same browser session.
The complete cross-role operational walkthrough will replace this section as later stages deliver orders, plans, loading, delivery, and receipt.
The submitted Designathon PDF and live prototype are the visual and workflow baseline. Stage 1 carries its dark Waypoint navigation, restrained white surfaces, and role separation into a real application. The prototype's role picker previously simulated sign-in; this implementation adds real account verification. Operational screens will follow the submitted flow. Any material departures will be listed here.
data/reference contains the source CSVs needed for reference seeding. They are synthetic competition data and should be handled according to the challenge booklet's publication rules. Do not publish this repository or the data without organizer authorization.
The backend exposes role-scoped APIs for orders, assisted planning, manifests, loading, dispatch, delivery, receipts, proof, exception claims, replay, and return/fuel closure. Proof files persist on a private Docker volume. Operational browser screens and durable browser-side offline storage remain to be connected. Run docker compose --profile demo run --rm seed to create the synthetic released-plan walkthrough. See the data model for lifecycles, constraints, indexes, CSV import/export, and Docker verification.
For clean local QA, pnpm db:seed seeds references and accounts without sample orders. Use SEED_DEMO_ORDERS=true pnpm db:seed to explicitly include the synthetic workflow and UI orders. Live planning opens after the 16:00 Asia/Colombo intake cutoff; historical simulation contexts use their imported scenario dates.
The store workspace follows the submitted order overview, catalogue, add-item, and deferred-detail screens while reusing the existing navigation, panel, and field styles. Managers can select products by SKU, save and edit drafts, submit orders, inspect released delivery assignments, and confirm receipts or report issues. Store catalogue reads are restricted to the signed-in outlet’s brand, and show quantities for its delivery depot. Dispatchers can browse products grouped by Fresh, Style, or Tech and update available quantities separately for Peliyagoda and Kandy.
Run pnpm --filter @waypoint/server db:migrate followed by pnpm --filter @waypoint/server db:seed:catalog to install the catalogue and inventory migration and populate 17 mock products with depot balances. The seed preserves product IDs and existing manually adjusted inventory; it creates no operational orders or plans. Product artwork is bundled locally, with no S3 dependency. max_order_quantity is the per-order limit. Draft quantities are checked against depot stock and stock is locked, validated, and decremented atomically when submitted. Monthly summaries use Asia/Colombo month boundaries.