Developed by Happy Kumar
CredFlow is a full-stack Loan Management System built using React, Node.js, and MongoDB.
The application provides a complete loan lifecycle workflow including user authentication, loan applications, admin approvals, EMI payments, and role-based dashboards with a clean, responsive, production-ready UI.
- User registration and login using JWT authentication
- Role-based access control (Admin & Customer)
- Protected routes to prevent unauthorized access
- Customers can apply for loans
- Track loan status (Pending, Approved, Rejected)
- Admin approval and rejection workflow
- EMI payment functionality
- View payment history per loan
- Secure payment handling APIs
- Role-aware dashboard (Admin & Customer)
- KPI cards for quick insights
- Clean and minimal fintech-style UI
- Fully responsive (Mobile, Tablet, Desktop)
- Tailwind CSS based clean design
- Reusable and maintainable components
- React (Vite)
- Tailwind CSS
- Axios
- React Router DOM
- Node.js
- Express.js
- MongoDB (Atlas)
- Mongoose
- JWT Authentication
Before you begin, ensure you have the following installed:
- Node.js: https://nodejs.org/
- MongoDB Atlas account (or local MongoDB)
- Clone this repository:
git clone https://github.com/ImHappyKumar/cred-flow.git- Navigate to the project directory:
cd cred-flow- Install backend dependencies:
cd backend
npm install- Install frontend dependencies:
cd frontend
npm installCreate the following files before running the project.
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secretVITE_API_BASE_URL=http://localhost:5000/apiRename .env.example to .env after adding your values.
- Start the backend server:
cd backend
npm run dev- Start the frontend application:
cd frontend
npm run dev- Open your browser and visit:
http://localhost:5173
Admins are not publicly registered.
To create an admin:
- Register a normal user
- Update the user's role in MongoDB:
{
"role": "admin"
}This approach follows real-world security best practices.
- POST
/api/auth/register– Register user - POST
/api/auth/login– Login user - GET
/api/loans– Fetch loans - POST
/api/loans– Create loan - PUT
/api/loans/:id/status– Approve / Reject loan - POST
/api/payments– Pay EMI - GET
/api/payments/:loanId– Payment history
Contributions are welcome!
If you find a bug or have a feature suggestion, please open an issue or submit a pull request.