Skip to content

About

FoodFlow delivery demo: NestJS API, four Next.js web roles, Flutter apps, PostgreSQL/PostGIS, Redis/BullMQ and Supabase Realtime. Production screenshots and walkthroughs.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,126 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FoodFlow · Food Delivery Operations

Four web roles, one delivery workflow. FoodFlow connects customer ordering, restaurant operations, driver trips and platform administration through a NestJS API, PostgreSQL/PostGIS, private realtime channels and durable background jobs.

CI Integration License MIT

Tiếng Việt · 日本語 · Production check · Screenshot provenance

Try the four web apps

Role Live demo Main journey
Customer Order food Discover restaurants → menu → cart → COD checkout → order tracking
Driver Driver web Availability, scoped realtime connection, trip history and earnings
Restaurant Restaurant portal Order queue, menu management and revenue overview
Admin Admin dashboard System overview, orders, restaurants, users and drivers

Authenticated screenshots use synthetic demo accounts. Passwords and tokens are not published. The source also contains separate Flutter Customer/Driver apps; the images below show the Next.js web apps.

See the ordering journey

Customer discovers restaurants, adds a dish and creates a persisted demo order

Captured from production on 30 October 2026. The walkthrough sequences real browser keyframes with edited pacing. It is not a speed benchmark. The COD order, address, restaurant activity and financial figures are synthetic portfolio fixtures; no real payment or delivery occurred.

Four roles in view

Customer discovery Restaurant order queue
Customer restaurant discovery Restaurant live order queue
Admin overview Driver dashboard
Admin operations overview Driver dashboard and realtime status
Operations walkthrough, menu, earnings and mobile layouts

Restaurant, Admin and Driver operations walkthrough

Restaurant menu Driver earnings
Restaurant menu management Driver earnings for synthetic trips

Customer order details at 390px Driver dashboard at 390px

The current API returned 20 restaurants and 140 menu items during this check. Menu prices, ratings, reviews, estimated times and earnings are demo data, not official brand offerings or measured commercial results.

Engineering highlights

  • Order lifecycle: persisted cart and COD checkout; explicit state transitions and Prisma transactions across customer, restaurant and driver workflows.
  • Authorization: JWT authentication, role checks, restaurant membership/permissions and ownership checks for orders, tracking and resources.
  • Private realtime: short-lived ES256 credentials restrict Supabase Broadcast subscriptions; web clients renew credentials and reject stale callbacks after session changes.
  • Dispatch and durability: Redis GEO/Lua atomic claims, idempotency and PostgreSQL outbox jobs; GPS writes are persisted before acknowledgement. The live driver screen shows connection/availability separately from delivery completion.
  • Storage: Supabase public/private buckets, server-side upload validation and scoped signed reads for private driver documents. No real identity document is used in this showcase.
  • Recovery: expired Admin/Restaurant sessions complete bootstrap and return to login rather than leaving an empty screen; focused regressions cover token cleanup and stale-login races.
  • Testing: backend Jest/PostgreSQL/Redis checks, four-app Vitest suites, Playwright and Docker-based integration gates. Historical provider checks and fresh browser checks are identified separately.

Stack and architecture

Layer Technologies
API Node.js, NestJS 11, TypeScript, Prisma 6, REST/OpenAPI
Four web apps Next.js 15, React 18, Tailwind CSS, TanStack Query where used
Data and location Supabase PostgreSQL, PostGIS, Redis with TLS
Managed events and files Supabase private Broadcast and Storage, PostgreSQL outbox
Mobile workspace Flutter/Riverpod Customer and Driver apps, separate from these web captures
Verification Jest, Vitest, Playwright, k6, Lighthouse, GitHub Actions
Free demo hosting Four Vercel frontends + Render API/embedded worker
flowchart LR
    Customer[Customer web] --> API[NestJS API on Render Free]
    Driver[Driver web] --> API
    Restaurant[Restaurant web] --> API
    Admin[Admin web] --> API
    API --> DB[(Supabase PostgreSQL / PostGIS)]
    API --> Redis[Redis TLS / GEO / Lua]
    API --> Files[Supabase Storage]
    API --> Events[Private Supabase Broadcast]
    API --> Worker[Embedded durable outbox worker]
    Worker --> DB
    Events --> Customer
    Events --> Driver
    Events --> Restaurant
    Events --> Admin
Loading

The free demo uses REALTIME_PROVIDER=supabase, STORAGE_PROVIDER=supabase and QUEUE_PROVIDER=supabase-postgres. Local/self-hosted compatibility retains Socket.IO, BullMQ and MinIO. Database, service-role, signing and Redis credentials remain server-only.

Run locally

Requirements: Node.js 22.13+, Corepack/pnpm 11.11.0 and Docker Compose. Copy the checked-in environment examples to ignored local files and configure local values before starting services.

# Infrastructure only, using the local compatibility profile
docker compose up -d --build postgres redis minio

cd backend
corepack pnpm install --frozen-lockfile
corepack pnpm prisma generate
corepack pnpm prisma migrate dev
corepack pnpm db:seed
corepack pnpm start:dev

In another terminal:

cd web
corepack pnpm install --frozen-lockfile
corepack pnpm dev
App Local port
Admin 3000
API 3001
Restaurant 3002
Customer 3003
Driver 3004

Seed only an explicitly selected disposable local database. Do not apply development synchronization, resets or seed commands to a hosted database. See the backend environment guide, web guide, local Docker guide and managed demo setup.

Verification and current limits

cd backend
corepack pnpm typecheck
corepack pnpm lint
corepack pnpm test -- --runInBand
corepack pnpm build
cd web
corepack pnpm typecheck
corepack pnpm lint
corepack pnpm test
corepack pnpm build

The dated four-web production report records current deployment identities, role login/read checks, a newly persisted COD order visible to Customer/Restaurant/Admin, negative authorization and responsive observations. A green CI run proves its named scope; it does not certify all routes or provider integrations.

  • Render Free sleeps: API and embedded worker pause after inbound idle time; durable jobs resume on HTTP wake. There is no continuous-worker or uptime guarantee, paid upgrade or artificial keepalive.
  • Providers: live SePay, SMTP, SMS, push, AI and external route-provider success are not established by this check. Map display is distinct from verified directions, GPS or ETA. This pass does not simulate a fresh physical driver trip.
  • Locales: Admin/Restaurant support locale routes; mixed labels remain on some Customer/Driver screens. Three-language completeness is not claimed by the screenshot gallery.
  • Release identity: web apps and API can have different revision metadata. This report is a dated demo check, not a claim of a unified immutable release across all runtimes.

Project map and documentation

backend/             NestJS modules, Prisma schema/migrations and worker
web/apps/admin/      Platform operations
web/apps/restaurant/ Merchant operations
web/apps/customer/   Customer ordering
web/apps/driver/     Driver operations
web/packages/        Shared API client, UI and localization
mobile/              Flutter Customer/Driver applications
infra/               Containers, integration gates and deployment helpers
docs/showcase/       Dated production web media and asset manifest

Admin guide · Restaurant guide · Customer guide · Driver guide · API contract · Testing · Security.

Earlier Railway, two-web, mobile-emulator and immutable-image evidence remains available in the historical README snapshot and release records. Those snapshots do not override the current Render/Vercel demo report. MIT license.

About

FoodFlow delivery demo: NestJS API, four Next.js web roles, Flutter apps, PostgreSQL/PostGIS, Redis/BullMQ and Supabase Realtime. Production screenshots and walkthroughs.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages