← BinarytreeSample project page. Maya Chen is not a real person, and links are switched off.Make yours
← Maya Chen

Campus Eats

Lets a whole hall block split one supper order. Used during a two-week pilot at my residential college at NUS.

View repo ↗Live demo ↗
Role
Solo: design, backend, frontend
Timeline
Aug–Nov 2025
Status
Pilot finished
Stack
Next.jsPostgreSQLStripe test mode
  • Hackathon1st place, Best Social ImpactCampus hackathon at NUS (sample event) · Sep 2025
Commits
138
Stars
41
Last commit
2 weeks ago

Eight deliveries to one lobby

Supper delivery to campus comes with a small-order fee under S$15. On my block, eight people would each order from the same prata shop, pay eight delivery fees, and wait at the lobby for eight riders.

Who orders at 11pm

Students in hall who order supper late, usually in small groups. On one Thursday night I counted 23 separate deliveries to our block from the lobby's pickup shelf.

Why I built it

Everyone already shared food in the block's Telegram group; the only missing piece was one cart and fair splitting. It was small enough to finish in a semester and real enough that people would actually use it.

One cart per block

One shared cart per block with a countdown. Anyone on the block can add items until it closes, each person pays their own share, and one Telegram message goes out when the food reaches the lobby.

How it works

Next.js for the app, PostgreSQL for carts and orders, and Stripe in test mode for per-person splitting. Carts are scoped to a block code so nobody needs an account to join.

The 11:58pm bug

Two people editing the same cart at 11:58pm. I first used optimistic updates and lost items; I switched to row-level locking in Postgres and a short server-side queue, trading a little speed for never dropping an order.

Two weeks, two blocks

A two-week pilot on two blocks: 31 shared orders replaced what would have been about 140 separate ones. Payments were in Stripe test mode, so this measured behaviour, not real money.

What's still blocking it

Real payments need the hall office's approval, which is the actual blocker. I'd also add a 'usual order' button; most people ordered the same thing every time.