An open-source, local-first AI financial operating system for SaaS startups. It combines an auditable double-entry ledger, deterministic financial analysis, proactive forecasting, visual workflows, document ingestion, connector adapters, and a LiveKit voice advisor powered by native audio-to-audio realtime models (Google Gemini and OpenAI Realtime).
The central product idea is interaction parity: every meaningful action available through mouse and keyboard is represented by a typed command that the voice agent can call through LiveKit RPC. The agent can read, navigate, investigate, chart, and model freely. Any action that changes financial state requires human approval.
The current build demonstrates:
- SaaS KPIs: MRR, ARR, month-over-month growth, gross margin, burn, and runway.
- Monthly revenue and expense analysis with visual drill-downs.
- Six- to eighteen-month revenue, expense, and cash projections.
- Scenario modeling for hiring, pricing, annual prepay, and new initiatives.
- Proactive cash-buffer, budget, cost-growth, and classification warnings.
- Budget-versus-actual analysis by operating category.
- CSV/bank-statement import with local auto-categorization.
- Receipt and invoice ingestion with Gemini or OpenAI vision and a review queue.
- Stripe, QuickBooks, and Xero connector adapters.
- A balanced double-entry journal and trial-balance health checks.
- LiveKit voice sessions with native audio-to-audio streaming (Gemini Live & OpenAI Realtime).
- Automatic local agent worker dispatching configured directly in client-side access tokens.
- LiveKit RPC forwarding from agent tools to the Electron interface.
- An offline deterministic advisor and optional local Ollama reasoning.
- Human approval and audit trails for agent-requested writes.
This is a hackathon MVP, not production accounting, tax, audit, or investment software.
flowchart TD
Human["Mouse, keyboard, or voice"] --> Commands["Typed finance command layer"]
Agent["LiveKit Realtime advisor"] -->|RPC| Commands
Commands --> UI["React financial workspace"]
Commands --> Engine["Deterministic finance engine"]
Commands --> Approval["Approval and audit controls"]
Engine --> Ledger["Local double-entry ledger"]
Connectors["CSV, Stripe, QuickBooks, Xero, images"] --> Ledger
LocalAI["Rules + optional Ollama"] --> Commands
- The selected Realtime model (Gemini or OpenAI) interprets intent, selects tools, and explains results, while dynamic OCR parses document fields.
- The TypeScript finance engine calculates every authoritative metric and forecast.
- Only
postedtransactions affect statements, KPIs, budgets, and cash. - Low-confidence imports become draft journal entries and enter a review queue.
- Each journal entry must balance before it can enter the trial balance.
- Agent-originated categorization and connector-sync commands require human approval.
- Every command records its actor, timestamp, summary, and outcome.
- Electron 38
- React 19 + TypeScript + Vite
- Zustand local persistence
- Recharts
- LiveKit Agents, LiveKit Client SDK, and LiveKit RPC
- Google Gemini Live API (
gemini-2.0-flash-exp) & OpenAI Realtime API (gpt-realtime-2.1) - Google Gemini 2.0 Flash & OpenAI Responses (
gpt-5.6) APIs for OCR - Optional Ollama-compatible local model
- Vitest
Requirements:
- Node.js 20 or newer
- npm 10 or newer
npm install
npm run devProduction renderer build:
npm run buildPackage for the current operating system:
npm run distCopy .env.example to .env.local and set:
VITE_LIVEKIT_URL=wss://your-project.livekit.cloud
VITE_LIVEKIT_TOKEN=short-lived-participant-token
LIVEKIT_URL=wss://your-project.livekit.cloud
LIVEKIT_API_KEY=...
LIVEKIT_API_SECRET=...
OPENAI_API_KEY=...For a real deployment, use VITE_LIVEKIT_TOKEN_ENDPOINT instead of placing a static participant token in the renderer environment.
Run the agent worker:
npm run agent:check
npm run agent:devThe worker uses:
gemini-2.0-flash-exp(default Gemini) orgpt-realtime-2.1(default OpenAI) for low-latency audio-to-audio realtime interaction.- LiveKit RPC method
finance.executeto operate the desktop.
CSV is fully local and accepts common date, description, amount, debit, credit, and category column aliases. See sample-data/transactions.csv.
Set STRIPE_SECRET_KEY. The adapter imports Stripe balance transactions and normalizes payouts, fees, and revenue into the local model.
Set QUICKBOOKS_ACCESS_TOKEN and QUICKBOOKS_REALM_ID. The MVP adapter imports purchases. Production OAuth onboarding and token refresh remain roadmap work.
Set XERO_ACCESS_TOKEN and XERO_TENANT_ID. The MVP adapter imports bank transactions. Production OAuth onboarding and token refresh remain roadmap work.
With credentials configured, image and PDF documents are sent to Gemini 2.0 Flash or OpenAI for structured extraction. Without a key, documents stay local and enter manual review.
Without internet, the app retains:
- The transaction store and balanced journal.
- Dashboards and visual drill-downs.
- MRR, ARR, growth, margin, burn, and runway calculations.
- Budget analysis, forecasts, warnings, and scenarios.
- CSV import and rule-based categorization.
- A deterministic typed advisor.
For richer local reasoning, run Ollama and configure:
OLLAMA_BASE_URL=http://127.0.0.1:11434
OLLAMA_MODEL=gpt-oss:20bRealtime voice currently uses LiveKit and therefore requires a network connection. A local Whisper/Piper voice adapter is a post-hackathon extension; the offline MVP is intentionally described as typed advisory rather than claiming offline voice that is not implemented.
npm test
npm run build
npm run agent:checkTests cover monthly statements, SaaS metrics, cash/runway, budgets, forecasts, scenarios, CSV normalization, command permissions, balanced journal entries, and draft exclusion.
This project was designed and implemented in a primary Codex Build Week session using GPT-5.6. Codex was used to:
- Convert a broad “full startup accountant” idea into a judgeable vertical slice (ECON).
- Design the shared command/RPC architecture, dynamic token-based dispatching, and trust boundaries.
- Implement the React/Electron workspace and financial visualizations.
- Build and test the deterministic finance, forecasting, ingestion, and ledger layers.
- Implement the LiveKit agent support for both Google Gemini Live and OpenAI Realtime.
- Run compilation and domain tests, diagnose failures, and document verification steps.
GPT-5.6 is also used inside the product for:
- The LiveKit financial advisor’s low-latency realtime reasoning and tool selection.
- Multimodal receipt and invoice extraction.
The model is never the source of truth for balances, KPIs, journal arithmetic, budgets, or forecasts. Those values come from tested deterministic code.
The architectural direction supports staged growth, but the current build does not claim production readiness at that scale. Major milestones include:
- OAuth onboarding, webhook sync, reconciliation, and idempotent connector jobs.
- Accrual accounting, AR/AP, deferred revenue, revenue recognition, and close workflows.
- Multi-currency, multi-entity consolidation, departments, and cost centers.
- Cohorts, churn, CAC, LTV, bookings, billings, and board reporting.
- RBAC, SSO, segregation of duties, immutable audit storage, and approvals.
- Encryption and key management, backups, observability, SOC 2 controls, and disaster recovery.
- Accountant collaboration, exports, jurisdictional integrations, and external audit support.
Apache License 2.0. See LICENSE.
