How rauaan/kmg-crud-app works
This Flask application manages oil-company operations: users sign in, maintain company, employee, and well records, and create daily production reports. Report routes also import and export Excel workbooks; dashboards aggregate production and well data into KPI and chart views. SQLAlchemy models define the persisted domain, while route handlers own database operations and web responses. The graph covers the sampled route behavior and documented model capabilities; some route implementations and templates were not sampled, so their detailed links are omitted.
Main entry points: __init__.py App factory · models.py Domain models · auth.py Authentication · daily_productions.py Production reports
Components 14
Web application
- App factory
app/__init__.py - Flask extensions
app/extensions.py - Authentication
app/routes/auth.py - Input forms
app/forms.py - Page templates
app/templates
Domain records
- Company management
app/routes/companies.py - Employee management
app/routes/users.py - Well management
app/routes/wells.py - Domain models
app/models.py - Relational database
Production workflow
- Production reports
app/routes/daily_productions.py
Analytics and setup
- Production dashboard
app/routes/dashboards.py - Sample data command
app/seed.py
Other components
- Operator
Connections 31
- Operator → Authentication: signs in
app/routes/auth.py - Operator → Company management: manages companies
app/routes/companies.py - Operator → Employee management: manages employees
app/routes/users.py - Operator → Well management: manages wells
app/routes/wells.py - Operator → Production reports: manages reports
app/routes/daily_productions.py - Operator → Production dashboard: views metrics
app/routes/dashboards.py - App factory → Flask extensions: initializes
app/__init__.py - App factory → Authentication: registers routes
app/__init__.py - App factory → Company management: registers routes
app/__init__.py - App factory → Employee management: registers routes
app/__init__.py - App factory → Well management: registers routes
app/__init__.py - App factory → Production reports: registers routes
app/__init__.py - App factory → Production dashboard: registers routes
app/__init__.py - App factory → Sample data command: registers command
app/__init__.py - Authentication → Input forms: validates input
app/routes/auth.py - Authentication → Domain models: queries accounts
app/routes/auth.py - Authentication → Flask extensions: hashes passwords
app/routes/auth.py - Company management → Domain models: reads and writes
app/routes/companies.py - Employee management → Domain models: reads and writes
app/routes/users.py - Well management → Domain models: reads and writes
app/routes/wells.py - Production reports → Input forms: validates reports
app/routes/daily_productions.py - Production reports → Domain models: reads and writes
app/routes/daily_productions.py - Production reports → Page templates: renders pages
app/routes/daily_productions.py - Production dashboard → Domain models: queries aggregates
app/routes/dashboards.py - Production dashboard → Page templates: renders metrics
app/routes/dashboards.py - Company management → Page templates: renders pages
app/routes/companies.py - Employee management → Page templates: renders pages
app/routes/users.py - Well management → Page templates: renders pages
app/routes/wells.py - Domain models → Relational database: defines tables
app/models.py - Sample data command → Domain models: creates sample records
app/seed.py - Sample data command → Relational database: commits records
app/seed.py