Modern banking platform built with :
This project provides a sample backend for a digital banking platform with user authentication, KYC profiles, multi-currency bank accounts, transactions, virtual cards, and role-based access control.
| Service | Port | Description |
|---|---|---|
| Nginx (API) | 8080 | Main API endpoint |
| PostgreSQL | 5432 | Database |
| Mailpit UI | 8025 | Local email testing |
| Flower | 5555 | Celery monitoring |
| RabbitMQ | 15672 | RabbitMQ management |
Client
|
Nginx
|
Django REST API
/ | \
PostgreSQL Redis RabbitMQ
|
Celery Worker
|
Background Jobs
- Custom User model (email-based login)
- Role-based access control (Customer, Teller, Account Executive, Branch Manager)
- OTP verification
- Security questions
- Account lockout after failed login attempts
- JWT authentication via Djoser
- Comprehensive user profile
- Identity documents (photo, ID photo, signature)
- Next of Kin management
- Employment and personal information
- Multiple account types: Current & Saving
- Multi-currency support: Toman, US Dollar, Euro
- Primary account designation
- KYC verification workflow
- Daily interest calculation for savings accounts
- Deposit
- Withdrawal
- Transfer (with Security Question + OTP verification)
- Interest transactions
- Transaction history with filtering & pagination
- PDF statement generation (sent via email)
- Create and manage virtual cards linked to bank accounts
- Card status management (Active / Inactive / Blocked)
- Docker & Docker Compose ready
- PostgreSQL
- Redis + Celery + Celery Beat + Flower
- RabbitMQ
- Nginx reverse proxy
- Mailpit (local email testing)
- API documentation with drf-spectacular (Swagger / ReDoc)
| Category | Technology |
|---|---|
| Framework | Django + Django REST Framework |
| Authentication | Djoser + JWT |
| Database | PostgreSQL |
| Task Queue | Celery + Redis + RabbitMQ |
| API Docs | drf-spectacular |
| Containerization | Docker + Docker Compose |
| Reverse Proxy | Nginx |
| Email (Local) | Mailpit |
This project is simple to run in local, I have created a Makefile for shorten the commands.
So You need to install the lastest version of Docker
And after the installation of Docker just run the following command :
git clone https://github.com/maryus1991/BankingSystem.gitcd BankingSystem/apimake buildAnd open the localhost:8080/ for swagger documentation
And for admin page just run the following to create superuser and enter the admin panel
make superuserSome kind of information for create admin user :
admin panel path : localhost:8080/admin/
| Command | Description |
|---|---|
make build <container name> |
Build and start all services |
make up <container name> |
Start services |
make ps <container name> |
Start services |
make down <container name> |
Stop services |
make down-v <container name> |
Stop and remove volumes |
make restart <container name> |
Restart the container |
make logs-f <container name> |
Follow logs |
make migrate |
Run database migrations |
make makemigrations |
Create new migrations |
make superuser |
Create a superuser |
make sh <container name> |
Open shell in a container |
make flush |
Flush the database |
container name can be provided or be empty
This project includes PostgreSQL backup and restore scripts with Makefile commands to simplify database maintenance in self-hosted environments.
| Command | Description |
|---|---|
make banker-take-backup |
Create a database backup |
make banker-list-backups |
List available backups |
make banker-restore-backup <backup name> |
Restore a database backup |
Before restoring a backup, the database will be flushed to ensure a clean restore process.
This backup system is only compatible with PostgreSQL.
Backup and maintenance scripts are located at:
api/docker/local/maintenance/
BankingSystem/
βββ api/
β βββ core_apps/
β β βββ accounts/ # Bank accounts & transactions
β β βββ cards/ # Virtual cards
β β βββ user_auth/ # Custom authentication
β β βββ user_profile/ # KYC & profile management
β β βββ common/ # Shared models & utilities
β βββ config/ # Django settings
β βββ docker/ # Dockerfiles
β βββ requirements/ # Dependencies
β βββ local.yml # Local Docker Compose
β βββ production.yml # Production Docker Compose
β βββ Makefile # Useful commands
βββ docs/
β βββ DBSchema/ # Database schema diagrams
βββ LICENSE
After starting the project, you can access the interactive API documentation at:
- Swagger UI:
http://localhost:8080/api/docs/ - ReDoc:
http://localhost:8080/api/redoc/
Implemented security mechanisms:
- JWT authentication
- OTP verification
- Account lockout protection
- Role-based permissions
- Secure transaction verification
- KYC workflow
Production stack:
- Nginx
- Gunicorn
- PostgreSQL
- Redis
- Celery Workers
- RabbitMQ
- Docker Compose
- Designed a modular banking backend architecture
- Implemented multi-currency accounts
- Built asynchronous transaction processing
- Designed role-based banking permissions
- Containerized full development environment
This project is licensed under the BSD 3-Clause License.
See the LICENSE file for details.
Mostafa EbrahimZadeh (@maryus1991)

