This Cruise Booking Web Application is a comprehensive system designed to facilitate the process of browsing, selecting, and booking cruise trips. Developed as part of the Introduction to Databases course at Columbia University, this project showcases database management skills, web development proficiency, and software engineering practices.
- User Authentication: Custom implementation of user registration and login functionality.
- Cruise Search: Functionality allowing users to find cruises based on various criteria.
- Company and Cruise Details: Detailed views for cruise companies and individual cruise offerings.
- Booking Management: System for users to book cruises and view their booking history.
- Personalized Recommendations: Basic algorithm to suggest random cruises based on user preferences.
- Backend: Python 3.x, Flask 2.2.3
- Database: PostgreSQL
- ORM: SQLAlchemy 2.0.7, Flask-SQLAlchemy 3.0.3
- Frontend: HTML, Jinja2 templates
- Deployment: The application is designed to be run locally, but could be adapted for production deployment
The application uses a relational database with the following main tables:
-
credentials
- cred_id (PK)
- cust_username
- cust_password
-
customers_cred
- cust_id (PK)
- cred_id (FK to credentials)
- cust_name
- cust_budget
- cust_specialty
- cust_rating
-
companies
- comp_id (PK)
- comp_name
- comp_rating
-
cruises
- cruise_id (PK)
- comp_id (FK to companies)
- cruise_name
- cruise_cost
- cruise_capacity
- cruise_start_date
- cruise_end_date
- cruise_rating
-
destinations
- dest_id (PK)
- dest_name
- dest_country
- dest_climate
- dest_specialty
- dest_is_domestic
-
sail_to (Association table)
- cruise_id (FK to cruises)
- dest_id (FK to destinations)
-
sail_from (Association table)
- cruise_id (FK to cruises)
- dest_id (FK to destinations)
-
booking_records
- book_id (PK)
- comp_id (FK to companies)
- cust_id (FK to customers_cred)
- cruise_id (FK to cruises)
This schema demonstrates database design concepts including:
- Use of primary and foreign keys
- Many-to-many relationships (cruises to destinations)
- Data normalization to minimize redundancy
cruise_booking_app/
├── app/
│ ├── __init__.py
│ ├── models.py
│ ├── routes.py
│ └── templates/
│ ├── home.html
│ ├── login.html
│ ├── register.html
│ ├── user_home.html
│ ├── company_detail.html
│ ├── cruise_detail.html
│ ├── booking_records.html
│ ├── random_cruise.html
│ ├── booking_results.html
│ ├── direct_book.html
│ └── direct_cruise.html
├── config.py
├── run.py
├── requirements.txt
└── README.md
This structure follows a basic Flask application pattern, promoting modularity and scalability.
-
Clone the repository:
git clone https://github.com/yourusername/cruise-booking-app.git cd cruise-booking-app
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install required packages:
pip install -r requirements.txt
-
Set up the PostgreSQL database and update
config.py
with your database URI. -
Run the application:
python run.py
-
Access the application at
http://localhost:8111
- Register a new account or log in with existing credentials.
- Browse available cruises or use the search functionality to find specific options.
- View detailed information about cruises and cruise companies.
- Book a cruise and manage your bookings through the user dashboard.
- Receive basic cruise recommendations based on your preferences.
- Implement Flask-Login for more robust user authentication
- Utilize Flask-WTF for better form handling and CSRF protection
- Integrate Flask-Migrate for easier database schema management
- Enhance the frontend with CSS frameworks and JavaScript for a more interactive user experience
- Set up Gunicorn and a production-grade web server for deployment
- Implement real-time availability checking and booking
- Add a review and rating system for users to rate their cruise experiences
- Integrate a payment gateway for online payments
- Develop an admin interface for managing application data
- Implement data analytics for business intelligence
- Professor Luis Gravano and the TAs of the Introduction to Databases course at Columbia University for their guidance and support.
- http://www.cs.columbia.edu/~gravano/cs4111/