The campus food delivery platform built for VIT-AP University students.
Order from your favourite canteen, track in real-time, straight to your hostel.
| Feature | Details |
|---|---|
| 🚀 Progressive Web App | Installable on iOS & Android, works offline |
| 🔥 Firebase Real-time | Firestore onSnapshot for live order tracking |
| 🔐 Firebase Auth | Email/Password + Google SSO, role-based routing |
| 👑 Admin Dashboard | Full order management with WhatsApp confirmation |
| 🍽️ Menu Management | Toggle item availability, grouped by category |
| 📊 Live Analytics | Real-time revenue chart and top dishes from Firestore |
| 🛵 Order Tracking | Live status updates from restaurant → delivered |
| 💬 WhatsApp Integration | One-tap customer chat from admin order view |
| 📱 Responsive Design | Mobile-first glassmorphism UI |
┌─────────────────────────────────────────────────────────┐
│ VITAP Eats Stack │
│ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ Next.js 16 (App Router / Turbopack) │ │
│ │ Deployed on ▲ Vercel (Edge Network) │ │
│ │ │ │
│ │ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ Customer │ │ Admin / │ │ │
│ │ │ Pages │ │ Partner │ │ │
│ │ └──────┬──────┘ └──────┬──────┘ │ │
│ │ │ │ │ │
│ │ ▼ ▼ │ │
│ │ ┌─────────────────────────────────────────┐ │ │
│ │ │ Firebase Client SDK (Browser) │ │ │
│ │ │ ┌────────────┐ ┌────────────────────┐ │ │ │
│ │ │ │ Firebase │ │ Cloud Firestore │ │ │ │
│ │ │ │ Auth │ │ (Real-time DB) │ │ │ │
│ │ │ └────────────┘ └────────────────────┘ │ │ │
│ │ └─────────────────────────────────────────┘ │ │
│ └──────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
User Action → React Component → lib/db/*.ts (Firestore SDK)
│
┌────────────────────┘
▼
Cloud Firestore
│
onSnapshot listener → Real-time UI update
| Collection | Description |
|---|---|
users |
User profiles & roles (customer, partner, admin) |
restaurants |
Restaurant info, hours, cuisine |
menu_items |
Dishes with price, category, availability |
orders |
Order docs with real-time status |
| Route | Role | Description |
|---|---|---|
/ |
Customer | Home: restaurant listing |
/restaurant/[slug] |
Customer | Menu, add to cart |
/cart |
Customer | Cart review + coupon |
/checkout |
Customer | Place order |
/order/[id] |
Customer | Live order tracking |
/orders |
Customer | Order history |
/login, /signup |
All | Firebase Auth |
/forgot-password |
All | Password reset email |
/admin |
Admin | Orders, Menu, Insights, Users |
/partner |
Partner | Delivery dashboard |
/partner/earnings |
Partner | Payout history |
- Node.js 18+
- Firebase project (Firestore + Authentication enabled)
- Vercel account (for deployment)
- Git
git clone https://github.com/ankit-sengupta05/VIT-AP-Eats.git
cd VIT-AP-Eats/vitap-eatsnpm installCreate a Firebase project at console.firebase.google.com, then:
- Enable Authentication → Email/Password + Google
- Enable Firestore Database → Start in production mode
- Copy your project config keys
Create .env.local in vitap-eats/:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=G-XXXXXXXXXXIn Firebase Console → Firestore → Rules, paste:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Users can only read/write their own profile
match /users/{uid} {
allow read, write: if request.auth != null && request.auth.uid == uid;
allow read: if request.auth.token.role == "admin";
}
// Restaurants — public read, admin write
match /restaurants/{id} {
allow read: if true;
allow write: if request.auth.token.role == "admin";
}
// Menu items — public read, admin/partner write
match /menu_items/{id} {
allow read: if true;
allow write: if request.auth != null;
}
// Orders — authenticated users only
match /orders/{id} {
allow read: if request.auth != null &&
(resource.data.userId == request.auth.uid ||
request.auth.token.role in ["admin", "partner"]);
allow create: if request.auth != null;
allow update: if request.auth != null;
}
}
}For the admin panel to work, set a custom claim on your admin user via Firebase Admin SDK or Cloud Functions:
// Run once via Firebase Admin SDK
admin.auth().setCustomUserClaims(adminUid, { role: 'admin' });npm run devApp runs at http://localhost:3000 🚀
The app auto-deploys to Vercel on every push to main via the CI/CD pipeline in .github/workflows/deploy.yml.
npm install -g vercel
vercel --prodAdd all NEXT_PUBLIC_FIREBASE_* variables in:
Vercel Dashboard → Project → Settings → Environment Variables
vitap-eats/
├── app/
│ ├── (customer)/ # Customer-facing routes
│ │ ├── page.tsx # Home / restaurant listing
│ │ ├── restaurant/ # Restaurant menu page
│ │ ├── cart/ # Cart & checkout flow
│ │ ├── orders/ # Order history
│ │ └── order/[id]/ # Live order tracking
│ ├── admin/ # Admin dashboard (Orders, Menu, Insights)
│ ├── partner/ # Delivery partner dashboard
│ └── login/signup/ # Auth pages
│
├── lib/
│ ├── firebase.ts # Firebase app initialization
│ ├── db/
│ │ ├── orders.ts # Firestore order CRUD + subscriptions
│ │ ├── restaurants.ts # Restaurant + menu queries
│ │ ├── users.ts # User profile management
│ │ └── items.ts # Menu item management
│ ├── hooks.ts # React Query hooks
│ └── store/cart.ts # Zustand cart store
│
├── components/
│ ├── customer/ # CustomerHeader, RestaurantCard
│ └── ui/ # Reusable UI primitives
│
└── .github/workflows/
└── deploy.yml # Vercel CI/CD pipeline
| Command | Action |
|---|---|
npm run dev |
Start dev server (Turbopack) |
npm run build |
Production build |
npm run lint |
ESLint check |
- Fork the repo
- Create a feature branch:
git checkout -b feat/amazing-feature - Commit your changes:
git commit -m 'feat: add amazing feature' - Push:
git push origin feat/amazing-feature - Open a Pull Request
Ankit Sengupta GitHub: @ankit-sengupta05
Made with ❤️ for VIT-AP University
⭐ Star this repo if you found it helpful!