FASTWAY - Food, Parcel and Delivery Super App for Gabon
# FASTWAY — Food, Parcel & Delivery Super App for Gabon
A production-style, multi-vendor delivery platform for Gabon (Libreville, Akanda, Owendo, Ntoum), inspired by Uber Eats + Uber Connect / Mr D Food, fully localized in French with FCFA (XAF) pricing.
## Stack
- **Next.js 16** (App Router, Server Actions, TypeScript)
- **PostgreSQL** via raw SQL + `pg` (no ORM — see `db/schema.sql`)
- **Tailwind CSS v4** for styling (navy/yellow FASTWAY brand)
- Custom cookie/JWT auth (`jose` + `bcryptjs`), role-based access via `src/proxy.ts`
- Mock payment service layer (`src/lib/payments.ts`) ready to swap in real Gabon Paiement / Airtel Money / Moov Money / card gateways
## Four portals, one app
- **Customer** — `/customer/*` — browse, order, track, send parcels, pay, review
- **Delivery partner** — `/driver/*` — go online, accept jobs, navigate the flow, earnings
- **Restaurant/store** — `/merchant/*` — menu management, order pipeline, revenue
- **Admin** — `/admin/*` — approvals, commissions, delivery zones, promotions, platform settings
## Local development
```bash
npm install
cp .env.example .env # fill in DATABASE_URL, AUTH_SECRET
npm run db:migrate # creates tables (idempotent)
npm run db:seed # realistic Gabonese demo data
npm run dev
```
Demo accounts (password `password123`): `admin@fastway.ga`, `client@fastway.ga`, `chezwou@fastway.ga`, `livreur1@fastway.ga`.
## Deploying
`npm run build` then `npm run start`. On first boot in a new environment, run `npm run db:migrate && npm run db:seed` once against the target `DATABASE_URL`.