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 appapps/admin— admin dashboard + AI Insightsapps/processor— Node/TS background processorapps/processor/intelligence— FastAPI AI-scoring servicepackages/core— repositories, dedupe/merge/sync orchestrationpackages/shared— types, validation, utility rulesinfra— docker-compose + CouchDB local configscripts— data seeding and CouchDB helper scripts
Prerequisites
- Node.js
20.19+(or22.12+) - npm
- Docker + Docker Compose
- Python 3.10+ (for AI backend)
Optional but recommended for local enrichment:
tesseract(OCR)ffmpeg+whisperCLI (speech-to-text)
macOS install examples:
brew install tesseractbrew install ffmpegpipx install openai-whisper(orpython3 -m pip install -U openai-whisper)
Quick start
- Install JS dependencies:
npm install
- Start CouchDB:
cp infra/.env.example infra/.envnpm run couchdbnpm run couchdb:apply-validation
- Start apps/services (separate terminals):
- PWA:
npm run dev - Admin:
npm run admin:dev - Processor:
npm run processor
- PWA:
- Start AI scoring backend:
cd apps/processor/intelligencepython3 -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 servernpm run admin:dev— run admin dev servernpm run processor— run processor workernpm run build— build shared/core + PWAnpm run admin:build— build admin appnpm run typecheck— workspace typechecknpm run test— workspace testsnpm run couchdb/npm run couchdb:down— start/stop CouchDBnpm 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 Doneupdates 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
missingerrors. - 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.mjsnode scripts/seed-ai-insights-demo.mjsnode 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
8001and 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-validationafter DB reset and confirminfra/.envcredentials.
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.
Technologies used
Discussion
Builders also viewed
See more projects on Devfolio