This project is a backend credit approval and loan processing system built using Django, Django REST Framework, PostgreSQL, and fully containerized with Docker.
The system evaluates customer eligibility for loans based on salary, past loan history, credit rules, and EMI constraints.
- Python
- Django 5
- Django REST Framework
- PostgreSQL
- Docker & Docker Compose
- Pandas (Excel ingestion)
- Customer Registration with automatic approved credit limit calculation
- Loan Eligibility Check based on historical loan data and salary rules
- Loan Creation with EMI calculation using compound interest
- View Loan by Loan ID
- View All Loans by Customer ID
- Automatic database wait mechanism inside Docker to prevent race condition
- Auto migrations on container start
Clone the repository and run:
docker-compose up --build
Server starts at:
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/register/ |
Register new customer |
| POST | /api/check-eligibility/ |
Check loan eligibility |
| POST | /api/create-loan/ |
Create new loan |
| GET | /api/view-loan/<loan_id>/ |
View specific loan |
| GET | /api/view-loans/<customer_id>/ |
View all loans of customer |
A custom wait_for_db.py script is used so Django waits for PostgreSQL to become ready inside Docker before starting. This prevents startup crashes due to DB race conditions.
Merina Thoppil