TourMateBD is a Java-based hotel booking application that enables users to register, log in, and book hotels at various tour places. Administrators can manage tour places, hotels, rooms, users, and bookings through a Swing-based graphical interface. The application uses MySQL for data persistence and Apache PDFBox for generating PDF reports.
- Features
- Technologies
- Project Structure
- Setup Instructions
- Usage
- Database Schema
- Contributing
- License
- User registration with name, email, and password.
- Separate login interfaces for regular users and admins.
- Admin panel to view and manage all users.
- Add tour places with details (name, description, address, coordinates).
- Associate photos with tour places.
- Add hotels linked to tour places.
- Add rooms with type, price, and capacity.
- Users can create bookings by selecting tour places, hotels, rooms, and dates.
- Admins can view all bookings, filter them, and update statuses (Pending, Confirmed, Canceled).
- Search bookings by user or criteria.
- Export bookings to PDF reports.
- Homepage with options for user login, admin login, and registration.
- User dashboard for viewing tour places and managing bookings.
- Admin panel with forms for managing data and viewing reports.
- Java: Core programming language.
- Swing: For the graphical user interface.
- MySQL: Database for storing users, tour places, hotels, rooms, bookings, and photos.
- JDBC: For database connectivity.
- Apache PDFBox: For generating PDF reports.
- MySQL Connector/J for JDBC.
- Apache PDFBox for PDF generation.
TourMateBD/
├── src/
│ ├── controller/
│ │ └── UserController.java # Handles user registration and login logic
│ ├── dao/
│ │ ├── BookingDAO.java # Manages booking-related database operations
│ │ ├── DBConnection.java # Manages MySQL database connections
│ │ ├── HotelDAO.java # Manages hotel-related database operations
│ │ ├── RoomDAO.java # Manages room-related database operations
│ │ ├── TourPlaceDAO.java # Manages tour place and photo operations
│ │ └── UserDAO.java # Manages user-related database operations
│ ├── model/
│ │ └── User.java # User entity model
│ ├── ui/
│ │ ├── AdminPanelUI.java # Admin panel UI for managing data
│ │ ├── HomePageUI.java # Homepage UI for login/registration
│ │ ├── LoginUI.java # Login UI for users and admins
│ │ ├── MainDashboardUI.java # User dashboard UI for bookings and tour places
│ │ └── RegistrationUI.java # User registration UI
├── README.md # Project documentation
├── Database.md
- Java Development Kit (JDK) 8 or higher.
- MySQL Server (version 8.0 or compatible).
- Maven for dependency management.
- MySQL Connector/J and Apache PDFBox libraries (add to
pom.xml).
- Create a MySQL database named
TourMateBD. - Execute the SQL script in
database.mdto create required tables.
- Update the
DBConnection.javafile with your MySQL credentials (replace default username and password).
- Launch the application to see the homepage (
HomePageUI). - Choose from the following options:
- User Login: Access the user dashboard.
- Admin Login: Access the admin panel.
- User Registration: Register a new user account.
- Enter name, email, and password.
- Basic email validation checks for the presence of
@and.. - On successful registration, the user is redirected to the homepage.
- Errors such as duplicate email or invalid input will be displayed.
- Enter your email and password.
- Choose whether to log in as a user or admin.
- A successful login redirects to the appropriate dashboard:
- Users →
MainDashboardUI - Admins →
AdminPanelUI
- Users →
- View a list of available tour places.
- Book rooms by selecting:
- Tour place
- Hotel
- Room
- Date (format:
YYYY-MM-DD)
- View and manage existing bookings (status starts as Pending).
- Add and manage:
- Tour places
- Hotels
- Rooms
- Users
- View all bookings and update their statuses:
- Pending
- Confirmed
- Canceled
- Export booking data to PDF reports.
- Each export action is logged in the
pdf_logstable.
- Each export action is logged in the
The application uses a MySQL database named TourMateBD.
- The database includes the following tables:
userstour_placesphotoshotelsroomsbookingspdf_logs
📄 For detailed schema information and SQL table creation statements, see
Database.mdin the project root.
This project was developed as a 1st Year 2nd Semester Java Project by the following team members:
-
Ekramul Hoque
- 📧 Email: bsse1628@iit.du.ac.bd
-
Rokib Ikbal
- 📧 Email: bsse1605@iit.du.ac.bd
For any inquiries related to this project, feel free to reach out to the contributors via email.
This project is open-source and available under the MIT License.