How kayinamuramoise/waterbilling works
KigaliWater is a web application for managing water customers, meter readings, and billing. A staff member logs in, then uses the protected dashboard to manage customers, record readings, and review or pay bills; recording usage generates a bill. The React client sends authenticated API requests to the Express server, which applies the domain operations and persists records in MySQL. The source excerpts show the main route and page calls, but not every server route implementation detail or database query relationship.
Main entry points: App.jsx Protected app routing · api.js HTTP client · Meters.jsx Meter readings · server.js API routes and billing
Components 12
Web application
- Protected app routing
client/src/App.jsx - Navigation layout
client/src/components/Layout.jsx - Sign-in
client/src/pages/Login.jsx - Dashboard view
client/src/pages/Dashboard.jsx - Customer management
client/src/pages/Customers.jsx - Meter readings
client/src/pages/Meters.jsx - Bills and reports
client/src/pages/Bills.jsx - HTTP client
client/src/api.js
API and domain
- API routes and billing
server/server.js
Data persistence
- Database initialization
server/db.js - MySQL records
Other components
- Water staff
Connections 18
- Water staff → Protected app routing: uses
client/src/App.jsx - Protected app routing → Navigation layout: renders
client/src/App.jsx - Protected app routing → Sign-in: routes to
client/src/App.jsx - Protected app routing → Dashboard view: routes to
client/src/App.jsx - Protected app routing → Customer management: routes to
client/src/App.jsx - Protected app routing → Meter readings: routes to
client/src/App.jsx - Protected app routing → Bills and reports: routes to
client/src/App.jsx - Water staff → Sign-in: signs in
client/src/pages/Login.jsx - Sign-in → HTTP client: posts credentials
client/src/pages/Login.jsx - Customer management → HTTP client: requests customer data
client/src/pages/Customers.jsx - Meter readings → HTTP client: requests readings
client/src/pages/Meters.jsx - Meter readings → Customer management: loads choices
client/src/pages/Meters.jsx - Bills and reports → HTTP client: requests bills
client/src/pages/Bills.jsx - Dashboard view → HTTP client: requests totals
client/src/pages/Dashboard.jsx - HTTP client → API routes and billing: sends API requests
client/src/api.js - API routes and billing → Database initialization: initializes database
server/server.js - Database initialization → MySQL records: creates tables
server/db.js - API routes and billing → MySQL records: queries records
server/server.js