Demo: a sales pipeline in one command

The fastest way to start a geenius-mvp app is no longer an empty records feature. It is a demo app — and the first of the three that ship is a Mini CRM.

pnpm new my-crm --demo crm
A CRM with sample data, in one command.

What one command generates

The crm demo is a declarative spec in tools/lib/demos.mjs with two entities: contacts and activities. The codegen turns that spec into real code inside the scaffold — a schema block per table, a full CRUD backend module (list, create, update, delete, all scoped to the signed-in user), shared constants for every select field, and an EntityConfig-driven multi-view page registered as a feature. Nothing is copied from a frozen template; everything is generated from the spec.

Contacts carry name, company, email, a stage select, a deal value, a close date, tags, and notes. The stage options ship with tones the whole UI respects: Qualified is accent, Proposal is warn, Won is ok, Lost is danger. Activities are the second entity — a summary, a contact, a kind (call, email, meeting), and a date — so the CRM has an activity log from minute one.

Sample data you will recognize

Each entity carries seed rows, and the generated page shows a Load sample data button whenever the workspace is empty. Click it and a seedDemo mutation inserts the sample pipeline: Ada Lovelace of Analytical Engines with an 18,000 proposal, Grace Hopper qualified at 9,500, Alan Kay as an inbound lead, Barbara Liskov already won at 26,000, Edsger Dijkstra lost to build-in-house, and Margaret Hamilton's 32,000 Apollo Systems proposal. Three activities land too — an intro call, a sent proposal, a demo meeting. The seed is idempotent: it refuses to run if you already have data.

The role keys become CRM features

Because the spec fills the entity kit's role keys, the views arrive pre-assigned to jobs. statusKey is stage, so the kanban board is your pipeline — drag Ada from Proposal to Won and the stage change persists. amountKey is dealValue, so the stats view shows revenue totals per stage. dateKey is closeDate, so the calendar is your follow-up view. The demo also picks sensible chrome defaults — the saas design, blue accent, sidebar layout — all overridable with the usual flags.

Reshape it, rename it

The spec is the input, so reshaping is a flag, not a refactor. Backend and frontend follow together:

# add a Lead source select, drop notes:
pnpm new my-crm --demo crm --fields "+source:select:Lead source,-notes"

# make it yours — rename the primary table and labels:
pnpm new my-crm --demo crm --table clients --labels "Client,Clients"

The rename flags are the demo-eject move: the generated code, nav entry, and schema all say clients, and nothing remembers it started as a demo.

Claude gets a pipeline too

Scaffold with the mcp feature on and each entity also gets MCP tools wired into the app's MCP server: list_contacts, create_contact, and set_contact_stage (validated against the exact stage values). Connect Claude the usual way and your assistant can read the pipeline and advance deals on your behalf — scoped to you, like every other MCP call.

pnpm new my-crm --demo crm --features mcp
A working sales pipeline, with data, before your coffee cools.

Then pnpm install, npx convex dev --once, and pnpm deploy my-crm — the demo is a real app from the first command.

← All posts