Development of the Backend part of the site using the Framwar Flask (Python).The project includes the creation of Restful API for processing queries, integration with a database with PostgreSQL or SQLite), an authentication system, and an admin panel (FLASK-DMIN) to control the content.This is a lightweight, scalable solution for web applications, such as blogs, Dashboards or E-Commerce Backend.Framivork Flask is chosen for simplicity, flexibility and minimalism, which allows you to quickly prototype and deploy applications.Suitable for demonstrating web development skills in the portfolio, including work with routes, templates (Jinja2), forms (WTFORMS) and Deflow (Gunicorn + Nginx).
- The principle of work:
- Application structure: Blueprint-modality is used for organizing code (separation into modules: Auth, API, Admin).The main file of App.py initializes the flask application, records Blueprints and sets up expansion (FlaSk-SQLalchemy for the database, FlaSk-Migrate for migration).
- API Endpoints: Creation of Restful API with routes for Crud operations (for example,/API/Users for Get/Post/Put/Delete).Json-data processing through Request.json, validation with Marshmallow.Example: @app.route ('/API/ExamPles', Methods = ['Get']) returns a list of projects to JSON.
- Database: Data models are defined as classes (Class user (db.model)), with fields (ID, Username, Password_hash).ORM integration for requests (user.query.all ()).Migration through alembic for updating the scheme.
- Authentication: Login/registration with password hash registration (Werkzeug).Protection of routes by decorators (@login_required).JWT-TOCEN for API authentication.
- Admin Panel: Flask-Dmin for the CRUD interface over models (Admin.add_View (ModelView (User, Db.Session)))).Castomization of the panel with filters, search and data export.
- Additional features: Custom Error Handlers, Logging (Loging), Integration with Frontend (Cors for Cross-Origin Requests).Deet on Heroku or VPS with an environment (Virtoalenv, Requirements.txt).
- Testing and safety: UNIT tests with Pytest, vulnerability protection (CSRF with Flask-WTF, Rate Limiting with Flask-Limiter).