Skip to content
F

FinIdeas

FinIdeas Offline-First App

Created on 15th February 2026

•

F

FinIdeas

FinIdeas Offline-First App

The problem FinIdeas solves

FinIdeas Engage

Offline-first lead capture, follow-up operations, and AI-assisted insights for conference/sales workflows.

What this project includes

  • PWA app for field users (apps/pwa) to capture and manage leads offline.
  • Admin dashboard (apps/admin) for manager operations and AI Insights.
  • Core domain/data layer (packages/core, packages/shared) with lead validation, dedupe, merge, and sync logic.
  • Processor service (apps/processor) for note enrichment and lead intelligence orchestration.
  • AI scoring backend (apps/processor/intelligence) built with FastAPI.
  • CouchDB infra (infra) for sync and persistence.

Tech stack

  • React + Vite + TypeScript
  • PouchDB (offline/local)
  • CouchDB (remote sync target)
  • FastAPI (AI scoring API)
  • Local Whisper/Tesseract tooling for transcript/OCR processing

Repository structure

  • apps/pwa — user-facing offline web app
  • apps/admin — admin dashboard + AI Insights
  • apps/processor — Node/TS background processor
  • apps/processor/intelligence — FastAPI AI-scoring service
  • packages/core — repositories, dedupe/merge/sync orchestration
  • packages/shared — types, validation, utility rules
  • infra — docker-compose + CouchDB local config
  • scripts — data seeding and CouchDB helper scripts

Prerequisites

  • Node.js 20.19+ (or 22.12+)
  • npm
  • Docker + Docker Compose
  • Python 3.10+ (for AI backend)

Optional but recommended for local enrichment:

  • tesseract (OCR)
  • ffmpeg + whisper CLI (speech-to-text)

macOS install examples:

  • brew install tesseract
  • brew install ffmpeg
  • pipx install openai-whisper (or python3 -m pip install -U openai-whisper)

Quick start

  1. Install JS dependencies:
    • npm install
  2. Start CouchDB:
    • cp infra/.env.example infra/.env
    • npm run couchdb
    • npm run couchdb:apply-validation
  3. Start apps/services (separate terminals):
    • PWA: npm run dev
    • Admin: npm run admin:dev
    • Processor: npm run processor
  4. Start AI scoring backend:
    • cd apps/processor/intelligence
    • python3 -m venv .venv
    • .venv/bin/pip install -r requirements.txt
    • .venv/bin/uvicorn main:app --host 127.0.0.1 --port 8001

Local URLs

  • PWA: http://localhost:5173
  • Admin: http://127.0.0.1:5176
  • AI API docs: http://127.0.0.1:8001/docs
  • CouchDB: http://127.0.0.1:5984/
  • CouchDB Fauxton: http://127.0.0.1:5984/_utils/

NPM scripts

  • npm run dev — run PWA dev server
  • npm run admin:dev — run admin dev server
  • npm run processor — run processor worker
  • npm run build — build shared/core + PWA
  • npm run admin:build — build admin app
  • npm run typecheck — workspace typecheck
  • npm run test — workspace tests
  • npm run couchdb / npm run couchdb:down — start/stop CouchDB
  • npm run couchdb:apply-validation — apply DB validation design doc

AI Insights behavior (Admin)

AI Insights now supports cluster-aware transcript aggregation for duplicate identities:

  • Identity cluster by same normalized phone OR same normalized email.
  • Aggregates context from all linked text notes + audio transcripts.
  • Deterministic ordering by createdAt (ascending), with note-id tie-break.
  • Text de-duplication to avoid repeated snippets.
  • Scoring uses the merged transcript context, not only latest note.
  • Conflict-safe lead updates with retry in offline/sync race scenarios.

Tasks behavior (Admin)

Admin task actions are now applied against CouchDB directly (remote source of truth used by the dashboard):

  • Mark Done updates the selected task document remotely in-place.
  • Outcome-to-stage transitions are applied immediately to the linked lead (meeting_set → meeting_scheduled, etc.).
  • This removes local-cache mismatch failures where task completion could return low-level missing errors.
  • If a low-level error still bubbles up, the UI shows a clear refresh-and-retry message.

Data seeding

Useful scripts:

  • node scripts/seed-sales-demo.mjs
  • node scripts/seed-ai-insights-demo.mjs
  • node scripts/seed-quality-15.mjs

Troubleshooting

  • Processor exits / no scoring updates: ensure only one processor instance is running.
  • AI scoring timeouts: verify FastAPI backend is up on 8001 and local model runtime is healthy.
  • No transcript/OCR updates: verify Whisper/Tesseract commands are installed and accessible in shell path.
  • Couch sync issues: re-run npm run couchdb:apply-validation after DB reset and confirm infra/.env credentials.

Notes

  • This project is local-first; many updates are eventually consistent after sync.
  • Keep processor and AI backend running during transcript/OCR/AI demo flows.

Discussion

Builders also viewed

See more projects on Devfolio