Skip to content

Latest commit

Β 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍽️ Cafeteria Management System

A Java-based cafeteria management system designed to manage students, staff, menu items, orders, authentication, loyalty points, and reports through a user-friendly graphical interface.


πŸ“Œ About the Project

The Cafeteria Management System is a desktop application developed using Java Swing and MongoDB.

The system provides separate functionality for students and staff. Students can register, log in, browse cafeteria items, place orders, and manage their loyalty points. Staff members can manage cafeteria operations, students, menu items, orders, and reports.

This project demonstrates Object-Oriented Programming, GUI development, database integration, authentication, CRUD operations, and software project organization.


✨ Features

πŸŽ“ Student Features

  • Student registration
  • Student login
  • Student authentication
  • Browse cafeteria menu
  • Place orders
  • View orders
  • Loyalty points management
  • Student account management

πŸ‘¨β€πŸ’Ό Staff Features

  • Staff login
  • Staff dashboard
  • Manage students
  • Manage menu items
  • Manage orders
  • View cafeteria information
  • Generate reports

πŸ” Authentication

  • Student authentication
  • Staff authentication
  • Role-based access
  • Separate student and staff dashboards

πŸ—„οΈ Database Integration

  • MongoDB database integration
  • Student data persistence
  • MongoDB Java Driver
  • Local MongoDB database

πŸ› οΈ Technologies Used

  • Java 21
  • Java Swing
  • Maven
  • MongoDB
  • MongoDB Java Driver
  • Git
  • GitHub
  • Object-Oriented Programming (OOP)

πŸ“‚ Project Structure

cafeteria-management-system/
β”‚
β”œβ”€β”€ Authenticatable.java
β”œβ”€β”€ AuthenticationService.java
β”œβ”€β”€ CafeteriaApp.java
β”œβ”€β”€ CafeteriaSystem.java
β”œβ”€β”€ CafeteriaSystemGUI.java
β”œβ”€β”€ LoginFrame.java
β”œβ”€β”€ LoyaltyManager.java
β”œβ”€β”€ MenuItem.java
β”œβ”€β”€ MenuManager.java
β”œβ”€β”€ MongoDBConnection.java
β”œβ”€β”€ OrderItem.java
β”œβ”€β”€ OrderManager.java
β”œβ”€β”€ OrderService.java
β”œβ”€β”€ ReportService.java
β”œβ”€β”€ Staff.java
β”œβ”€β”€ StaffDashboard.java
β”œβ”€β”€ StaffLoginDialog.java
β”œβ”€β”€ StaffManager.java
β”œβ”€β”€ Student.java
β”œβ”€β”€ StudentDashboard.java
β”œβ”€β”€ StudentLoginDialog.java
β”œβ”€β”€ StudentOrder.java
β”œβ”€β”€ StudentManager.java
β”œβ”€β”€ UITheme.java
β”‚
β”œβ”€β”€ screenshots/
β”‚   β”œβ”€β”€ login.png
β”‚   β”œβ”€β”€ student-dashboard.png
β”‚   β”œβ”€β”€ cafeteria-menu.png
β”‚   └── staff-dashboard.png
β”‚
β”œβ”€β”€ pom.xml
β”œβ”€β”€ RUN_GUI.txt
└── README.md

πŸ—„οΈ MongoDB Database

The application uses MongoDB to store student information.

Database

cafeteria_db

Collection

students

Local Connection

mongodb://localhost:27017

MongoDB must be running locally for the database features to work correctly.


πŸ–₯️ Graphical User Interface

The application uses Java Swing to provide a graphical interface for students and staff.

The main GUI entry point is:

CafeteriaSystemGUI.java

The application includes:

  • Login interface
  • Student dashboard
  • Cafeteria menu
  • Order management
  • Staff dashboard
  • Colorful and user-friendly interface

πŸ“Έ Application Screenshots

πŸ” Login

Cafeteria Login

πŸŽ“ Student Dashboard

Student Dashboard

πŸ” Cafeteria Menu

Cafeteria Menu

πŸ‘¨β€πŸ’Ό Staff Dashboard

Staff Dashboard

▢️ How to Run

1️⃣ Requirements

Make sure you have installed:

  • Java 21
  • Maven
  • MongoDB
  • Git

2️⃣ Start MongoDB

Make sure your local MongoDB server is running.

The application connects to:

mongodb://localhost:27017

3️⃣ Clone the Repository

git clone https://github.com/CAROLJOY26/cafeteria-management-system.git

Then open the project folder:

cd cafeteria-management-system

4️⃣ Compile the Project

Run:

mvn clean compile

5️⃣ Run the GUI

The main GUI class is:

CafeteriaSystemGUI

The application starts with the login screen.


πŸ”„ Application Workflow

                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚   Cafeteria System  β”‚
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
                    β”‚    Login    β”‚
                    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚                         β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
       β”‚   Student   β”‚           β”‚    Staff    β”‚
       β”‚    Login    β”‚           β”‚    Login    β”‚
       β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
              β”‚                         β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚    Student     β”‚        β”‚     Staff      β”‚
       β”‚   Dashboard    β”‚        β”‚    Dashboard   β”‚
       β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚                         β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚ Menu & Orders  β”‚        β”‚ Management &   β”‚
       β”‚ Loyalty Points β”‚        β”‚    Reports     β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎯 Learning Objectives

This project demonstrates practical experience with:

  • Object-Oriented Programming
  • Java application development
  • Java Swing GUI development
  • MongoDB database integration
  • Maven dependency management
  • Authentication systems
  • CRUD operations
  • Software architecture
  • Git and GitHub
  • Project organization and documentation

πŸš€ Future Improvements

Possible future improvements include:

  • Password hashing and improved security
  • Persistent loyalty point storage
  • Advanced order tracking
  • Online payment integration
  • Improved reporting and analytics
  • Admin account management
  • Better database validation
  • Cloud database deployment
  • More responsive UI design

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

Carol Joseph Gorgi

GitHub: CAROLJOY26

About

Java-based cafeteria management system with a Swing GUI, MongoDB database, student management, menu, orders, and loyalty features.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages