AI Accounting Platform

Luca:
ICAI CA-GPT

A ~199,000 LOC TypeScript monorepo built for Chartered Accountants in India — multi-provider LLM orchestration, pgvector-backed RAG, 11 chat modes and 10 statutory-compliance modules over 106 PostgreSQL tables. Part of the FinACEverse platform.

~199K LOC106 tables5 LLM providers11 chat modes
VIEW LIVE
Closed source
Commercial product — the repository is private.

CORE CAPABILITIES

Multi-Provider LLM

Anthropic Claude, OpenAI, Google Gemini, Azure OpenAI and Perplexity behind one registry with health-scored fallback routing.

Health Monitoring

A health monitor tracks provider availability so the orchestrator can reroute traffic.

pgvector RAG

Document ingestion into a pgvector store, with semantic triage over retrieved context.

Conversation Memory

Persistent memory and a continuous-learning loop across sessions.

Statutory Modules

Ten India compliance modules spanning GST, MCA, Companies Act and Income Tax workflows.

106-Table Schema

A single Drizzle schema of 106 PostgreSQL tables backing the whole platform.

Product Interface

Assistant, compliance modules and analytics in one workspace.

Multi-Mode Chat
Core Workflow

Multi-Mode Chat

MIS Reports
India Compliance

MIS Reports

Conversation Analytics
Insights

Conversation Analytics

Product Landing
Marketing

Product Landing

The routing layer

Five providers, one registry

A compliance assistant that stops working because one vendor is rate-limited is not usable during a filing deadline. So no part of the application talks to a model vendor directly. Every call goes through a registry that picks a provider, and a health monitor that decides which providers are currently allowed to be picked.

5 LLM PROVIDERS

claude.provider.ts

Anthropic Claude.

openai.provider.ts

OpenAI.

gemini.provider.ts

Google Gemini.

azureOpenAI.provider.ts

Azure OpenAI — the guaranteed ultimate fallback.

perplexity.provider.ts

Perplexity, for retrieval-shaped questions.

Plus registry.ts and healthMonitor.ts.

Voice runs the same pattern with its own four providers — Azure, Deepgram, ElevenLabs and OpenAI — so speech is swappable on the same terms as text.

HOW FALLBACK IS DECIDED

Every provider carries a health score

healthMonitor.ts holds a 0–100 score per provider. Successes raise it, failures lower it, and the size of the penalty depends on what went wrong — a rate limit costs more than a single transient error, and an auth or quota failure zeroes the score outright.

Cooldowns are typed, not uniform

A rate-limited provider is parked until a cooldown expires rather than retried immediately. Different failure classes get different cooldowns, and a provider recovers score when its window clears.

Below the threshold, traffic reroutes

A provider under the health floor is skipped by the registry entirely, so a degrading vendor stops taking requests before the user notices it.

Azure is the floor

One provider is always reachable. When every preferred route is unhealthy the orchestrator lands on Azure OpenAI, so the failure mode is a slower answer rather than no answer.

RETRIEVAL & MEMORY

pgVectorStore.ts

The embedding store, sitting in the same PostgreSQL instance as the relational data.

documentIngestion.ts

Chunking and embedding of uploaded client documents.

semanticTriage.ts

Decides what retrieved context is worth putting in front of the model.

conversationMemory.ts

Persistent memory across sessions rather than per-thread context only.

continuousLearning.ts

Feeds observed conversation outcomes back into the system.

Embeddings live in pgvector inside the same PostgreSQL database as the 106 relational tables, so a retrieved chunk and the engagement record it belongs to are one query apart rather than two systems apart.

Clarify first

The assistant is allowed to not know yet

Accounting answers are conditional. The treatment of a transaction turns on facts the question rarely carries — which framework applies, which year, whether the entity is a company, what the counterparty is. A model that guesses those silently produces something that reads correct and is not.

So the assistant writes two blocks into its own answer: an Unconfirmed — answer these to refine list, and an Assumptions block stating what it proceeded on. The orchestrator parses those questions back out of the response and gates the next turn on them, so when the user replies to only some of them the system knows which are still open instead of treating the reply as a fresh question.

