Skip to content

Vikas4245/Mess-Management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍽️ Mess Management System

A comprehensive full-stack web application for managing hostel/college mess operations with blockchain integration for transparency and security.

πŸš€ Features

πŸ” Authentication & Authorization

  • Multi-role authentication: Students, Staff, and Admin
  • JWT-based secure authentication
  • Role-based access control

πŸ“Š Attendance Management

  • QR code-based attendance tracking
  • Real-time attendance monitoring
  • Automated attendance reports

πŸ“ Complaint Management

  • Submit and track complaints
  • Blockchain-powered transparency
  • Admin complaint resolution system

πŸ—³οΈ Voting System

  • Democratic voting for mess-related decisions
  • Blockchain-secured voting mechanism
  • Real-time vote counting

πŸ’° Token System

  • Digital token management
  • Reward system for students
  • Token transaction history

πŸ“± Additional Features

  • Feedback collection system
  • QR code generation and scanning
  • File upload with Cloudinary integration
  • AI-powered assistance with Google Gemini

πŸ› οΈ Tech Stack

Frontend

  • React 18 - Modern UI library
  • Vite - Fast build tool
  • Tailwind CSS - Utility-first CSS framework
  • React Router - Client-side routing
  • Axios - HTTP client

Backend

  • Node.js - Runtime environment
  • Express.js - Web framework
  • MongoDB - NoSQL database
  • Mongoose - MongoDB ODM
  • JWT - Authentication tokens
  • Bcrypt - Password hashing

Blockchain

  • Ethereum - Smart contract platform
  • Solidity - Smart contract language
  • Hardhat - Development framework
  • Ethers.js - Ethereum library

Third-party Services

  • Cloudinary - Image and file management
  • Google Gemini AI - AI integration
  • MongoDB Atlas - Cloud database

πŸ“ Project Structure

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

πŸš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • MongoDB
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/Vikas4245/Mess-Management-system.git
    cd Mess-Management-system
  2. Backend Setup

    cd backend
    npm install
  3. Frontend Setup

    cd frontend
    npm install
  4. Environment Configuration

    Create .env file 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

πŸƒβ€β™‚οΈ Running the Application

  1. Start the Backend Server

    cd backend
    npm run dev

    Backend will run on http://localhost:8000

  2. Start the Frontend Server

    cd frontend
    npm run dev

    Frontend will run on http://localhost:5173

πŸ“± Usage

  1. Access the application at http://localhost:5173
  2. Register/Login as Student, Staff, or Admin
  3. 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

πŸ”§ API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • POST /api/auth/logout - User logout

Attendance

  • GET /api/attendance/ - Get attendance records
  • POST /api/attendance/mark - Mark attendance

Complaints

  • GET /api/complaints/ - Get complaints
  • POST /api/complaints/ - Submit complaint

Voting

  • GET /api/voting/ - Get voting polls
  • POST /api/voting/vote - Cast vote

🌐 Smart Contracts

The system includes three main smart contracts:

  1. MessAttendance.sol - Handles attendance tracking
  2. ComplaintSystem.sol - Manages complaint lifecycle
  3. VotingSystem.sol - Powers the voting mechanism

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Vikas

πŸ™ Acknowledgments

  • Thanks to all contributors who helped build this system
  • Special thanks to the open-source community for the amazing tools and libraries

πŸ“ž Support

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!

About

Full-stack mess management system with blockchain integration. Features student/staff authentication, attendance tracking, complaint management, voting system, and QR code functionality. Built with Node.js, Express, React, MongoDB, and Ethereum smart contracts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors