How joy-ne-cc/webdev works
Wina Bwangu Booth Operations is a small web app for recording mobile-money booth transactions and reviewing service limits, revenue, and activity. The main workflow is to choose a booth, fetch its offered services, submit an amount, and review saved records and dashboard summaries. The browser uses a Flask API; the API validates booth/service offerings, monthly limits, and amounts before saving transactions. CSV seed data initializes the database, and dashboard figures can fall back to illustrative demo data. The README documents the browser/API workflow; some frontend details are therefore represented only at that level.
Main entry points: __init__.py App factory · models.py Booth and transaction models · seed_db.py CSV database seeding · script.js Transaction form
Components 17
Browser app
- Login and signup
Frontend/auth.js - Transaction form
Frontend/script.js - Dashboard views
Frontend/dashboard.js - Illustrative data
Frontend/mock-data.js
Flask API
- App factory
Backend/app/__init__.py - App configuration
Backend/app/config.py - Booth catalog API
Backend/app/routes/booths.py - Service catalog API
Backend/app/routes/services.py - Transaction API
Backend/app/routes/transactions.py - Dashboard API
Backend/app/routes/dashboard.py - Demo reset API
Backend/app/routes/demo.py
Transaction domain
- Amount and tax rules
Backend/app/utils.py
Data storage
- Booth and transaction models
Backend/app/models.py - SQLite database
- CSV database seeding
Backend/seed_db.py - Seed CSV files
Backend/seed_data
Other components
- Booth operator
Connections 26
- Booth operator → Login and signup: opens
README.md - Booth operator → Transaction form: enters transaction
README.md - Booth operator → Dashboard views: reviews records
README.md - Transaction form → Booth catalog API: fetches booth options
README.md - Transaction form → Service catalog API: fetches service catalog
README.md - Transaction form → Transaction API: submits transaction
README.md - Dashboard views → Dashboard API: fetches summaries
README.md - Dashboard views → Illustrative data: falls back to
README.md - App factory → App configuration: loads
Backend/app/__init__.py - App factory → Booth catalog API: registers
Backend/app/__init__.py - App factory → Service catalog API: registers
Backend/app/__init__.py - App factory → Transaction API: registers
Backend/app/__init__.py - App factory → Dashboard API: registers
Backend/app/__init__.py - App factory → Demo reset API: registers
Backend/app/__init__.py - Booth catalog API → Booth and transaction models: queries
Backend/app/routes/booths.py - Service catalog API → Booth and transaction models: queries
Backend/app/routes/services.py - Transaction API → Booth and transaction models: queries and saves
Backend/app/routes/transactions.py - Transaction API → Amount and tax rules: validates and calculates
Backend/app/routes/transactions.py - Dashboard API → Booth and transaction models: queries
Backend/app/routes/dashboard.py - Dashboard API → Amount and tax rules: uses month window
Backend/app/routes/dashboard.py - Booth and transaction models → SQLite database: maps records
- CSV database seeding → Booth and transaction models: creates records
Backend/seed_db.py - CSV database seeding → Seed CSV files: reads
Backend/seed_db.py - Demo reset API → CSV database seeding: resets through
Backend/app/routes/demo.py - CSV database seeding → Amount and tax rules: calculates seeded amounts
Backend/seed_db.py - CSV database seeding → SQLite database: populates
Backend/seed_db.py