How hoangnam2003-dau/kien-truc-auto-python works
This is a Flask car-sales storefront with customer accounts and an administration area. Customers browse cars, add them to a session cart, then place an order or make a deposit; staff manage cars, customers, orders, deposits, and reports. The central runtime and database access live together in app.py, with SQLite holding the domain records. The excerpts show only parts of the route implementation, so the graph preserves template-indicated capabilities but avoids guessing detailed links for unsampled routes.
Main entry points: app.py Flask routes · kientrucauto.db SQLite records · app.js Cart and UI scripts · seed_db_current.py Sample data seeder
Components 17
Storefront
- Flask routes
app.py - Car catalog
templates/catalog.html - Home page
templates/trangchu.html - Car details
templates/chitietxe.html - Shopping cart
templates/giohang.html - Cart and UI scripts
static/js/app.js
Customer
- Login and registration
templates/customer_auth.html - Customer account
templates/customer_account.html - Orders and invoices
templates/invoice.html
Administration
- Car management
templates/admin_cars.html - Customer management
templates/admin_customers.html - Order management
templates/admin_orders.html - Deposit management
templates/admin_deposits.html - Sales reports
templates/admin_reports.html
Persistence
- Sample data seeder
seed_db_current.py - SQLite records
kientrucauto.db
Other components
- Shop visitor
Connections 16
- Shop visitor → Flask routes: browses and submits
app.py - Flask routes → Home page: renders
app.py - Flask routes → Car catalog: renders
app.py - Flask routes → Car details: renders
- Flask routes → Shopping cart: renders
- Cart and UI scripts → Flask routes: posts cart actions
static/js/app.js - Flask routes → Login and registration: renders
- Flask routes → Customer account: renders
- Flask routes → Orders and invoices: renders
- Flask routes → Car management: renders
- Flask routes → Customer management: renders
- Flask routes → Order management: renders
- Flask routes → Deposit management: renders
- Flask routes → Sales reports: renders
- Flask routes → SQLite records: reads and writes
app.py - Sample data seeder → SQLite records: seeds records
seed_db_current.py