This project was created as part of the "Python Developer" course on the Hexlet educational platform.
Page analyzer is a small yet full-fledged web application based on the Flask framework, which evaluates websites for SEO suitability.
This project applies the fundamental principles of building modern websites based on the MVC architecture, including routing, handling requests, templating, and interacting with the database.
To create the website's appearance, Bootstrap 5 framework is used along with the Jinja2 template engine. The frontend of the page is rendered on the server side. This means that the Jinja2 backend generates the prepared HTML, which is then rendered by the server.
PostgreSQL is used as the object-relational database system with the Psycopg library, allowing direct interaction with PostgreSQL from Python.
- Check, normalize, and add a new URL to the database;
- Check the site's availability;
- Collect data such as h1 tags, title, and description, add them to the database;
- Display a list of all added sites and the dates of their last checks;
- Display detailed information for each site;
- Submit URL for analysis; the application will automatically validate and normalize it.
- The URL will be added to the database for further analysis.
- Make sure the specified site is accessible.
- Retrieve detailed information about the page, including SEO-related metrics.
- Display a list of all added URLs for quick reference.
- Explore specific details for each entered URL on a dedicated page.
- Python
- Flask
- PostgreSQL
- Gunicorn
- Bootstrap 5
Check out the demo version deployed on Render: https://page-analyzer-app-yb5a.onrender.com/
Before starting the installation, make sure you have the following components installed:
- Python (version 3.10 or higher)
- PIP (version 24.0 or higher)
- PostgreSQL (version 16.2 or higher)
- Poetry (Python package installer)
- Git (version 2.43 or higher)
Execute the following command in your terminal to clone the repository to your local machine:
git clone git@github.com:Asgef/python-project-83.git
Navigate to the project directory and execute the command to install dependencies:
make install
Create a .env file in the root directory of the project and specify the necessary environment variables, for example:
DATABASE_URL = postgresql://{provider}://{user}:{password}@{host}:{port}/{db}
SECRET_KEY = '{your secret key}'
Create a PostgreSQL database if it does not exist yet:
make build
Launch the web application using the following command:
make start
Verification: Open a web browser and navigate to http://localhost:5000 to verify that the application has been successfully installed and is running.