Skip to content

CelticsGN/Khaoozy

Repository files navigation

Khaoozy

Skip the Queue. Not the Food.

A college canteen food pre-ordering web app for VU Pune. Students pre-order and pay via UPI before walking to the canteen — no queues, no cash, no chaos.


Features

  • Pre-Order — Browse the full menu, add to cart, and pay before leaving your seat
  • UPI Payments — Razorpay integration with test mode support
  • Live Order Tracking — Real-time status updates via Pusher WebSockets
  • Token System — Every order gets a 4-digit token for pickup
  • Auto-Refund — Razorpay refund triggered automatically if canteen doesn't respond in 5 minutes
  • Canteen Dashboard — Live order feed, OPEN/CLOSED toggle, menu management, earnings stats
  • College-Only Auth — Clerk email OTP restricted to @vupune.ac.in addresses

Tech Stack

Layer Technology
Framework Next.js 16 (App Router)
Styling Tailwind CSS v4
Auth Clerk v6 (Email OTP)
Database Neon (Serverless Postgres)
ORM Drizzle ORM
Realtime Pusher Channels
Payments Razorpay UPI
State Zustand
Deployment Vercel

Project Structure

app/
  page.tsx              # Student splash / sign-in
  menu/                 # Browse menu
  item/[id]/            # Item detail
  cart/                 # Cart review
  checkout/             # Razorpay payment
  order/[id]/           # Live order tracking
  history/              # Past orders
  profile-setup/        # First-time profile form
  canteen/
    login/              # Staff sign-in
    dashboard/          # Live orders + open/close toggle
    order/[id]/         # Accept / Reject / Ready / Collected
    menu/               # Menu management
    earnings/           # Revenue stats
  api/                  # All API routes
db/
  schema.ts             # Drizzle table definitions
  seed.ts               # Default canteen seed
lib/
  db.ts                 # Lazy Neon DB client
  pusher-server.ts      # Pusher server singleton
  pusher-client.ts      # Pusher client singleton
  razorpay.ts           # Razorpay singleton
store/
  cartStore.ts          # Zustand cart with localStorage persist

Canteen Staff Access

  1. Sign in to the app with any email to create your Clerk account
  2. Go to Clerk Dashboard → Users → your account
  3. Set Public Metadata:
    { "role": "canteen" }
  4. Visit /canteen/dashboard

Order Status Flow

pending_payment → paid → approved → preparing → ready → collected
                                 ↘ cancelled
                    ↘ refunded (auto or manual rejection)

Timeouts (via Vercel cron every minute):

  • pending_payment older than 15 min → cancelled
  • paid older than 5 min (canteen no response) → refunded (auto Razorpay refund)

Scripts

npm run dev          # Start dev server
npm run build        # Production build
npm run db:push      # Push schema to Neon DB
npm run db:studio    # Open Drizzle Studio
npm run db:seed      # Seed default canteen row

Made By

Gaurav Guddeti & Nihal Pardeshi — VU Pune, 2026

Releases

No releases published

Packages

 
 
 

Contributors

Languages