CreditSea is a full-stack digital lending platform that handles the entire loan lifecycle. It features a multi-step Borrower Portal for submitting loan requests and an Operations Dashboard with role-based access control (RBAC) modules for backend executives.
For immediate testing, use the pre-seeded credentials below:
| Role | Password | Allowed Module Access | |
|---|---|---|---|
| Borrower | borrower@creditsea.com |
Borrower@123 |
Borrower Application Form & Loan Tracker |
| Sales | sales@creditsea.com |
Sales@123 |
Sales Lead Tracking Module |
| Sanction | sanction@creditsea.com |
Sanction@123 |
Sanction Approval/Rejection Module |
| Disbursement | disburse@creditsea.com |
Disburse@123 |
Disbursement Funds Release Module |
| Collection | collect@creditsea.com |
Collect@123 |
Collection ledger / Payment recording |
| Admin | admin@creditsea.com |
Admin@123 |
All Operations modules |
- Frontend: Next.js 15 (App Router) + TypeScript + Tailwind CSS
- Backend: Node.js + Express + TypeScript
- Database: MongoDB + Mongoose
- Auth & Security: JSON Web Tokens (JWT) + bcryptjs
creditSea/
├── backend/
│ ├── src/
│ │ ├── middlewares/ # Authentication & RBAC middleware
│ │ ├── models/ # Mongoose Schemas (User, BorrowerProfile, Loan, Payment)
│ │ ├── routes/ # API endpoints (auth, borrower, operations)
│ │ ├── utils/ # Business Rule Engine (BRE) checks
│ │ ├── seed.ts # Database seeder script
│ │ └── server.ts # Express entry point
│ ├── .env.example
│ └── tsconfig.json
└── frontend/
├── src/
│ ├── app/ # Next.js pages and layouts
│ └── context/ # React AuthContext state provider
└── package.json
- Node.js (v18 or higher recommended)
- MongoDB (Running locally on
mongodb://127.0.0.1:27017/creditseaor a cloud Atlas URI)
- Open a terminal and navigate to the
backend/directory:cd backend - Install dependencies:
npm install
- Create your
.envconfiguration file:cp .env.example .env
- Run the database seed script:
npm run seed
- Start the backend development server:
The server starts on
npm run dev
http://localhost:5000.
- Open a new terminal and navigate to the
frontend/directory:cd frontend - Install dependencies:
npm install
- Start the Next.js development server:
The client app will launch at
npm run dev
http://localhost:3000.
The BRE runs securely on the Express server (backend/src/utils/bre.ts) to validate borrower eligibility:
- Age Validation: Rejects applicants not aged between
23and50(calculated dynamically from DOB). - Salary Check: Rejects borrowers earning less than
₹25,000per month. - PAN Verification: Validates the PAN format using regex
/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/. - Employment Check: Rejects candidates marked as
Unemployed.
Client-side inputs display clear, responsive error layouts listing failed rules on BRE rejection.
- Enforced at the UI Layer via dynamic Next.js layout structures, rendering navigation lists relative to the user's role.
- Enforced at the API Layer using middleware (
backend/src/middlewares/auth.ts). Attempts by unauthorized accounts to call restricted endpoints return403 Forbidden.
-
Interest: Simple Interest is computed using:
$$\text{Simple Interest} = \frac{P \times R \times T}{365 \times 100}$$ Where P = Principal, R = 12% fixed rate, and T = Tenure in days. - Financial Precision: Floating-point precision errors are mitigated in JavaScript by rounding intermediate values to 2 decimal places using math multipliers, preventing fractional pennies/paise mismatch.
-
UTR Uniqueness: Enforced via MongoDB unique indexing on the
utrfield inside the payments schema, eliminating duplicate transaction claims.