A modern, full-stack web application for managing hostel mess operations, menu planning, and student feedback.
Features โข Tech Stack โข Installation โข Usage โข API Documentation
- Problem Statement
- Solution
- Features
- Tech Stack
- Architecture
- Installation
- Usage
- API Documentation
- Screenshots
- Deployment
- Contributing
- License
| Problem | Impact |
|---|---|
| No Menu Visibility | Students walk to mess blindly without knowing what's being served |
| Zero Feedback Mechanism | Mess management has no structured way to collect student feedback |
| Manual Attendance Tracking | Time-consuming paper-based attendance system prone to errors |
| Poor Communication | No platform for students to raise complaints or suggestions |
| No Data Analytics | Management lacks insights into food preferences and quality trends |
| Inefficient Operations | Difficulty in menu planning and resource allocation |
- ๐ถ Students waste time walking to mess only to find undesirable food
- ๐ Feedback gets lost in informal WhatsApp groups or verbal complaints
- โฐ Long queues during attendance marking
- ๐ Low student satisfaction due to lack of voice in mess operations
- ๐ฐ Food wastage due to poor demand forecasting
SmartMess is a comprehensive digital platform that bridges the gap between mess management and students, providing:
โ
Real-time Menu Access - Check today's breakfast, lunch, snacks, and dinner from anywhere
โ
Rating System - Rate meals with 1-5 stars and add detailed comments
โ
Digital Attendance - Mark attendance digitally with a single click
โ
Complaint Portal - Raise and track complaints with status updates
โ
History Tracking - View all past ratings and attendance records
โ
Menu Management - Create and update daily/weekly menus easily
โ
Student Management - Approve registrations, verify students, manage accounts
โ
Analytics Dashboard - View ratings, trends, and student feedback at a glance
โ
Complaint Management - Review and respond to student complaints
โ
Attendance Reports - Track meal-wise attendance and generate reports
- ๐ฑ Mobile-First Design - Access from any device, anywhere
- ๐ Secure Authentication - JWT-based secure login system
- โก Real-Time Updates - Instant menu changes and notifications
- ๐ Data-Driven Decisions - Analytics to improve food quality
- ๐จ Modern UI/UX - Intuitive interface with smooth animations
| Feature | Description |
|---|---|
| User Registration | Sign up with college email, roll number, hostel details |
| Today's Menu | View all 4 meals (Breakfast, Lunch, Snacks, Dinner) for today |
| Weekly Menu | Plan your week with 7-day menu calendar |
| Rate Meals | Give 1-5 star ratings with optional text comments |
| My Ratings | View, edit, or delete your past ratings |
| Digital Attendance | Mark attendance for each meal with one click |
| Complaints Portal | Submit complaints, view status, and track responses |
| Profile Management | Update personal information and preferences |
| Feature | Description |
|---|---|
| Admin Dashboard | Overview of students, ratings, complaints, and trends |
| Menu Management | Create/edit daily menus with drag-and-drop interface |
| Student Verification | Approve or reject student registrations |
| Manage Students | View all students, verify accounts, block users |
| View Ratings | See all ratings with filters by meal, date, rating |
| Complaint Management | Review complaints, update status, respond to students |
| Attendance Reports | Generate meal-wise and date-wise attendance reports |
| Analytics | View trends, average ratings, popular dishes |
| Technology | Purpose | Version |
|---|---|---|
| React | UI Library | 18.3.1 |
| Vite | Build Tool & Dev Server | 5.4.21 |
| React Router | Client-side Routing | 6.28.0 |
| Axios | HTTP Client | 1.7.9 |
| Date-fns | Date Manipulation | 4.1.0 |
| React Hot Toast | Toast Notifications | 2.4.1 |
| React Icons | Icon Library | 5.4.0 |
| CSS Modules | Component-level Styling | Built-in |
| Technology | Purpose | Version |
|---|---|---|
| Node.js | Runtime Environment | 18+ |
| Express | Web Framework | 4.21.2 |
| Supabase | PostgreSQL Database | Latest |
| JWT | Authentication | 9.0.2 |
| Bcrypt | Password Hashing | 5.1.1 |
| Cors | Cross-Origin Requests | 2.8.5 |
| Dotenv | Environment Variables | 16.4.7 |
| Table | Fields | Purpose |
|---|---|---|
| students | id, name, email, password, roll_number, hostel_name, room_number, phone_number, is_verified, created_at | Student accounts |
| admins | id, name, email, password, role, created_at | Admin accounts |
| menus | id, date, day, breakfast[], lunch[], snacks[], dinner[], created_at | Daily menus |
| ratings | id, student_id, menu_id, meal_type, rating, comment, created_at | Meal ratings |
| attendance | id, student_id, date, breakfast, lunch, snacks, dinner, created_at | Attendance records |
| complaints | id, student_id, title, description, status, admin_response, created_at | Complaints |
| Service | Purpose | URL |
|---|---|---|
| Vercel | Frontend Hosting | smartmesslms.vercel.app |
| Render | Backend Hosting | smartmess-backend.onrender.com |
| Supabase | PostgreSQL Database | Cloud-hosted |
| GitHub | Version Control | ggauravky/SmartMess |
| Git | Source Control | Latest |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Client Layer โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ React Frontend (Vite + React Router) โ โ
โ โ โข Student Dashboard โข Admin Dashboard โข Auth Pages โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTPS/REST API
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Application Layer โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Express.js Backend (Node.js) โ โ
โ โ โข Auth Routes โข Menu Routes โข Rating Routes โ โ
โ โ โข JWT Middleware โข CORS Handler โข Error Handler โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SQL Queries
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Data Layer โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Supabase PostgreSQL Database โ โ
โ โ โข Students โข Admins โข Menus โข Ratings โ โ
โ โ โข Attendance โข Complaints โข Notifications โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SmartMess/
โโโ frontend/ # React Frontend
โ โโโ src/
โ โ โโโ components/ # Reusable UI Components
โ โ โ โโโ layout/ # Layout components (Navbar, Footer)
โ โ โ โโโ ui/ # UI components (Button, Card, Modal)
โ โ โโโ pages/ # Page components
โ โ โ โโโ admin/ # Admin pages
โ โ โ โโโ Landing.jsx # Landing page
โ โ โ โโโ Dashboard.jsx # Student dashboard
โ โ โ โโโ ...
โ โ โโโ context/ # React Context (Auth)
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ services/ # API service layer
โ โ โโโ styles/ # Global styles
โ โ โโโ utils/ # Utility functions
โ โโโ public/ # Static assets
โ โโโ package.json # Frontend dependencies
โ โโโ vite.config.js # Vite configuration
โ
โโโ backend/ # Express Backend
โ โโโ src/
โ โ โโโ config/ # Configuration files
โ โ โ โโโ database.js # Supabase client
โ โ โโโ controllers/ # Route controllers
โ โ โ โโโ adminController.js
โ โ โ โโโ studentController.js
โ โ โโโ models/ # Database models
โ โ โ โโโ Student.js
โ โ โ โโโ Menu.js
โ โ โ โโโ Rating.js
โ โ โโโ routes/ # API routes
โ โ โ โโโ authRoutes.js
โ โ โ โโโ adminRoutes.js
โ โ โ โโโ studentRoutes.js
โ โ โโโ scripts/ # Utility scripts
โ โ โ โโโ createAdmin.js # Admin creation script
โ โ โโโ server.js # Express server entry
โ โโโ .env # Environment variables
โ โโโ package.json # Backend dependencies
โ โโโ database_schema.sql # Database schema
โ
โโโ .gitignore # Git ignore file
โโโ DEPLOYMENT.md # Deployment guide
โโโ README.md # This file
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) - Download
- npm or yarn - Comes with Node.js
- Git - Download
- Supabase Account - Sign up
git clone https://github.com/ggauravky/SmartMess.git
cd SmartMesscd backend
npm install- Go to Supabase Dashboard
- Create a new project
- Go to Project Settings โ API
- Copy your Project URL and anon/public key
Run the SQL schema from backend/database_schema.sql in Supabase SQL Editor:
-- Copy contents from backend/database_schema.sql and run in SupabaseCreate .env file in backend/ directory:
# Server Configuration
PORT=5000
NODE_ENV=development
# Supabase Configuration
SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_ANON_KEY=your-supabase-anon-key-here
# JWT Configuration
JWT_SECRET=your_super_secret_jwt_key_here_change_in_production
JWT_EXPIRES_IN=7d
# Frontend URL (for CORS)
FRONTEND_URL=http://localhost:3000
# Admin Credentials (for createAdmin.js script)
ADMIN_NAME=Admin User
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=your_secure_password
ADMIN_PHONE=0000000000
ADMIN_ROLE=superadminnpm run create-adminnpm run devBackend will run on http://localhost:5000
Open a new terminal:
cd frontend
npm installCreate .env file in frontend/ directory:
VITE_API_URL=http://localhost:5000/apinpm run devFrontend will run on http://localhost:3000 (or next available port)
- Frontend: Open http://localhost:3000
- Backend API: http://localhost:5000/api/health
Use the credentials you set in backend/.env file:
- Email: Value of
ADMIN_EMAIL - Password: Value of
ADMIN_PASSWORD - Login URL: http://localhost:3000/admin/login
- Register: Go to landing page โ Click "Sign Up" โ Fill registration form
- Wait for Approval: Admin needs to verify your account
- Login: Once approved, login with your credentials
- View Menu: Check today's or weekly menu
- Mark Attendance: Click attendance button for each meal
- Rate Meals: Rate after eating, give 1-5 stars with comments
- Submit Complaints: Go to Complaints page โ Submit new complaint
- Login: Go to
/admin/loginโ Enter admin credentials - Verify Students: Dashboard โ Manage Students โ Verify pending registrations
- Create Menu: Manage Menu โ Select date โ Add items for each meal
- View Ratings: View Ratings โ Filter by date, meal type, or rating
- Handle Complaints: Complaints โ Update status โ Add response
- View Analytics: Dashboard shows overview of all activities
- Development:
http://localhost:5000/api - Production:
https://smartmess-backend.onrender.com/api
All protected routes require JWT token in header:
Authorization: Bearer <your_jwt_token>
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /auth/register |
Student registration | No |
| POST | /auth/login |
Student login | No |
| POST | /auth/logout |
Student logout | Yes |
| POST | /admin/login |
Admin login | No |
| GET | /auth/me |
Get current user | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /menus/today |
Get today's menu | Yes |
| GET | /menus/weekly |
Get weekly menu | Yes |
| GET | /menus/date/:date |
Get menu by date | Yes |
| POST | /admin/menus |
Create/update menu | Admin |
| DELETE | /admin/menus/:id |
Delete menu | Admin |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /ratings/my-ratings |
Get user's ratings | Yes |
| POST | /ratings |
Create rating | Yes |
| PUT | /ratings/:id |
Update rating | Yes |
| DELETE | /ratings/:id |
Delete rating | Yes |
| GET | /admin/ratings |
Get all ratings | Admin |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /admin/students |
Get all students | Admin |
| PUT | /admin/students/:id/verify |
Verify student | Admin |
| DELETE | /admin/students/:id |
Delete student | Admin |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /attendance/today |
Get today's attendance | Yes |
| POST | /attendance |
Mark attendance | Yes |
| GET | /admin/attendance |
Get all attendance | Admin |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /complaints |
Get user complaints | Yes |
| POST | /complaints |
Create complaint | Yes |
| PUT | /complaints/:id |
Update complaint | Yes |
| GET | /admin/complaints |
Get all complaints | Admin |
| PUT | /admin/complaints/:id |
Update complaint status | Admin |
POST /api/auth/register
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com",
"password": "securepass123",
"rollNumber": "21CS001",
"hostelName": "Hostel A",
"roomNumber": "A-101",
"phoneNumber": "9876543210"
}GET /api/menus/today
Authorization: Bearer <token>POST /api/ratings
Authorization: Bearer <token>
Content-Type: application/json
{
"menuId": "menu-uuid",
"mealType": "lunch",
"rating": 4,
"comment": "Good taste, nice quantity"
}Beautiful, modern landing page with features, testimonials, and FAQ
Clean dashboard showing today's menu, quick stats, and quick actions
View all 4 meals with ratings and ability to rate each meal
Comprehensive overview of students, ratings, complaints, and analytics
Easy-to-use interface for creating and managing daily menus
View all ratings with filters, search, and sorting options
The application is deployed and live at:
- Frontend: https://smartmesslms.vercel.app
- Backend: https://smartmess-backend.onrender.com
{
"buildCommand": "npm run build",
"outputDirectory": "dist",
"framework": "vite",
"env": {
"VITE_API_URL": "https://smartmess-backend.onrender.com/api"
}
}services:
- type: web
name: smartmess-backend
runtime: node
buildCommand: npm install
startCommand: npm start
envVars:
- key: NODE_ENV
value: production
- key: PORT
value: 5000For detailed deployment instructions, see DEPLOYMENT.md
Contributions are welcome! Please follow these steps:
-
Fork the Repository
git clone https://github.com/your-username/SmartMess.git
-
Create Feature Branch
git checkout -b feature/AmazingFeature
-
Commit Changes
git commit -m 'Add some AmazingFeature' -
Push to Branch
git push origin feature/AmazingFeature
-
Open Pull Request
- Use ES6+ features
- Follow React best practices
- Write meaningful commit messages
- Add comments for complex logic
- Update documentation for new features
This project is licensed under the MIT License - see the LICENSE file for details.
Gaurav Kumar
- GitHub: @ggauravky
- Email: gkumaryadav526@gmail.com
- LinkedIn: Gaurav Kumar
- React - Frontend library
- Express - Backend framework
- Supabase - Database and authentication
- Vercel - Frontend hosting
- Render - Backend hosting
- React Icons - Icon library
For support, email gkumaryadav526@gmail.com or create an issue in the repository.
- Mobile app (React Native)
- WhatsApp notifications
- Email notifications
- Payment integration for mess bills
- Multi-language support
- Dark mode
- Export reports to PDF/Excel
- Push notifications
- Menu suggestions based on ratings
- Nutritional information
- Allergen warnings
- QR code for attendance
Made with โค๏ธ for better campus dining
โญ Star this repo if you find it helpful!