A robust backend API built with Django Rest Framework (DRF) to simulate a banking transaction management system.
This system handles user registration, customer data management, and transaction tracking — including date filtering, customer-based queries, and pagination.
- Register and authenticate users using JWT tokens
- Secure login and logout endpoints
- Role-based access (admin, operator, analyst)
- Create and manage customer records
- Retrieve, update, and delete customer information
- Associate transactions with customers
- Create new transactions
- List all transactions (paginated)
- Retrieve single transactions by ID
- Filter transactions by date range
- View all transactions for a specific customer
Transaction_Monitoring_System_API/
├── User/
│ ├── models.py
│ ├── serializers.py
│ ├── views.py
│ ├── urls.py
│ └── tests.py
│
├── Customer/
│ ├── models.py
│ ├── serializers.py
│ ├── views.py
│ ├── urls.py
│ └── tests.py
│
├── Transactions/
│ ├── models.py
│ ├── serializers.py
│ ├── views.py
│ ├── urls.py
│ └── tests.py
│
├── TransactionMonitoringSystem/
│ ├── settings.py
│ ├── urls.py
│ ├── wsgi.py
│ └── asgi.py
│
└── requirements.txt
| Layer | Technology |
|---|---|
| Backend Framework | Django 5 / Django REST Framework |
| Database | PostgreSQL (recommended) / SQLite (for testing) |
| Authentication | JWT (JSON Web Token) |
| API Docs | Swagger / drf-yasg |
| Testing | Django TestCase / Postman |
| Deployment | Render, Railway, or AWS EC2 (optional) |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/users/register/ |
Register a new user |
| POST | /api/users/login/ |
Login and get JWT tokens |
| GET | /api/users/profile/ |
Retrieve user profile |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/customers/create/ |
Create a new customer |
| GET | /api/customers/list/ |
List all customers |
| GET | /api/customers/<uuid:pk>/ |
Retrieve customer details |
| PUT/PATCH | /api/customers/<uuid:pk>/ |
Update customer info |
| POST/GET/PUT/PATCH/DELETE | /api/customers/admin/<uuid:pk>/ |
Admin |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/transactions/create/ |
Create a new transaction |
| GET | /api/transactions/list/ |
List all transactions (paginated) |
| GET | /api/transactions/<uuid:id>/ |
Retrieve a transaction by ID |
| GET | api/customers/<uuid:customer_id>/transactions/ |
View all transactions for a customer |
After setup, visit:
http://127.0.0.1:8000/swagger/
or
http://127.0.0.1:8000/api/docs/
to explore all endpoints interactively.
Run all automated tests:
python manage.py testAlternatively, use Postman for manual endpoint testing.
git clone https://github.com/Tech-it-with-Billy/Transaction_Monitoring_System_API.git
cd Transaction_Monitoring_System_APIpython -m venv venv
source venv/bin/activate # On Linux/Mac
venv\Scripts\activate # On Windowspip install -r requirements.txtpython manage.py migratepython manage.py runserverVisit: http://127.0.0.1:8000
{
"customer": 1,
"amount": 2000.00,
"transaction_type": "Deposit",
"transaction_date": "2025-11-01"
}- Always create customers before transactions (due to FK relation).
- JWT Authentication required for protected endpoints.
- Pagination and filtering are implemented in the Transaction API.
- Swagger auto-generates API documentation.