The effect is that uncertainty is visible in the output rather than hidden inside it — the user can see exactly which assumptions the answer is standing on.

Spreadsheets as a compiled artefact

The Excel subsystem does not let a model write cell formulas. The model emits an intermediate representation that names inputs, rows and scenarios, and a deterministic compiler turns that into the workbook — picking cell addresses, sheet layout and named ranges itself. Because the IR has no cell-address surface at all, a whole class of cross-sheet reference bugs becomes unrepresentable rather than merely discouraged by a prompt.

11 CHAT MODES

StandardResearchChecklistWorkflowAuditCalculationScenariosForensicsDeliverablesRoundtableSpreadsheet

A mode is not a prompt preset. Each one changes the shape of the output as well as the reasoning behind it — Checklist returns a worked checklist, Audit Plan returns a plan, Calculation shows the working, Scenario Simulator varies inputs, Deliverable Composer produces a client-ready document, Roundtable runs several viewpoints against each other, and Spreadsheet emits a workbook. Deep Research and Forensic Intelligence widen the retrieval pass before answering. Picking the mode is how a user tells the system what kind of artefact they actually want back.

10 INDIA COMPLIANCE MODULES

Tally Sync & Finalization

Ledger sync out of Tally into the year-end finalization workflow, so the books a firm already keeps become the starting position rather than something re-entered.

GST Reconciliation

GSTR-1 and GSTR-3B set against the purchase register, with input tax credit mismatches flagged where the return and the books disagree.

Working Paper Library

Reusable audit working papers held centrally, so a firm's house format survives between engagements and between staff.

Fixed Assets Register

Dual compliance on one asset base — Companies Act Schedule II straight-line depreciation alongside the Income Tax block-of-assets written-down-value method, with section 50 capital gains on disposal.

Balance Confirmations

External balance confirmations under SA 505, sent to counterparties as OTP-gated public confirmation pages so a third party can respond without an account.

MCA Filings

AOC-4 preparation for filing with the Ministry of Corporate Affairs.

CMA & Projections

Credit monitoring arrangement data and projections, computing maximum permissible bank finance under Tandon Method II and the Nayak Committee formula.

MIS Reports

Management packs — profit and loss, balance sheet and the key ratios drawn off them.

FEMA & Transfer Pricing

Form 15CA and 15CB workflows for foreign remittance, backed by a remittance register.

Tax Computations

Statutory tax computation workings carried through to the filed position.

Lineage

Three generations

Luca is the third build of the same idea, and the schema records it: 73 tables, then 104, then 106. The middle generation is where most of the domain work happened; the third was mostly a re-homing.

01ICAI-CAGPT

Apr–May 2026 · 73 tables

The first build. A chat assistant for Indian Chartered Accountants with its own self-hosted authentication and admin, and the first version of the multi-provider orchestration.

02LucaAgent

Jun 2026 · 104 tables

The generation that did the real work. The entire India statutory stack — GST reconciliation, fixed assets, balance confirmations, CMA, MCA filings — was built here, which is where the table count jumps.

03Luca

Aug 2026 · 106 tables

Re-homed into the FinACEverse platform shell. The trade was deliberate: the self-hosted auth and admin surfaces were given up in exchange for platform integration, and the domain work carried over intact.

Rewriting twice was not free, but each move dropped something that had stopped paying for itself — first a narrow chat surface, then a bespoke auth and admin stack that the platform already provided. What survived all three generations is the part that was hard to build: the statutory modules and the provider routing under them.

TECHNICAL ARCHITECTURE

frontend

  • React

    Client of the TypeScript monorepo

  • TypeScript

    ~199,000 LOC end to end

  • Multi-Mode UI

    11 chat modes in a single surface

backend

  • Express

    API layer of the monorepo

  • PostgreSQL + Drizzle

    106 pgTable definitions

  • pgvector

    Embedding store behind RAG

ai

  • Provider Registry

    Claude, OpenAI, Gemini, Azure OpenAI, Perplexity

  • AI Orchestrator

    Health-scored fallback routing

  • RAG Pipeline

    Document ingestion + semantic triage