Skip to content

Latest commit

Β 

History

History
115 lines (93 loc) Β· 3.41 KB

File metadata and controls

115 lines (93 loc) Β· 3.41 KB

Mess Menu

πŸ“Œ Project Overview

The Mess Menu Management System is a web application designed to streamline the process of managing and displaying daily meal menus for a mess or cafeteria. The system includes two interfaces:

  1. Mess Management Dashboard – Allows mess admins to manage and edit the menu
  2. Public Menu Page – Displays the menu (breakfast, lunch, snacks, dinner) for everyone

πŸš€ Features

  • Intelligent Menu Display: Automatically shows relevant meal type based on time of day
  • Dynamic Menu Management: Edit menu items for breakfast, lunch, snacks, and dinner
  • Special Snacks Menu: Categorized snacks with items and prices
  • Protected Admin Access: Secure JWT-based authentication for mess management
  • Clean UI: Elegant interface with Cormorant Garamond and Kaisei Decol fonts
  • Responsive Design: Optimized for all screen sizes
  • Real-time Updates: Instant menu updates with automated cache management

πŸ› οΈ Tech Stack

  • Frontend: React + Vite
  • Styling: Tailwind CSS
  • Backend: Node.js + Express.js
  • Database: MongoDB
  • State Management: React Hooks
  • Authentication: JWT
  • Caching: Client-side caching for optimized performance

πŸ“‚ Project Structure

πŸ“ mess-menu
β”œβ”€β”€ πŸ“‚ client
β”‚   β”œβ”€β”€ πŸ“‚ src
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components
β”‚   β”‚   β”‚   β”œβ”€β”€ DateSelector.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Line.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ MenuItems.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ MenuTypeSelector.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ProtectedRoute.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ RegularMenu.jsx
β”‚   β”‚   β”‚   └── SnacksMenu.jsx
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages
β”‚   β”‚   β”‚   β”œβ”€β”€ MenuPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ MessDashboard.jsx
β”‚   β”‚   β”‚   └── MessLogin.jsx
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ services
β”‚   β”‚   β”‚   └── api.js
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ App.css
β”‚   β”‚   β”œβ”€β”€ index.css
β”‚   β”‚   └── main.jsx
β”œβ”€β”€ πŸ“‚ server
β”‚   β”œβ”€β”€ πŸ“‚ controllers
β”‚   β”‚   β”œβ”€β”€ authController.js
β”‚   β”‚   └── menuController.js
β”‚   β”œβ”€β”€ πŸ“‚ middleware
β”‚   β”‚   └── authMiddleware.js
β”‚   β”œβ”€β”€ πŸ“‚ models
β”‚   β”‚   β”œβ”€β”€ menuModel.js
β”‚   β”‚   └── User.js
β”‚   β”œβ”€β”€ πŸ“‚ routes
β”‚   β”‚   β”œβ”€β”€ authRoutes.js
β”‚   β”‚   └── menuRoutes.js
β”‚   β”œβ”€β”€ πŸ“‚ utils
β”‚   β”‚   └── cache.js
β”‚   β”œβ”€β”€ app.js
β”‚   └── db.js

πŸ”— API Endpoints

Auth Routes

Method Endpoint Description
POST /api/auth/login Admin login
POST /api/auth/logout Admin logout

Menu Routes

Method Endpoint Description
GET /api/menu/all Get all menus
GET /api/menu/:type Get specific menu type
PUT /api/menu/:type Update menu (Protected)

πŸ—οΈ Local Development

  1. Clone and navigate:
git clone https://github.com/AbhishekPal634/mess-menu.git
cd mess-menu
  1. Install dependencies:
# Backend setup
cd server
npm install
npm start

# Frontend setup (new terminal)
cd client
npm install
npm run dev
  1. Environment setup:
  • Create server/.env with MongoDB URL and JWT secret
  • Create client/.env with VITE_API_URL