This project is a credit approval system that determines loan eligibility based on past loan data. It includes APIs for adding new customers, checking loan eligibility, processing new loans, and viewing loan details.
- Add a new customer to the customer table
- Check loan eligibility based on credit score
- Process a new loan based on eligibility
- View loan details and customer details
- View all current loan details by customer ID
- Django
- PostgreSQL
- Docker
- Docker Compose
All APIs run under /api/v1/:
/register/: Add a new customer/check-eligibility/: Check loan eligibility based on credit score/create-loan/: Process a new loan based on eligibility/view-loan/loan_id/: View loan details and customer details by loan ID/view-loans/customer_id/: View all current loan details by customer ID
Note: Make sure to add a slash ('/') at the end of the API.
- python
- docker
- Docker Desktop
- docker-compose
Clone this project
git clone https://github.com/kushalv238/credit_approval_system.gitNavigate to the project directory
cd credit_approval_systemStart the Docker engine by starting the Docker Desktop or by using OS utilities
Run Docker Compose
docker-compose upAccess the APIs at
http://localhost:8000/api/v1/Use this Postman collection with existing APIs to test the project
Note: Change the agent to desktop agent if you run Postman on a browser. The option can be found on the bottom right.
Create a .env file in the root directory of this project & add a SECRET_KEY for django to use.
Run the following command in your Django project's Python shell to generate a secret key
from django.core.management.utils import get_random_secret_key
get_random_secret_key()Copy the new SECRET_KEY that is generated & paste it to your .env file.
SECRET_KEY=your_secret_key_here
Note: By default this application uses an insecure key please change it to avoid unwanted attacks.