A comprehensive full-stack web application for managing hostel/college mess operations with blockchain integration for transparency and security.
- Multi-role authentication: Students, Staff, and Admin
- JWT-based secure authentication
- Role-based access control
- QR code-based attendance tracking
- Real-time attendance monitoring
- Automated attendance reports
- Submit and track complaints
- Blockchain-powered transparency
- Admin complaint resolution system
- Democratic voting for mess-related decisions
- Blockchain-secured voting mechanism
- Real-time vote counting
- Digital token management
- Reward system for students
- Token transaction history
- Feedback collection system
- QR code generation and scanning
- File upload with Cloudinary integration
- AI-powered assistance with Google Gemini
- React 18 - Modern UI library
- Vite - Fast build tool
- Tailwind CSS - Utility-first CSS framework
- React Router - Client-side routing
- Axios - HTTP client
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - MongoDB ODM
- JWT - Authentication tokens
- Bcrypt - Password hashing
- Ethereum - Smart contract platform
- Solidity - Smart contract language
- Hardhat - Development framework
- Ethers.js - Ethereum library
- Cloudinary - Image and file management
- Google Gemini AI - AI integration
- MongoDB Atlas - Cloud database
mess-management-system/
βββ backend/ # Node.js backend
β βββ src/
β β βββ controllers/ # Route controllers
β β βββ models/ # Database models
β β βββ routes/ # API routes
β β βββ middlewares/ # Custom middlewares
β β βββ utils/ # Utility functions
β βββ contracts/ # Smart contracts
β βββ scripts/ # Deployment scripts
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ assets/ # Static assets
β β βββ styles/ # CSS files
β βββ public/ # Public assets
βββ README.md
- Node.js (v18 or higher)
- MongoDB
- Git
-
Clone the repository
git clone https://github.com/Vikas4245/Mess-Management-system.git cd Mess-Management-system -
Backend Setup
cd backend npm install -
Frontend Setup
cd frontend npm install -
Environment Configuration
Create
.envfile in the backend directory:PORT=8000 MONGODB_URI=your_mongodb_connection_string ACCESS_TOKEN_SECRET=your_access_token_secret REFRESH_TOKEN_SECRET=your_refresh_token_secret ACCESS_TOKEN_EXPIRY=1d REFRESH_TOKEN_EXPIRY=10d # Optional configurations CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret GEMINI_API_KEY=your_gemini_api_key
-
Start the Backend Server
cd backend npm run devBackend will run on
http://localhost:8000 -
Start the Frontend Server
cd frontend npm run devFrontend will run on
http://localhost:5173
- Access the application at
http://localhost:5173 - Register/Login as Student, Staff, or Admin
- Explore features based on your role:
- Students: Mark attendance, submit complaints, participate in voting
- Staff: Manage meals, view reports
- Admin: Manage users, resolve complaints, oversee operations
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logout
GET /api/attendance/- Get attendance recordsPOST /api/attendance/mark- Mark attendance
GET /api/complaints/- Get complaintsPOST /api/complaints/- Submit complaint
GET /api/voting/- Get voting pollsPOST /api/voting/vote- Cast vote
The system includes three main smart contracts:
- MessAttendance.sol - Handles attendance tracking
- ComplaintSystem.sol - Manages complaint lifecycle
- VotingSystem.sol - Powers the voting mechanism
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Vikas
- GitHub: @Vikas4245
- Thanks to all contributors who helped build this system
- Special thanks to the open-source community for the amazing tools and libraries
If you have any questions or issues, please feel free to:
- Open an issue on GitHub
- Contact the maintainer
β Star this repository if you found it helpful!