You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backend API for CarePay — a hospital cash-management system that provides virtual accounts for patients, Nomba payment integration, team management with RBAC, and automated reconciliation.
# Install dependencies
make install
# Copy and configure environment
cp .env.example .env # or create .env from scratch# Edit .env with your DATABASE_URL, REDIS_URL, VAULT_TOKEN, etc.# Initialize the database (one-time)
make migrate-init # creates aerich migration tracking
make init-db # creates tables and initial migration# Run the server
make run # http://127.0.0.1:8000
Environment Variables
Variable
Required
Default
Description
DATABASE_URL
Yes
—
PostgreSQL connection string
REDIS_URL
No
redis://localhost:6379/0
Redis URL
VAULT_URL
Yes*
—
Hashicorp Vault address
VAULT_TOKEN
Yes*
—
Vault authentication token
NOMBA_BASE_URL
No
https://api.nomba.com
Nomba API base URL
JWT_SECRET
No
change-me-in-production
JWT signing key
SMTP_HOST
No
smtp.gmail.com
Email SMTP host
SMTP_USER
Yes*
—
SMTP username
SMTP_PASSWORD
Yes*
—
SMTP password
* Required for the corresponding feature (Vault for refresh tokens, SMTP for team invites).
Database Migrations
make migrate # create a new migration (prompts for name)
make upgrade # apply pending migrations
make downgrade # roll back the last migration
make history# show migration history
Celery
make celery-worker # run worker only
make celery-beat # run beat scheduler only
make celery # run worker + beat together
CarePay is a Nigerian healthcare payment platform that enables patients to seamlessly pay for hospital services through dedicated virtual bank accounts, while giving hospitals real-time visibility and automated reconciliation of all collections powered by the Nomba payment infrastructure