App template
CRM
Work a sales pipeline: deals by stage with totals and a weighted forecast, companies and people tied together, every touch on a timeline, and reports.
Use this template
Installs the whole app into your project: its pages, routes, services with sample data, agent tools and the browser entry. Every file is yours to edit.
npx shadcn@latest add checkfu/uicontext/crm- Run itLoad from your page’s script. It builds the app with
createApp: the browser’s router, the agent tools, an offline notice, and sign-in when you turn it on. Inside an app that already routes, renderCrmTemplate, which brings its own in-memory router. - Connect your backendEvery read and write goes through
Crmin . Implement it over your API and pointCrmLiveat your Layer. - Make it yoursPages are one file per route. Delete the ones you don’t need, and the sample data in .
Screens
Pipeline
/Open deals by stage with each stage’s total, the weighted forecast, drag to move, Undo, and quick add.
Deals
/dealsEvery deal in a grid, on saved views, narrowed by filters and a close-date range, exported as CSV.
Deal
/deals/:idThe stage path, fields edited in place, the next step, people, tasks, and the timeline of emails, calls, meetings and notes.
Company
/companies/:idWhat enrichment found, its deals and people, and its history.
Person
/people/:idTheir company, the deals they’re on, their tasks and every touch.
Inbox
/inboxLogged emails beside the one being read, linked to the person, company and deal.
Tasks
/tasksOverdue, today and the week ahead, ticked off in place.
Reports
/reportsWon and lost by month, pipeline by stage, win rate and days to win, by period.
Import
/importContacts from a CSV: match columns, review the rows that can’t come in, import the rest.
Where your backend plugs in
Pages never call a backend. They read through the queries in queries/ and write through Commands kept beside the component that runs them; both capture the Crm service. Implement its interface in over HTTP, a sync engine or a database client, then change one line:
export const CrmLive = Crm.sample
// becomes your Layer, such as
export const CrmLive = Layer.effect(Crm, makeHttpCrm)The root provides it once, so every page shares one instance. Sign-in is one line: delete auth: false in once your backend serves the session routes, and the sidebar shows who signed in.
What to delete
- services/seed.ts, and Crm.sample in services/Crm.ts
- The sample CSV in pages/import/ImportPage.ts
To drop a screen, delete its file in pages/ and its route in ; TypeScript points at every link that still prints it. The agent tools are in .