How szluk133/htttql works
Project type and purpose
• This is a monolithic full-stack web application built with Flask (Python) that manages business data (customers, employees, payroll, revenue, etc.).
• The SQLQuery10.sql file initializes an SQL Server database (BTL_HTTTQL) with the required schema and tables.
• The Python app (app.py) serves HTML templates (under /templates) and static assets (under /static) via Flask, provides forms via flask-wtf, and performs CRUD operations against SQL Server.
File structure
• Top-level files:
• README.md – project overview and setup instructions.
• SQLQuery10.sql – DDL and seed data for SQL Server.
• app.py – Flask application entrypoint, route definitions, business logic.
• venv/ – Python virtual environment.
• Directories:
• static/ – CSS, JavaScript, images (img/).
• templates/ – HTML templates. Subfolder “QuanLy” groups manager-views (QLKhachHang, QLNhanVien, etc.). Root templates include login.html, trangchu.html, nvbanhang.html, nvthukho.html, quanly.html.
• Architectural pattern: a simple MVC-style separation.
• Controllers: route functions in app.py
• Views: Jinja2 templates in templates/
• Model: SQL Server database accessed via Python DB-API or ORM (not explicitly in tree, but implied).
README for insights
• Dependencies: Flask, Flask-WTF, Python, SQL Server.
• No explicit microservices or external APIs—fully self-contained.
• Deployment considerations: needs connection string to SQL Server; static folder served by Flask or fronting web server.
Elements
• Clear labels: e.g., “Web Browser,” “Flask App (app.py),” “SQL Server (BTL_HTTTQL).”
• A third for the database
• Optional: annotate ports (e.g., 5000) or config (connection string).
Detailed breakdown
• That app.py imports and wires up these routes.
• That SQLQuery10.sql defines tables that correspond to entities managed by each view (customers, employees, payroll, revenue).
• If desired, show that Flask-WTF handles form objects and validation in controllers before calling SQL.