How coderun23-cloud/smart_bill works
Smart Bill is a role-based utility billing application: customers, administrators, superadmins and meter readers use a React interface backed by Laravel APIs. The main operational stages include account access, meter-reading capture, bill management and payment, with complaints, reports, notifications and tariff administration as separate capabilities. The sampled code confirms API routing, reading persistence, payment-provider calls and the frontend’s authenticated user lookup. Several screen-to-endpoint connections are not shown, so those links are omitted rather than inferred.
Main entry points: api.php Laravel API routes · App.jsx Role-based routes · PaymentController.php Payment processing · BillController.php Bill management
Components 21
User experience
- Role-based routes
smart_bill_font_end/src/App.jsx - Sign-in and registration
smart_bill_font_end/src/pages/Auth - Customer workspace
smart_bill_font_end/src/pages/customer - Meter-reader workspace
smart_bill_font_end/src/pages/meterreader - Admin workspaces
smart_bill_font_end/src/pages/admin - Superadmin workspace
smart_bill_font_end/src/pages/superadmin
Access and API
- Session context
smart_bill_font_end/src/pages/context/AppContext.jsx - Laravel API routes
smart_bill/routes/api.php - Authentication
smart_bill/app/Http/Controllers/AuthController.php
Billing operations
- Customer management
smart_bill/app/Http/Controllers/CustomerController.php - Meter readings
smart_bill/app/Http/Controllers/ReadingController.php - Bill management
smart_bill/app/Http/Controllers/BillController.php - Payment processing
smart_bill/app/Http/Controllers/PaymentController.php
Administration
- Complaints
smart_bill/app/Http/Controllers/ComplaintController.php - Reports
smart_bill/app/Http/Controllers/ReportController.php - Notifications
smart_bill/app/Http/Controllers/NotificationController.php - Tariff management
smart_bill/app/Http/Controllers/TariffController.php - User administration
smart_bill/app/Http/Controllers/SuperAdminController.php
Other components
- Application users
- Chapa payments
- Application database
Connections 27
- Application users → Role-based routes: uses
- Role-based routes → Sign-in and registration: routes to
smart_bill_font_end/src/App.jsx - Role-based routes → Customer workspace: routes to
smart_bill_font_end/src/App.jsx - Role-based routes → Meter-reader workspace: routes to
smart_bill_font_end/src/App.jsx - Role-based routes → Admin workspaces: routes to
smart_bill_font_end/src/App.jsx - Role-based routes → Superadmin workspace: routes to
smart_bill_font_end/src/App.jsx - Session context → Laravel API routes: fetches user
smart_bill_font_end/src/pages/context/AppContext.jsx - Laravel API routes → Authentication: routes auth
smart_bill/routes/api.php - Laravel API routes → Customer management: routes customer
smart_bill/routes/api.php - Laravel API routes → Meter readings: routes readings
smart_bill/routes/api.php - Laravel API routes → Bill management: routes bills
smart_bill/routes/api.php - Laravel API routes → Payment processing: routes payments
smart_bill/routes/api.php - Laravel API routes → Complaints: routes complaints
smart_bill/routes/api.php - Laravel API routes → Reports: routes reports
smart_bill/routes/api.php - Laravel API routes → Notifications: routes notifications
smart_bill/routes/api.php - Laravel API routes → Tariff management: routes tariffs
smart_bill/routes/api.php - Laravel API routes → User administration: routes users
smart_bill/routes/api.php - Meter readings → Application database: persists readings
smart_bill/app/Http/Controllers/ReadingController.php - Customer management → Application database: manages customers
smart_bill/app/Http/Controllers/CustomerController.php - Payment processing → Application database: stores payments
smart_bill/app/Http/Controllers/PaymentController.php - Payment processing → Bill management: updates bill status
smart_bill/app/Http/Controllers/PaymentController.php - Payment processing → Chapa payments: initializes and verifies
smart_bill/app/Http/Controllers/PaymentController.php - Bill management → Application database: manages bills
smart_bill/app/Http/Controllers/BillController.php - Complaints → Application database: manages complaints
- Reports → Application database: manages reports
- Notifications → Application database: manages notices
- Tariff management → Application database: manages tariffs