Open Source · Gamified CRM

QuestCRM

A production CRM my partner and I use daily to run our web agency's sales. It scans real businesses from Google Maps (1,400+ leads imported), audits their websites for sales angles and walks us from first call to signed deal — gamified with XP, quests and badges.

Project facts

Role
Sole author: product idea, architecture, all implementation, testing, documentation.
Timeline
August 2026 · Ongoing internal tool
Team
Solo project · used daily by a 2-person agency
QuestCRM login screen with the QuestCRM wordmark and User / Teammate account buttons

The Challenge

Off-the-shelf CRMs are heavy, generic and cloud-locked; spreadsheets lose follow-ups. We needed one local-first tool that tells us exactly who to contact today, why they might buy, what to say — and never lets a promised callback slip.

Key decision

Keep everything in a single SQLite file with Server Actions as the backend, and make every workflow step set up the next one automatically — the app must always answer "what do I do now?".

Approach

Next.js 16 App Router with typed Server Actions over better-sqlite3 and Drizzle. Leads come from an unofficial Google Maps endpoint with automatic Overpass fallback; each site gets a lightweight SSRF-safe audit whose facts become pain signals. A rules engine scores leads (transparent breakdown), recommends services from a catalog, generates sales briefs and schedules cascading follow-ups after every outcome. Demos ship with unique tracking links that flip to viewed the moment a prospect looks.

Key Highlights

  • Google Maps lead scanner (no API keys) with Overpass fallback and cross-source deduplication
  • SSRF-hardened website audit: HTTPS, viewport, analytics, CMS detection, broken links
  • Transparent lead scoring v3 — every point explained via a factor breakdown
  • Follow-up cascade: no-answer retry in 2/4 days, then channel switch, with auto email drafts
  • Tracked demo links (/d/[token]) recording the moment a prospect opens them
  • 100-level XP progression tuned to about one year of real two-person usage

Architecture

  • Next.js 16 App Router + typed Server Actions (no REST layer needed)
  • SQLite via better-sqlite3 + Drizzle ORM, single-file local-first storage
  • Auto-migration system: idempotent DDL plus incremental ensureColumn steps
  • Session auth with scrypt password hashing and HMAC-signed cookies
  • Playwright screenshot pipeline and end-to-end workflow smoke tests

Verification

  • 18 unit tests covering scoring, level thresholds, NBA rules and signal combos
  • scripts/smoke-workflows.ts asserts the full A/B/C acquisition flows against the real libs
  • Production build, fresh-seed validation and per-page HTTP checks on every release

Current limitations

  • Google Maps scraping violates Google ToS — an OpenStreetMap fallback ships built-in
  • Email delivery is mock-only until SMTP credentials are configured
  • Designed for a two-person agency, not multi-tenant teams

Outcome

Replaced our spreadsheet workflow entirely: 1,400+ qualified leads imported (92% with phone numbers), audited and queued — with the system telling us every morning exactly who to call and why.

Next.js 16TypeScriptSQLiteDrizzleServer ActionsPWAPlaywrightOpen Source