Skip to content

CafeOrd is a Java-based canteen management app with a secure login, interactive menu, and real-time order summary. Users select items, set quantities, and see total costs instantly. Built using Java Swing and MySQL, it streamlines canteen operations, offering a simple, efficient experience for both staff and customers.

License

Notifications You must be signed in to change notification settings

ajsike2310/CanteenManagementSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☕ CafeOrd - Canteen Management System 🍽️

A Java desktop application for managing canteen orders. CafeOrd provides a modern, user-friendly interface for placing orders, logging in securely, and viewing detailed order summaries. The system uses Java Swing for the interface and MySQL for database storage.

📋 Features

  • Login Interface: Secure login system for users, with stored credentials in MySQL.
  • Interactive Menu: Select items, adjust quantities, and see price calculations in real-time.
  • Order Summary: View selected items with total cost, shown before finalizing the order.
  • Database Integration: Users, orders, and items are stored in a MySQL database for persistent data handling.

⚙️ Prerequisites

Before running the application, make sure you have:

  • Java Development Kit (JDK) version 8 or higher.
  • MySQL Database installed and configured with the canteen schema.
  • MySQL Connector for Java to establish database connections.

📦 Setup Instructions

Step 1: Clone the Repository

git clone https://github.com/your-username/CanteenManagementSystem.git
cd CanteenManagementSystem

Step 2: Set Up the Database

  1. Launch MySQL and create a new database for the project.
  2. Run the following commands to create the required tables:
CREATE DATABASE canteen_db;
USE canteen_db;

CREATE TABLE user ( id INT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(50) UNIQUE, password VARCHAR(50) );

Step 3: Configure Database Connection in Code

  1. Open CanteenManagementSystem.java.
  2. Update database credentials in the connectDatabase() method:
String url = "jdbc:mysql://localhost:3306/canteen_db";
String user = "root";
String password = "your_password";

Step 4: Compile and Run the Application

javac CanteenManagementSystem.java
java CanteenManagementSystem

🎮 Usage

  1. Login: Enter username and password to access the system.
  2. Browse Menu: Select items, adjust quantities, and see calculated costs.
  3. Place Order: Review your order and submit for processing.

📁 Project Structure

CafeOrd/
├── src/
│   └── CanteenManagementSystem.java
└── README.md

📚 Dependencies

  • Java Swing for user interface design.
  • MySQL Connector to connect Java to the MySQL database.

🚀 Future Enhancements

  • Role-based Access: Separate views for customers and staff.
  • Order History: Save past orders and allow users to view them.
  • Enhanced UI: Add more customization and theme options.

About

CafeOrd is a Java-based canteen management app with a secure login, interactive menu, and real-time order summary. Users select items, set quantities, and see total costs instantly. Built using Java Swing and MySQL, it streamlines canteen operations, offering a simple, efficient experience for both staff and customers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages