- Introduction
- Project Overview
- Technologies Used
- Front-end
- Back-end
- Database
- Server Configuration
- Monitoring
- Installation and Setup
- Project Structure
- Bugs
- Authors
- License
This project is a clone of the AirBnB platform, built to demonstrate a full-stack web application using modern technologies. The project includes a front-end developed with HTML5, CSS, and JavaScript, a back-end using the Python Flask framework, and a MySQL database managed through SQLAlchemy ORM. The application is deployed on an Ubuntu server, with Nginx and HAproxy for load balancing, and monitored using Datadog.
The AirBnB Clone - Web Dynamic is the fourth segment of the AirBnB project at ALX / Holberton School that will collectively cover fundamental concepts of higher level programming. The goal of AirBnB project is to eventually deploy into our server a simple copy of the AirBnB Website.
- Front-end: HTML5, CSS, JavaScript
- Back-end: Python Flask framework, Restful API
- Database: MySQL
- ORM: SQLAlchemy ORM
- Server: Ubuntu 20.04 LTS, Nginx, HAproxy
- Monitoring: Datadog
HTML5 is used for structuring the web pages. It provides the semantic elements to create a well-organized document structure.
CSS is used for styling the web pages, ensuring a responsive and visually appealing design across different devices and screen sizes.
JavaScript is employed for dynamic interactions and client-side logic, enhancing the user experience through features like form validation, asynchronous requests, and interactive elements.
Flask is a lightweight WSGI web application framework in Python. It is used to build the back-end of the application, handling routing, templating, and serving static files.
The Restful API is designed to handle CRUD operations for different resources such as users, properties, bookings, and reviews. It follows REST principles, ensuring a stateless and scalable architecture.
MySQL is a relational database management system used to store and manage the application's data. It is chosen for its reliability, scalability, and ease of use.
SQLAlchemy is an ORM for Python that provides a high-level abstraction for database interactions. It is used to map Python classes to database tables and manage database sessions.
Ubuntu 20.04 LTS is the operating system used for deploying the application. It is a popular choice for servers due to its stability, security, and support for a wide range of software.
Nginx is used as a web server and reverse proxy server. It is configured to serve static files, handle incoming requests, and forward them to the Flask application.
HAproxy is used as a load balancer to distribute incoming traffic across multiple instances of the application, ensuring high availability and reliability.
Datadog is a monitoring and analytics platform used to track the application's performance and health. It provides insights into server metrics, application logs, and error tracking.
-
Clone the repository:
git clone https://github.com/happychuks/AirBnB_clone_v4.git cd AirBnB_clone_v4
-
Set up the virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install the dependencies:
pip3 install -r requirements.txt
-
Configure the database:
- Install MySQL and create a database.
- Update the database connection settings in the configuration file.
-
Start the API:
python3 -m api.v1.app #API entry point #on another terminal run: curl -s -XGET http://0.0.0.0:5000/<pageName>/
-
Start the application:
python3 -m web_dynamic.<pageName> #on another terminal run: curl -s -XGET http://0.0.0.0:5000/<pageName>/
-
Set up Nginx and HAproxy:
- Configure Nginx to serve the application and handle static files.
- Configure HAproxy to load balance the traffic.
-
Set up Datadog:
- Install the Datadog agent on the server.
- Configure the agent to monitor the application.
AirBnB_clone_v4/
├── api
│ └── v1
│ └── views
│ └── documentation
├── models
│ └── engine
├── tests
│ └── test_models
│ └── test_engine
├── versions
├── web_dynamic
│ ├── static
│ │ ├── images
│ │ ├── scripts
│ │ └── styles
│ └── templates
├── web_flask
│ |
│ ├── static
│ │ ├── images
│ │ └── styles
│ └── templates
└── web_static
├── images
└── styles
No known bugs at this time.
AirBnb_clone_v4
AirBnb_clone_v3
Airbnb_clone_v2
AirBnb_clone
Public Domain. No copy write protection.