SmartCA
Personal finance and Indian income-tax workspace
People pick a tax regime by guesswork, and chatbots make up tax numbers.
A ledger, a deterministic AY 2026-27 tax engine, a Form 16 vault and a tool-grounded assistant.
Both regimes compared side by side; every assistant figure comes from SmartCA's own tools.

- Role
- Full-stack development
- Year
- 2026
- Stack
- Next.js, TypeScript, PostgreSQL, Drizzle ORM, RAG, LLM tool calling, Auth.js
Overview
A workspace where a person keeps an income and expense ledger, computes income tax for AY 2026-27 under both regimes, stores Form 16 PDFs, and asks an assistant that only quotes figures from SmartCA's own tools.
The problem
Salaried people in India pick a tax regime by guesswork and keep finances across bank apps, PDFs and spreadsheets. General chatbots make up numbers when asked about tax.
What I built
- 1Built a deterministic tax engine for AY 2026-27 that compares the old and new regime side by side.
- 2Added a document vault with Form 16 text extraction and CSV import for the ledger.
- 3Built RAG tax-law retrieval over a chunked corpus of official Indian tax sources, scoped by assessment year, statutory section and authority tier, that returns a typed refusal when evidence is missing.
- 4Measured retrieval with an evaluation harness reporting recall@1/@3/@5, MRR, evidence support, distractor intrusion and refusal accuracy.
- 5Designed the Ask SmartCA orchestrator over six server-run tools (tax-law search, transactions, summaries, tax calculation, regime comparison, simulation), so every figure comes from the deterministic engine, never the model.
- 6Hardened the model boundary with tool allowlists, server-side user scoping and an answer-validation layer that withholds unsupported figures.
- 7Deployed on Vercel with a Neon PostgreSQL database, Auth.js sign-in and user-scoped data.
Highlights
- The assistant cannot invent a number: figures only come from tools.
- Architecture decisions are recorded as ADRs in the repository.
- Over 1,200 automated test cases across 89 test files, including security tests for the assistant.
How it works
- Next.js app + Auth.js
- Ledger and document vault
- Deterministic tax engine
- PostgreSQL on Neon (Drizzle)
- RAG over official tax sources
- Ask SmartCA: 6 tools → answer validation
Key decisions and trade-offs
Numbers only from tools
The assistant cannot invent a figure: every number comes from SmartCA's tools and tax-law statements cite official guidance.
Decisions written down
Provider choice and the data-egress policy are recorded as architecture decision records in the repository.
Local model for development
The assistant was verified end to end against a local Ollama model before any external provider was approved.
What I'd improve next
- Switch the assistant on in production once an API key is issued; it is built and approved but not yet enabled.
Screens
