How njogubless/changa works
Changa is a group-contribution platform: members use the mobile app to sign in, discover or create projects, and contribute money toward shared goals. The FastAPI application exposes authentication, project, group, budget, and payment routes. Payment initiation and reconciliation run through a background worker; confirmed contributions are credited to an append-only ledger that maintains project funding totals. The README documents Flutter capabilities, but the supplied tree omits its Dart source, so mobile feature internals and their detailed API wiring cannot be shown. Backend router details beyond sampled files are likewise represented only at the documented capability level.
Main entry points: main.py FastAPI application · database.py Database sessions · payment_worker.py Payment worker · auth.py Authentication
Components 20
Mobile client
- Changa app
mobile/changa
API capabilities
- FastAPI application
backend/app/main.py - Authentication
backend/app/routers/auth.py - Auth validation
backend/app/schemas/auth.py - Project management
backend/app/routers/projects.py - Group management
backend/app/routers/chamas.py - Budgeting
backend/app/routers/budgets.py - Contribution endpoints
backend/app/routers/payments.py
Payment processing
- Payment worker
backend/app/workers/payment_worker.py - M-Pesa integration
backend/app/services/mpesa.py - Airtel integration
backend/app/services/airtel.py - Contribution ledger
backend/app/services/ledger_service.py
Persistence and controls
- Database sessions
backend/app/database.py - Domain records
backend/app/models/models.py - Consent and KYC
backend/app/models/compliance.py - Audit events
backend/app/models/audit.py - Audit hooks
backend/app/core/audit.py
Other components
- Group member
- Payment providers
- PostgreSQL
Connections 24
- Group member → Changa app: uses
- Changa app → FastAPI application: sends requests
- FastAPI application → Authentication: mounts routes
- FastAPI application → Project management: mounts routes
- FastAPI application → Group management: mounts routes
- FastAPI application → Budgeting: mounts routes
- FastAPI application → Contribution endpoints: mounts routes
- FastAPI application → Payment worker: starts worker
- Authentication → Auth validation: validates with
- Authentication → Database sessions: uses sessions
- Authentication → Consent and KYC: records consent
- FastAPI application → Database sessions: checks readiness
- Database sessions → PostgreSQL: connects to
- Payment worker → Database sessions: reads and writes
- Payment worker → M-Pesa integration: initiates or queries
- Payment worker → Airtel integration: initiates or queries
- M-Pesa integration → Payment providers: calls provider
- Airtel integration → Payment providers: calls provider
- Payment worker → Contribution ledger: credits success
- Contribution ledger → Database sessions: writes ledger and totals
- Database sessions → Domain records: persists records
- FastAPI application → Audit hooks: loads hooks
- Audit hooks → Audit events: populates events
- Database sessions → Audit events: stores events