AI-powered, secure, and real-time canteen management for colleges.
Modern, scalable, and open-source. Give us a ⭐ if you like it!
- Student & Admin authentication (JWT)
- Browse menu, place orders, live order status
- QR code for order pickup/verification
- Admin panel for menu management (Excel upload)
- Realtime updates & business logic via Convex
- Responsive UI; works great on mobile
Frontend: React, React Router, Axios, react-qr-code
Backend: Node.js, Express, MongoDB, Mongoose
Serverless / Realtime: Convex (functions, data, subscriptions)
Auth: JWT, bcryptjs
File Uploads: Multer, Excel import (ExcelJS)
The backend is powered by Express and Convex. No React API is used here; all business logic and data flows are handled server-side.
college-canteen-app/
├─ backend/
│ ├─ src/ # Express API (controllers, routes, models)
│ ├─ convex/ # Convex functions (serverless)
│ │ ├─ _generated/ # Convex generated types (do not edit)
│ │ ├─ schema.js # Convex schema
│ │ ├─ auth.js # Auth helpers (Convex)
│ │ ├─ admin.js # Admin-side Convex functions
│ │ ├─ menu.js # Menu queries/mutations
│ │ ├─ orderManagement.js # Order lifecycle & business logic
│ │ ├─ notifications.js # Realtime notifications
│ │ ├─ payment.js # Payment intents & status hooks
│ │ ├─ user.js # User profile helpers
│ │ ├─ addAdmin.js # One-off admin seeding script
│ │ ├─ README.md
│ │ └─ tsconfig.json
│ ├─ scripts/ # Seed/migration utilities
│ └─ package.json
├─ frontend/
│ ├─ src/ # React app
│ │ ├─ components/ # Reusable UI components
│ │ ├─ pages/ # Page components
│ │ ├─ context/ # React context providers
│ │ ├─ assets/ # Images, screenshots
│ │ └─ convex/ # Convex client integration
│ └─ package.json
└─ README.md
- Node.js 18+
- MongoDB (local or Atlas)
- Convex account & credentials (sign up at convex.dev)
- Create a Convex project and obtain deployment credentials before forking
git clone <your-repo-url>
cd college-canteen-appcd backend && npm install
cd ../frontend && npm installCopy .env.example to .env in backend and set:
MONGODB_URI=<your-mongodb-uri>
JWT_SECRET=<strong-secret>
For Convex: Run npx convex dev and follow the setup to authenticate with your Convex account and create/link a deployment.
cd backend
npm run data:import
# Default admin: admin@canteen.com / Admin@123# Backend (Convex serverless functions) - this starts everything you need
cd backend
npx convex dev
# Frontend (in a separate terminal)
cd frontend
npm startNote:
npx convex devhandles all backend functionality. No separate Express server needed.
- Convex: Make sure your
backend/convex/schema.jsand functions match your data model. Runnpx convex devfrombackendif you develop Convex locally. - Excel Upload: Admin panel supports menu upload via Excel (see sample in
frontend/src/assetsif provided). - JWT Expiry: Adjust in backend auth middleware as needed.
Backend
npx convex dev— Start Convex local dev server (serverless functions)npm run data:import— Seed admin & sample datanpm run data:destroy— Wipe seeded data (danger!)
Frontend
npm start— React dev servernpm run build— Production build
-
Default Admin (after seeding): Email:
admin@canteen.comPassword:Admin@123 -
QR Codes: Orders include QR payloads; staff can scan to validate pickup.
- The codebase has been streamlined to focus on Convex serverless functions and React frontend.
- All business logic is now centralized in the
backend/convex/folder for better maintainability. - Legacy REST API code has been removed in favor of Convex's real-time capabilities.
Development tip: Use
orderManagement.jsfor all order-related business logic. TheaddAdmin.jsscript can be run once to seed admin users.
We welcome contributions!
- Fork the repo
- Create a feature branch:
git checkout -b feat/your-feature - Commit:
git commit -m "feat: add your feature" - Push:
git push origin feat/your-feature - Open a Pull Request
See CONTRIBUTING.md for guidelines.
MIT
Built for Sreyas Institute of Engineering and Technology.




