Production-grade corporate credit appraisal, powered by Google Gemini AI.
Ingest financial documents → verify, stress-test, and score creditworthiness → generate a bank-standard Credit Appraisal Memo.
Features · Quick start · How it works · Deploy · Contributing
Intelli-Credit Terminal is an automated corporate credit appraisal system. It replicates and enhances professional banking workflows: it ingests a borrower's financial documents, cross-verifies the data, runs forensic fraud detection, scores the borrower across the Five Cs of Credit, performs interactive stress testing, and produces a comprehensive Credit Appraisal Memo (CAM) — the document a credit officer would write by hand.
- Document ingestion — Upload PDF, CSV, JSON, TXT, and images. The serverless API extracts and forwards them to the model.
- Forensic fraud detection — AI-powered identification of shell companies, circular transactions, asset inflation, and director/shareholder anomalies.
- The Five Cs of Credit — Scored analysis across Character, Capacity, Capital, Collateral, and Conditions.
- Interactive stress testing — Apply revenue and interest-rate shocks and instantly see stressed DSCR, ICR, and revised risk grades.
- Bureau & registry integrations — Pluggable simulated (mock) and real external calls for eCourts, MCA, CIBIL, and LTV calculations.
- Automated CAM generation — A professional, exportable memo (PDF / JSON) with evidence-backed findings.
- Client: React 19, Vite, Tailwind CSS v4, Recharts, Framer Motion, Lucide
- Server: Vercel Node.js serverless functions (Web
Request/Response). A local Express dev harness (server.ts) mirrors the same analysis core. - AI: Google Gemini (
@google/genai, modelgemini-3-flash-preview) with function-calling tools and Google Search grounding. - Document export: jsPDF, html2canvas, html-to-image, React Markdown.
Security model: the Gemini key and all third-party credentials live server-side only. The client never sees a secret — every AI/bureau call is proxied through
POST /api/analyze. Seedocs/architecture/SERVICE_MAP.md.
Prerequisites: Node.js >= 20 and a free Gemini API key.
# 1. Clone
git clone https://github.com/NITISH-R-G/Intelli-Credit-V2.git
cd Intelli-Credit-V2
# 2. Install
npm ci
# 3. Configure (add your GEMINI_API_KEY)
cp .env.example .env
# 4. Run the dev server (Vite SPA + local /api/analyze on http://localhost:3000)
npm run devOpen http://localhost:3000, upload a financial document, and run an analysis.
Browser ──POST /api/analyze (files + settings)──▶ api/analyze.ts
│
▼
api/_lib/analyze-core.ts (agentic loop:
up to 10 Gemini calls + tool dispatch)
│
api/_lib/mcp-tools.ts ◀───┘ (bureau / MCA / eCourts)
│
Google Gemini ◀──────────┘
│
{ analysis } ◀───────────┘
Browser ◀──────── JSON ──────────────────────────────┘
│
└─▶ calculateRiskAndFraud() (pure client math) ──▶ UI
The same runAnalysis core is used by both the Vercel function and the
local dev server, so dev and prod behavior are identical. The browser keeps the
cheap post-processing (risk scoring, stress testing, export) and never holds a
key. Full details in
docs/architecture/SERVICE_MAP.md.
- Push the repo to GitHub.
- Import it into Vercel — the included
vercel.jsonis detected automatically (Vite framework,/apifunctions, security headers, 60smaxDuration). - In Settings → Environment Variables, add:
GEMINI_API_KEY— required (your Gemini key)ECOURTS_API_KEY— optional (enables the eCourtssearch_casestool)ANALYZE_SECRET— optional (if set, callers must send it in thex-analyze-secretheader; gates the public endpoint)
- Deploy. The API key never reaches the client bundle.
npm run typecheck # tsc --noEmit
npm run lint # eslint .
npm run test # vitest run
npm run build # vite build
npm run format # prettier --write .CI runs typecheck, lint, test, and build on every pull request.
Contributions are welcome! Read CONTRIBUTING.md for setup,
coding standards, commit conventions, and the label/triage process. Good first
steps: issues labeled
good first issue
and
help wanted.
Found a vulnerability? Please report it privately via
GitHub Security Advisories —
do not open a public issue. See SECURITY.md for the full
policy and response SLA.
MIT © NITISH-R-G.
Built with Google Gemini, React, Vite, and Tailwind CSS.
