This project is a comprehensive hotel booking and management system developed as part of an assignment. It features two main components:
-
Booking Frontend
- A user-friendly interface for browsing and booking hotel rooms.
- Display of room types, descriptions, pricing, and features.
- A booking form with input validation to ensure proper data entry.
- User authentication for secure access.
-
Admin Dashboard
- A management interface for administrators to handle bookings.
- Features include searching, filtering, modifying, and deleting bookings.
- CLI commands for managing rooms and users.
- Responsive Design: The interface adapts to various screen sizes, ensuring usability on all devices.
- Room Details: Users can view detailed room descriptions, images, and features.
- Booking Form: An easy-to-use form for booking rooms, with validation for check-in and check-out dates.
- Authentication: Secure login system for admin access and session-based user authentication.
- Flask Application:
- Routes for booking, user authentication, and admin functionalities.
- Integration with PostgreSQL for data storage and retrieval.
- Database Models:
Room
model for storing room details.Booking
model for managing booking records.User
model for handling admin accounts.
- View all bookings with the ability to search and filter by various criteria.
- Edit and delete bookings directly from the dashboard.
- Add and update room data via CLI commands.
Integrated chatbot to assist users with questions about room options, bookings, and nearby attractions.
Powered by OpenAI GPT-3.5 for natural and interactive conversations.
Provides personalized responses based on user queries.
- Functionality for sending email confirmations for bookings (not yet implemented).
- The project is ready for deployment on platforms like Heroku, AWS, or GCP.
- Configurable for deployment with environment variables for sensitive data.
- Frontend: HTML, CSS, JavaScript, Bootstrap
- Backend: Flask (Python)
- Database: PostgreSQL
- Python 3.8+
- PostgreSQL installed and configured
-
Clone the repository
git clone <repository_url> cd <repository_folder>
-
Install dependencies
pip install -r requirements.txt
-
Set up the database
- Update the
SQLALCHEMY_DATABASE_URI
inapp.config
to match your PostgreSQL setup. - Initialize the database:
flask init-db
- Update the
-
Run the application
flask run
Access the application at
http://127.0.0.1:5000/
. -
Create an admin user
flask create-user
- Access the homepage to browse available room options.
- View room details and initiate a booking.
- Fill in the booking form with required details.
- Log in with admin credentials.
- Manage bookings by searching, editing, or deleting records.
- View and update room data as necessary.
-
Users
id
: Primary keyusername
: Unique usernamepassword
: Hashed password
-
Rooms
id
: Primary keytype
: Room type (e.g., single, double)name
: Room nameprice
: Price per nightmax_occupancy
: Maximum number of guestsimage_urls
: Image URLs (comma-separated)features
: JSON object of room features
-
Bookings
id
: Primary keycheck_in
: Check-in datecheck_out
: Check-out dateroom_type
: Type of room bookeduser_name
: Name of the useruser_email
: Email of the user
- Integration with a payment gateway for secure transactions.
- Automated email notifications for booking confirmations and reminders.
- Enhanced admin functionalities, such as room availability visualization.
- Multi-language support for international users.
For any questions or feedback, please contact:
- Email: [email protected]
- Developer: 賴致帆&周翰文