How ondiekochieng/automobile-spares-management-system works
This Flask automobile-spares management application serves authenticated staff pages for a dashboard, inventory, sales, purchases, invoices, and quotes. The evidenced workflow is staff login, then viewing or managing spares and submitting quote requests; spare images are saved locally, while records use SQLite through SQLAlchemy. Sales, purchases, and invoice pages are present, but the sampled routes only render those screens, so their business workflows are not inferred. Relationships reflect the sampled routes and README; unsampled page behavior is not assumed.
Main entry points: main.py Main routes · routes.py Auth routes · models.py Data models · main_app.py App setup
Components 18
Application
- App setup
main_app.py - Main routes
main.py
Identity
- Auth routes
auth/routes.py - Login forms
auth/forms.py - Authentication page
templates/auth.html
Business records
- Quote and spare forms
forms.py - Data models
models.py - SQLite database
realspear.db - Image upload
utils.py
Staff pages
- Home page
templates/index.html - Dashboard page
templates/dashboard.html - Spares page
templates/spares.html - Add spare page
templates/add.html - Quotes page
templates/quotes.html - Sales page
templates/sales.html - Purchases page
templates/purchases.html - Invoices page
templates/invoices.html
Other components
- Staff user
Connections 19
- Staff user → Auth routes: signs in
auth/routes.py - App setup → Auth routes: registers blueprint
main_app.py - Auth routes → Login forms: validates with
auth/routes.py - Auth routes → Data models: queries and creates
auth/routes.py - Auth routes → Authentication page: renders
auth/routes.py - Staff user → Main routes: uses authenticated pages
main.py - Main routes → Quote and spare forms: validates requests
main.py - Main routes → Data models: queries and commits
main.py - Main routes → Image upload: uploads images
main.py - Main routes → Home page: renders
main.py - Main routes → Dashboard page: renders
main.py - Main routes → Spares page: renders
main.py - Main routes → Add spare page: renders
main.py - Main routes → Quotes page: renders
main.py - Main routes → Sales page: renders
main.py - Main routes → Purchases page: renders
main.py - Main routes → Invoices page: renders
main.py - Data models → SQLite database: persists records
- App setup → SQLite database: configures SQLite
main_app.py