CreditBridge is a premium MSME Credit Intelligence platform featuring a Next.js frontend, a Node.js/Express backend anchored to a simulated blockchain ledger, and a Python FastAPI ML scoring engine with SHAP explainability.
When running locally, the application consists of three services hosted on localhost:
| Service | Technology | URL / Port | Directory |
|---|---|---|---|
| Frontend | Next.js (App Router) | http://localhost:3000 |
./ (Root) |
| Backend | Express + Prisma + SQLite | http://localhost:4000 |
./backend |
| ML Service | FastAPI + Random Forest + SHAP | http://localhost:8001 |
./backend/ml_service |
Ensure you have the following installed on your local machine:
- Node.js (v18 or higher)
- Python (v3.9 or higher)
- npm (comes with Node.js)
Follow these steps to spin up all three servers:
- Navigate to the ML service directory:
cd backend/ml_service - Create a virtual environment and activate it:
python -m venv venv # On Windows: .\venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
- Install the Python dependencies:
pip install -r requirements.txt
- Start the FastAPI microservice on port
8001:uvicorn app:app --host 0.0.0.0 --port 8001
- Open a new terminal and navigate to the backend directory:
cd backend - Install the Node dependencies:
npm install
- Generate the Prisma database client:
npx prisma generate
- Start the development server (runs on
http://localhost:4000):npm run dev
- Open a new terminal and navigate to the project root directory:
cd .. - Install the dependencies:
npm install
- Start the Next.js development server (runs on
http://localhost:3000):npm run dev
Open your browser and visit:
- Dashboard: http://localhost:3000 (Log in with one of the seeded credentials in
backend/prisma/seed.js, e.g.,owner@arjunatextile.in/password123). - Backend API Status:
http://localhost:4000/api/v1/... - ML Health Check: http://localhost:8001/health (Should return
{"status":"healthy","models_loaded":true}).