A comprehensive desktop application for managing restaurant table reservations, customer check-ins/check-outs, and real-time table occupancy tracking.
- 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
- Complete customer profile management
- Guest count tracking
- Customer history and statistics
- Preferred seating preferences
- Contact information management
- Real-time check-in processing
- Automatic table assignment
- Check-out management with billing integration
- Duration tracking
- Occupancy status updates
- Visual table layout representation
- Real-time occupancy status
- Table capacity management
- Floor plan organization
- Table availability tracking
- Daily revenue reports
- Customer occupancy statistics
- Peak hours analysis
- Table utilization metrics
- Monthly/yearly statistics
- Secure database connectivity (JDBC)
- Data validation and integrity
- Persistent storage with MySQL
- Error handling and logging
Java 11 or higher
MySQL 8.0 or higher
MySQL JDBC Driver (mysql-connector-java)
Any IDE (IntelliJ IDEA, Eclipse, NetBeans)-
Clone the repository
git clone https://github.com/rajsurya519sr/Dine-In-Java-.git cd Dine-In-Java- -
Database Setup
# Create MySQL database mysql -u root -p < database/schema.sql
-
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";
- Open
-
Add JDBC Driver
- Download MySQL JDBC Driver
- Add to classpath or project libraries
-
Run the Application
javac -d bin src/**/*.java java -cp bin:lib/* com.dine_in.App
- GUI Framework: Java Swing
- Layout Managers: BorderLayout, GridLayout, FlowLayout
- Components: JFrame, JPanel, JTable, JButton, JTextField
- Event Handling: ActionListener, ItemListener
- Language: Java 11+
- Database: MySQL 8.0+
- Database Driver: JDBC (mysql-connector-java)
- Architecture: MVC (Model-View-Controller)
- Customers table
- Reservations table
- Tables table
- Transactions table
- Logs table
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
- View today's reservations
- Check current table occupancy
- Quick statistics
- Recent transactions
1. Click "New Reservation"
2. Enter customer details
3. Select date and time
4. Choose table(s)
5. Confirm reservation
1. Search reservation
2. Verify customer details
3. Confirm table assignment
4. Record check-in time
1. Select table
2. Review duration
3. Apply any charges
4. Process payment
5. Record check-out
1. View table layout
2. Check occupancy status
3. Modify table capacity
4. Update table availability
CREATE TABLE customers (
customer_id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100),
phone VARCHAR(15),
email VARCHAR(100),
created_at TIMESTAMP
);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)
);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
);// Create new reservation
Reservation reservation = new Reservation();
reservation.setCustomerId(customerId);
reservation.setDate(date);
reservation.setTime(time);
reservationController.save(reservation);// Get reservation by ID
Reservation reservation = reservationController.getById(reservationId);// Update reservation
reservation.setStatus("COMPLETED");
reservationController.update(reservation);// Delete reservation
reservationController.delete(reservationId);| 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 |
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you found this project helpful, please consider:
- β Starring the repository
- π Sharing with others
- πΌ Using in your restaurant
- π¬ Providing feedback
Surya Raj
- GitHub: @rajsurya519sr
- LinkedIn: Surya Raj
- Email: rajsurya519sr@gmail.com
- Java Swing Documentation
- MySQL JDBC Driver
- Open Source Community
Made with β€οΈ by Surya Raj