Production-grade · AI-powered · Open source

Financial intelligence
that actually works.

InsightStack is a full-stack financial analytics platform built to production standards — not a demo. Real auth, real caching, real tests, real AI. Upload a CSV and get AI-generated spending insights in under 60 seconds.

29 integration testsZero mocks60s CSV to insight100% TypeScript strict12-layer security

0s

CSV to first AI insight

0

integration tests — zero mocks

0+

typed API endpoints

0k

char prompt cap for cost control

0%

TypeScript — strict mode

0hr

insight cache TTL per fingerprint

Data pipeline

From CSV to insight in 5 steps.

Click any step to explore the implementation detail.

↑

CSV Upload

Any bank or card export

Step 1 / 5

PapaParse streams the file client-side, validates headers, and type-infers every column. Malformed rows are reported before a single row touches the database.

Architecture

Six systems. One platform.

Each independently designed and production-hardened.

Security

JWT Auth System

Register, login, password reset via SendGrid, role-based access control. Bcrypt-hashed passwords, dual-auth via Bearer token and HttpOnly cookie.

Data

CSV Ingestion Pipeline

Upload any bank export. PapaParse validates every row, rejected rows are reported, accepted rows inserted atomically via Prisma transactions.

Analytics

Metrics Engine

Server-side computation of income, expenses, savings rate, category totals, and monthly breakdown. Cached as MetricSnapshot with a 1-hour TTL.

AI

FinanceAI Engine

Custom-built: BM25 retrieval (Elasticsearch algorithm), linear regression for trend detection, Herfindahl-Hirschman Index for concentration, 10 expert rules, NLG composer. Zero external API.

Production

Rate Limiting & Quotas

Per-user and per-IP limits on every mutating endpoint, backed by a PostgreSQL RateLimitBucket table with serializable transactions.

Observability

Audit Logging

Every significant action writes an immutable AuditLog row with IP, user-agent, and entity reference. Structured JSON logging in production.

Security

Security-first, by default.

Every layer hardened before the first line of feature code was written.

Security scan

0 / 12 layers verified

bcrypt password hashing (cost 10)
JWT with 7-day expiry
HttpOnly + Secure + SameSite cookies
CSRF origin validation on mutations
Per-IP rate limiting on auth endpoints
Per-user daily AI quota (30/day)
PII auto-redacted before AI processing
Zod schema validation on all inputs
Content-Security-Policy headers
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Strict-Transport-Security (HSTS)

Stack

World-class open source.

Every dependency is a deliberate choice.

Framework

Next.js 16React 19TypeScript 5

Styling

Tailwind CSS v4RechartsFramer-style CSS

Backend

Next.js Route HandlersPrisma 7Zod

Database

PostgreSQL (Neon)Prisma Migrations

AI

FinanceAI (custom)BM25 retrievalExpert rule engineLinear regression

Auth

JWTbcryptHttpOnly cookies

Security

CSRFRate limitingCSP headersHSTS

Email

SendGridPassword reset flow

Parsing

PapaParseCSV streaming

Testing

29 integration testsPlaywright E2ENode test runner

CI/CD

GitHub ActionsVercelPrisma migrate

Monitoring

Structured JSON logsRequest IDsAudit trail

Engineering

Decisions that matter.

Intentional choices at every layer — and the reasoning behind them.

01

Prisma driver adapter over a connection pooler

Direct SSL control per environment via @prisma/adapter-pg — no certificate failures between local, CI, and Neon. Connection pooling is handled at the driver layer, not proxied through a third service.

02

Connection string SSL detection over NODE_ENV

NODE_ENV is 'production' in CI too, making it an unreliable signal. Checking the connection string hostname for 'localhost' is the precise signal — it's either a local socket or it isn't.

03

Custom AI engine over third-party API

Building FinanceAI from scratch (BM25, linear regression, HHI, expert rules) took more work than calling OpenAI. The payoff: zero API cost, zero latency, zero vendor lock-in, and full explainability. For a portfolio, 'I built the AI' is a stronger signal than 'I called ChatGPT.'

04

MetricSnapshot caching at the database layer

Aggregation queries run once per hour per dataset, not on every page load. This keeps response times fast regardless of traffic spikes. Insight results are also cached 24 hours by data hash.

Fully open source on GitHub

See every line.
Run it yourself.

The full source — every API route, migration, test, and CI config — is public on GitHub. Clone it, audit it, deploy it.

MIT licensed · No credit card required · Deploy to Vercel in one click

AB

Built by Anish Bhole

Full-stack software engineer. I built InsightStack because I wanted a finance tool that analysed my spending without asking for my bank credentials. This is the codebase I'd want to find if I were evaluating a candidate.