Louis Lai | Systems Portfolio
Back to projects
Operations platformHigh-concurrency bookingRule-based allocationCategory exclusion rulesBilling automation

Food Truck Slot Booking System

Operations platform for slot booking, review, and billing

Vendors competed for limited slots through messaging apps, making capacity, order, and billing hard to verify.

Outcomes

Key outcomes

Vendors register themselves; ops no longer confirms each entry manually.
Booking capacity stays locked to session limits.
Registration, allocation, and fee records are all searchable in admin.

Background

Background and process challenges

Food truck venue slots are limited. Messaging-app coordination created disputes over registration order and fee settlement. Vendors now register during defined windows, and the system allocates slots by rules while admins handle exceptions and billing.

Features

Roles and features

Requirements analysis and process designMulti-role workspace developmentDatabase rule designCI/CD and deployment

Sessions and registration

  • Session creation, status management, and booking window settings
  • Vendor calendar browsing, registration, and status tracking
  • Category and capacity rules enforced in the booking flow

Admin and billing

  • Approve, reject, or cancel applications with reason logs
  • Fee calculation, statements, and export
  • Dashboard and statistics for slot trends and bottlenecks

Design

Key design decisions

PostgreSQL function allocation

Registration logic runs in PostgreSQL functions, so every entry point follows the same rules.

Transaction locking against overbooking

When slots open, transaction-level locks prevent over-allocation and duplicate assignments by submission time.

Architecture

System architecture

Food truck slot booking: from vendor registration to rule-based allocation

Vendor portal

Self-registration, calendar browsing, status tracking

Edge protection

Session validation, rate limiting, blocklist

Rule allocation engine

Capacity limits, duplicate checks, category exclusion, sequence rules

Data and permissions

PostgreSQL RPC, RLS, transaction locking

Admin and billing

Exception handling, statements, report export

Data layer: Supabase PostgreSQL + Redis Session Cache + Vercel Edge
Vendors register themselves
Rules assign slots
Admin reconciles fees

Workflow

Booking flow map

Flow overview

Food truck booking: registration, rule checks, and billing confirmation

Vendor

Browse slotsView available sessions
Choose sessionPick date and time slot
Submit registrationSubmit vendor details
View resultTrack allocation status

System rules

Login and traffic checkSession, rate limit
Capacity and duplicate checkCapacity and registration records
Exclusion rule allocationCategory and sequence rules
Transactional writeNo overbooking or duplicates

Admin

View allocation listSee session outcomes
Handle exceptionsAdjust, cancel, and annotate
Confirm billingFees and reconciliation data
Export reportsOperations and finance records
Choose a session and submit
System checks capacity and rules
Admin handles exceptions

Screens

Key screen walkthrough

Vendor

Vendor self-registration

Vendors browse slots on a calendar and submit bookings without admin relay.

  • Calendar slot view
  • Submit booking details
  • Track review status

Admin

Allocation and exceptions

Admins see allocation results and can adjust exceptions with documented reasons.

  • View allocation list
  • Handle cancellations and exceptions
  • Record exception reasons

Billing and audit

Billing and audit trail

Fees and reconciliation stay on one page; no separate ledger required.

  • Fee detail review
  • Reconciliation confirmation
  • Report export

Technology

Technical architecture

Frontend

Next.js (App Router)ReactTypeScript

Backend

Next.js API RoutesRedis

Database

SupabasePostgreSQLRow Level Security

Auth & Security

Supabase AuthRBACRate Limiting

DevOps

VercelGitHub ActionsSQL Migration

Have an internal system in mind?

We can start with the current workflow, the bottlenecks, and the first process to fix.