CrediSys — Loan Management System
Inspiration
I wanted my first serious project to solve a problem that feels real rather than building another small tutorial project. Small lending businesses can still depend on paper records, spreadsheets, or disconnected files to manage customers, loans, and payments. That can make it difficult to keep track of repayment schedules, overdue installments, outstanding amounts, and overall business performance.
I decided to build CrediSys, a terminal-based Loan Management System designed around the workflow of a small lending business. More importantly, I wanted to build it from the ground up so I could understand how each part of a real software system works instead of simply following a tutorial.
What It Does
CrediSys manages the complete loan lifecycle from a single application.
Customer Management
- Register customers with validation for Pakistani CNIC and phone-number formats
- View and update customer information
- Prevent deletion of customers with unresolved loans
- Soft-delete completed customers while preserving their history
Loan Management
- Create loans using predefined loan plans
- Validate loan amounts against plan limits
- Calculate reducing-balance EMI
- Calculate total interest and total payable amount
- Generate a complete month-by-month repayment schedule
- Track loan status throughout its lifecycle
Payment Management
- Record individual installment payments
- Prevent invalid or duplicate installment payments
- Maintain payment history for specific loans
- Automatically identify overdue installments
- Apply the configured grace period before marking installments overdue
Analytics
- Track customer statistics
- Track loan statuses
- Calculate total amount lent and recovered
- Track outstanding amounts and expected interest
- Save monthly snapshots
- Compare historical snapshots to monitor business growth
CrediAI
CrediSys also includes CrediAI, an AI assistant powered by Google's Gemini API.
CrediAI can:
- Answer staff questions about the system
- Look up relevant loan information
- Explain business data in plain English
- Help staff navigate the application's menu
- Generate useful staff-oriented reports and responses
The AI is an additional intelligence layer — the core financial calculations and loan rules remain controlled by the application's Python logic.
How I Built It
I built CrediSys incrementally in Python, keeping the architecture intentionally simple so I could understand every component.
I started with customer management and basic CRUD operations. From there, I added loan plans, followed by the loan engine and reducing-balance EMI calculation.
After that came repayment schedules, payment recording, overdue detection, and loan-status management. Once the core loan lifecycle was working, I added analytics and monthly snapshots.
Finally, I connected everything through a menu-driven main.py and integrated CrediAI using Google's Gemini API.
The project currently uses JSON files for persistent storage rather than a database. I deliberately chose this approach for the first version because I wanted to understand file-based data management before introducing additional infrastructure.
The system is also designed around the Pakistani context, including PKR currency and Pakistani customer identification/contact formats.
Challenges I Faced
One of my biggest challenges was implementing the reducing-balance EMI calculation correctly. I did not want the loan engine to simply produce a number — I wanted to understand what was happening mathematically and generate a proper amortization schedule from it.
Repayment handling introduced another layer of complexity. I had to make sure individual installments could be recorded correctly, statuses were updated properly, and overdue installments were detected only after the configured grace period.
I also had to think carefully about what should happen when a customer is deleted. Instead of permanently destroying historical information, CrediSys uses a soft-delete approach for eligible customers so their previous loan and payment history can remain useful for future analytics.
Another challenge was keeping the project manageable. There were many possible features I could have added, but I deliberately focused on completing the core loan lifecycle first rather than turning the project into an unnecessarily complicated system.
Integrating CrediAI introduced a completely different challenge: making an external AI model useful without allowing it to replace the application's actual business logic. The AI layer is therefore kept separate from calculations such as EMI, interest, payments, and overdue detection.
Accomplishments I'm Proud Of
The biggest accomplishment is that CrediSys became a complete working loan lifecycle rather than a collection of disconnected features.
A customer can be registered, a loan can be issued against a plan, an actual reducing-balance repayment schedule can be generated, installments can be recorded, overdue payments can be detected, loan status can evolve, and the business can be analyzed from the stored data.
I'm also proud that I built the project incrementally while learning instead of starting with a large framework or database that I didn't fully understand.
Finally, integrating a live AI assistant into a Python CLI application was an important step for me because it showed me how traditional software and modern AI capabilities can work together.
What I Learned
This project taught me that building software is much more than writing individual lines of code.
I learned how important it is to divide a large problem into smaller modules with clear responsibilities. I also learned to validate data before processing it, handle file and API failures gracefully, and test features based on real scenarios rather than assuming that code works because it runs once.
The loan system also forced me to understand the financial calculations behind the software instead of treating them as black boxes.
Most importantly, I learned how much development involves debugging, changing designs, testing again, and making decisions about what not to build.
What's Next
There are several improvements I would like to make in future versions:
- Automated unit tests for EMI and repayment calculations
- PDF loan statements for customers
- A graphical user interface
- Multi-turn conversational memory for CrediAI
- Role-based staff authentication
- Migration from JSON storage to a relational database
- More advanced business analytics and reporting
CrediSys is currently a functional foundation, but I see it as the first version of a much larger system I can continue improving as I learn more about Python, databases, AI, and software engineering.
Log in or sign up for Devpost to join the conversation.