Skip to content

rajsurya519sr/Dine-In-Java-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🝴 Dine-In Restaurant Management System

Desktop Application for Table Reservations & Management

Java Swing MySQL Status

A comprehensive desktop application for managing restaurant table reservations, customer check-ins/check-outs, and real-time table occupancy tracking.

Report Bug β€’ Request Feature


πŸŽ‰ Features

πŸ“‹ Reservation Management

  • Easy reservation booking with date and time selection
  • Customer information storage (name, phone, email)
  • Multiple table selection and allocation
  • Reservation confirmation system
  • Cancel and modify reservations

πŸ“„ Customer Management

  • Complete customer profile management
  • Guest count tracking
  • Customer history and statistics
  • Preferred seating preferences
  • Contact information management

πŸ—£οΈ Check-In/Check-Out System

  • Real-time check-in processing
  • Automatic table assignment
  • Check-out management with billing integration
  • Duration tracking
  • Occupancy status updates

πŸ“‹ Real-Time Table Management

  • Visual table layout representation
  • Real-time occupancy status
  • Table capacity management
  • Floor plan organization
  • Table availability tracking

πŸ“Š Analytics & Reports

  • Daily revenue reports
  • Customer occupancy statistics
  • Peak hours analysis
  • Table utilization metrics
  • Monthly/yearly statistics

πŸ” Data Security

  • Secure database connectivity (JDBC)
  • Data validation and integrity
  • Persistent storage with MySQL
  • Error handling and logging

πŸš€ Getting Started

Prerequisites

Java 11 or higher
MySQL 8.0 or higher
MySQL JDBC Driver (mysql-connector-java)
Any IDE (IntelliJ IDEA, Eclipse, NetBeans)

Installation

  1. Clone the repository

    git clone https://github.com/rajsurya519sr/Dine-In-Java-.git
    cd Dine-In-Java-
  2. Database Setup

    # Create MySQL database
    mysql -u root -p < database/schema.sql
  3. Update Database Configuration

    • Open config/DatabaseConfig.java
    • Update MySQL credentials:
      String url = "jdbc:mysql://localhost:3306/dine_in";
      String user = "your_username";
      String password = "your_password";
  4. Add JDBC Driver

    • Download MySQL JDBC Driver
    • Add to classpath or project libraries
  5. Run the Application

    javac -d bin src/**/*.java
    java -cp bin:lib/* com.dine_in.App

πŸ’Ό Tech Stack

Frontend

  • GUI Framework: Java Swing
  • Layout Managers: BorderLayout, GridLayout, FlowLayout
  • Components: JFrame, JPanel, JTable, JButton, JTextField
  • Event Handling: ActionListener, ItemListener

Backend

  • Language: Java 11+
  • Database: MySQL 8.0+
  • Database Driver: JDBC (mysql-connector-java)
  • Architecture: MVC (Model-View-Controller)

Database Schema

  • Customers table
  • Reservations table
  • Tables table
  • Transactions table
  • Logs table

πŸ“Š Project Structure

Dine-In-Java-/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ com/dine_in/
β”‚   β”‚   β”œβ”€β”€ App.java              # Main application entry point
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”‚   β”œβ”€β”€ Customer.java
β”‚   β”‚   β”‚   β”œβ”€β”€ Reservation.java
β”‚   β”‚   β”‚   β”œβ”€β”€ Table.java
β”‚   β”‚   β”‚   └── Transaction.java
β”‚   β”‚   β”œβ”€β”€ views/
β”‚   β”‚   β”‚   β”œβ”€β”€ MainFrame.java
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardPanel.java
β”‚   β”‚   β”‚   β”œβ”€β”€ ReservationPanel.java
β”‚   β”‚   β”‚   └── TablePanel.java
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”‚   β”œβ”€β”€ ReservationController.java
β”‚   β”‚   β”‚   β”œβ”€β”€ TableController.java
β”‚   β”‚   β”‚   └── CustomerController.java
β”‚   β”‚   β”œβ”€β”€ database/
β”‚   β”‚   β”‚   β”œβ”€β”€ DatabaseConnection.java
β”‚   β”‚   β”‚   β”œβ”€β”€ DatabaseConfig.java
β”‚   β”‚   β”‚   └── Query.java
β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”‚   β”œβ”€β”€ Logger.java
β”‚   β”‚   β”‚   └── Validator.java
β”‚   β”‚   └── exceptions/
β”‚   β”‚       └── DatabaseException.java
β”œβ”€β”€ database/
β”‚   └── schema.sql
β”œβ”€β”€ lib/
β”‚   └── mysql-connector-java-8.0.jar
β”œβ”€β”€ bin/                # Compiled classes
β”œβ”€β”€ docs/               # Documentation
└── README.md

🏧 Usage

Main Features Overview

1. Dashboard

  • View today's reservations
  • Check current table occupancy
  • Quick statistics
  • Recent transactions

2. Make a Reservation

1. Click "New Reservation"
2. Enter customer details
3. Select date and time
4. Choose table(s)
5. Confirm reservation

3. Check-In Customer

1. Search reservation
2. Verify customer details
3. Confirm table assignment
4. Record check-in time

4. Check-Out Customer

1. Select table
2. Review duration
3. Apply any charges
4. Process payment
5. Record check-out

5. Manage Tables

1. View table layout
2. Check occupancy status
3. Modify table capacity
4. Update table availability

πŸ“š Database Schema

Customers Table

CREATE TABLE customers (
    customer_id INT PRIMARY KEY AUTO_INCREMENT,
    name VARCHAR(100),
    phone VARCHAR(15),
    email VARCHAR(100),
    created_at TIMESTAMP
);

Reservations Table

CREATE TABLE reservations (
    reservation_id INT PRIMARY KEY AUTO_INCREMENT,
    customer_id INT,
    reservation_date DATE,
    reservation_time TIME,
    guest_count INT,
    table_id INT,
    status VARCHAR(20),
    created_at TIMESTAMP,
    FOREIGN KEY (customer_id) REFERENCES customers(customer_id)
);

Tables Table

CREATE TABLE restaurant_tables (
    table_id INT PRIMARY KEY AUTO_INCREMENT,
    table_number INT,
    capacity INT,
    location VARCHAR(50),
    status VARCHAR(20),
    created_at TIMESTAMP
);

πŸ“ CRUD Operations

Create

// Create new reservation
Reservation reservation = new Reservation();
reservation.setCustomerId(customerId);
reservation.setDate(date);
reservation.setTime(time);
reservationController.save(reservation);

Read

// Get reservation by ID
Reservation reservation = reservationController.getById(reservationId);

Update

// Update reservation
reservation.setStatus("COMPLETED");
reservationController.update(reservation);

Delete

// Delete reservation
reservationController.delete(reservationId);

πŸ“¨ Keyboard Shortcuts

Shortcut Action
Ctrl+N New Reservation
Ctrl+E Edit Reservation
Ctrl+D Delete Reservation
Ctrl+S Save Changes
Ctrl+F Find Reservation
F5 Refresh Data
Esc Cancel Operation

πŸ‘‹ Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create your 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.


πŸ™‹ Support

If you found this project helpful, please consider:

  • ⭐ Starring the repository
  • πŸ“ Sharing with others
  • πŸ’Ό Using in your restaurant
  • πŸ’¬ Providing feedback

πŸ‘€ Author

Surya Raj


πŸ’« Acknowledgments

  • Java Swing Documentation
  • MySQL JDBC Driver
  • Open Source Community

Made with ❀️ by Surya Raj

Back to top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages