A sales CRM with an AI assistant.
A CRM for a B2B sales department: six role workspaces, a deal board, analytics and an assistant that reads the same numbers the team does.
In plain words
A sales department works in one place instead of spreadsheets. Each person sees only their part of the job: the head of sales sees the whole team, a manager sees their own deals, logistics sees what ships today. An assistant answers questions about the numbers, and it reads the same numbers the screens show.
How it works
Pick a role
The demo has six logins, from head of sales to logistics. Each opens a different workspace.
Move a deal
Deals sit on a board and pass from stage to stage, down to accounting and dispatch.
Ask the assistant
It answers from calculations over the live data, so a figure in the chat matches the figure on the dashboard.
The problem
A sales team that lives in spreadsheets and an accounting system. Managers cannot see stalled deals, and nobody trusts a chatbot that invents figures.
What we built
A full CRM with role-based workspaces from head of sales to logistics. The assistant answers from deterministic calculations over the same data the screens show. The accounting system and the model both sit behind interfaces, so a stub can be swapped for the real thing in one place.
How we know it works
| Automated tests | 1,031 |
|---|---|
| Role workspaces | 6 |
| Checks before every merge | types, lint, tests, build |
- Built with
- Next.js 16, React 19, Prisma, PostgreSQL
- Model
- Behind an interface; provider is replaceable
- Runs as
- Docker Compose: app, database, mock ERP
- Good fit for
- Sales teams, distributors, internal back offices
Under the hood
- ScreensPages and forms; they only call use-cases
- Use-casesBusiness actions; they depend on interfaces
- DomainEntities and rules; imports nothing else
- AdaptersDatabase, accounting system, model; chosen by configuration
Dependencies point inward. Swapping a stub for the real accounting system, or one model provider for another, happens in one file.
Decisions and why
The assistant computes, the model words it
Figures come from deterministic calculations over the same data as the screens. The model never makes up a number.
Everything outside sits behind an interface
The accounting system, the model and the database are adapters. The demo runs on stubs and an in-memory store; a real deployment swaps them in one place.
A guard on what leaves for the model
Outgoing text is scanned for amounts, company-name suffixes and tax-number shapes. A hit blocks the call before it reaches the network.
Six roles, one codebase
Each role gets its own workspace. The technologist works a test queue that carries no commercial data.