This project is a Office Lunch Menu Management System that allows admins to manage lunch menus and options, and employees to select their lunch choices.
- Backend: Node.js, Express.js, Sequelize, PostgreSQL
- Frontend: React.js, Axios
- Authentication: JWT (JSON Web Tokens)
- Admin Features:
- Add new lunch menus and options for specific dates.
- View employee choices for lunch options.
- Employee Features:
- Register and log in to the system.
- View available lunch options for the current day.
- Select their lunch choice.
The database schema includes the following tables:
-
Users: Stores user information.
id
: Primary Keyname
: Stringemail
: Stringpassword
: Stringrole
: String (admin or employee)
-
Menus: Stores menu information for specific dates.
id
: Primary Keydate
: Date
-
MenuOptions: Stores lunch options for menus.
id
: Primary KeyMenuId
: Foreign Key (References Menus)option_name
: String
-
Choices: Stores employee choices for lunch options.
id
: Primary KeyUserId
: Foreign Key (References Users)MenuOptionId
: Foreign Key (References MenuOptions)
**Run Backend: 1.npm install 2.npm start **Run Frontend: 1.npm install 2.npm start
Access the application:
- Backend API:
http://localhost:5000
- Frontend:
http://localhost:3000
DATABASE_USER=your_database_user
DATABASE_PASSWORD=your_database_password
DATABASE_NAME=your_database_name
DATABASE_HOST=your_database_host
JWT_SECRET=your_jwt_secret