How alkama2022/debt-collector-backend works
CollectNaija is a multi-tenant debt-collection and payment-management API. The primary workflow is an organization user managing customers and invoices, then scheduling reminders that are sent through configured communication channels; payments and provider webhooks update collection state. The graph also preserves the documented AI, language, voice, billing, reporting, and audit capabilities. Several domain links are described by the README, while source excerpts substantiate reminder scheduling, communication dispatch, webhook processing, and language routing; unsampled implementation details are not assumed.
Main entry points: urls.py REST API · views.py AI Collection Support · models.py Invoices · tasks.py Reminder Scheduling
Components 20
Access and Tenancy
- REST API
config/urls.py - Accounts
apps/accounts/views.py - Organizations
apps/tenancy/models.py
Debt Management
- Customers
apps/customers/models.py - Invoices
apps/invoices/models.py - Reminder Scheduling
apps/collections/tasks.py
Collection Communications
- Communication Records
apps/comms/models.py - Message Dispatch
apps/comms/tasks.py - Channel Providers
apps/comms/providers/factory.py - Voice Communication
apps/voice/views.py - Language Routing
apps/languages/router.py
Payments and Billing
- Payment Processing
apps/payments/views.py - Paystack Integration
apps/payments/paystack.py - Webhook Processing
apps/webhooks/tasks.py - Subscriptions
apps/subscriptions/models.py - Reporting
apps/reports
AI and Oversight
- AI Collection Support
apps/ai/views.py - Audit Records
apps/audit/models.py - Background Tasks
config/celery.py
Other components
- Business Client
Connections 26
- Business Client → REST API: uses REST API
- REST API → Accounts: supports authentication
- REST API → Organizations: serves organizations
- Organizations → Customers: scopes customer data
apps/customers/models.py - Organizations → Invoices: scopes invoice data
apps/invoices/models.py - Business Client → Customers: manages customers
- Business Client → Invoices: manages invoices
- Reminder Scheduling → Invoices: selects due invoices
apps/collections/tasks.py - Reminder Scheduling → Communication Records: queues reminders
apps/collections/tasks.py - Reminder Scheduling → Background Tasks: runs scheduled
apps/collections/tasks.py - Message Dispatch → Communication Records: loads queued events
apps/comms/tasks.py - Message Dispatch → Channel Providers: sends through provider
apps/comms/tasks.py - Message Dispatch → Language Routing: resolves message language
- Channel Providers → Business Client: delivers messages
- Business Client → Voice Communication: uses voice channel
- REST API → Payment Processing: records payments
- Payment Processing → Paystack Integration: integrates payments
- Webhook Processing → Payment Processing: records successful charges
apps/webhooks/tasks.py - Webhook Processing → Invoices: resolves invoice
apps/webhooks/tasks.py - Webhook Processing → Communication Records: queues AI replies
apps/webhooks/tasks.py - REST API → Subscriptions: manages billing
- REST API → Reporting: provides analytics
- AI Collection Support → Language Routing: detects language
apps/ai/views.py - AI Collection Support → Customers: looks up customer
apps/ai/views.py - AI Collection Support → Audit Records: records communications
apps/ai/views.py - REST API → AI Collection Support: supports AI workflows