Build and run your own CRM with Claude Code and Elements
In this video we build a CRM for a small sales team with Claude Code on Elements, from one prompt. The team gets a pipeline board, contacts and companies, follow-up tasks, a dashboard, a CSV export and an email at 8am with each rep's tasks for the day. Then we work out what it costs to run, about $55 a month all in, and look at what Elements gave the agent: the tooling that keeps it on track and the app framework it builds on.
A CRM is one part of a business application. On Elements, the same application can hold the newsletter, invoicing, payments and products, with every customer record in one Postgres database, in place of a separate subscription for each. You get exactly the features your business needs, and you can change any of them by asking your agent.
Setup
We use VS Code with Claude Code in the lower left and a terminal in the upper right. Elements does not depend on the editor or the agent: the terminal, VS Code and the Claude Code desktop app all work, and so does any AI agent.
In the terminal we start Elements, a project server that runs while you work:
Terminalelements start
The browser opens on the starter app. The agent here is Claude Code with Opus 5.5.
The prompt
Agent PromptI want to build a CRM application for a small sales team. The team's data is private to the team. Two kinds of accounts: an owner and a rep. The owner invites reps by email. Everyone sees all the records, but only the owner can delete records or export. - Contacts: name, email, phone, company, an owning rep and notes. - Companies, each listing its contacts and deals. - Deals: name, company, value, stage (lead, qualified, proposal, negotiation, won, lost), expected close date and owning rep. - A pipeline board with a column for each stage and its total value. I want to be able to drag a deal to change its stage. - Deal detail: a timeline of logged notes, calls and emails, plus every stage change. - Tasks: a follow-up with a due date on a contact or deal. At 8 a.m. each rep gets an email listing their tasks that are due that day. - A dashboard: pipeline value by stage, deals won this month and open deals per rep. - Export contacts as a CSV. Seed at least one owner, two reps, five companies, 10 contacts and a couple of deals across the stages so that I can see what it looks like.
Claude Code builds the app on Elements
While the agent works, the state in the terminal turns red now and then. The project server answers the agent in microseconds with the error, the agent fixes it, and the state goes back to green.
About 20 minutes later the CRM is running. The agent finished with 47 passing tests and clicked through the app in a browser to check it. Its summary lists what it built and gives us demo accounts to sign in with.
Trying the app
We sign in as the owner and land on the dashboard: open pipeline, deals won this month, deals closing in the next two weeks, pipeline value by stage and open deals per rep. The pipeline board has a column per stage, and a deal's page has its details, its contact, follow-up tasks and a timeline. Every browser connected to the app sees changes as they happen, with no reload.
The 8am email has a preview page in development, so we can read what a rep gets each morning before any email is sent.
The app uses Elements UI, which comes with a set of themes (editorial, dashboard, playful and more). We ask Claude Code to try one, then go back. A stylesheet change shows in the browser almost instantly.
What it costs to run
Elements deploys to any Ubuntu server you reach over SSH, with providers such as AWS, DigitalOcean or Hetzner. Your agent walks you through the setup and can do it for you. We asked Claude Code for the cost, with prices as of November 11, 2026:
- About $25 a month on AWS: a small app server with a disk and a public IP address, managed Postgres with storage, and email through Amazon SES at a few cents a month.
- $30 a month for Elements, which covers two machines: your laptop for development and the server you deploy to.
That comes to about $55 a month, or about $665 a year, as of November 11, 2026. AWS prices change, so ask your agent for the current figures (EC2 (opens in a new tab), RDS for PostgreSQL (opens in a new tab), SES (opens in a new tab)). Each further machine is another license, for a bigger server or for more than one.
The tooling Elements gives the agent
Terminalelements build
The build result comes back almost instantly, in microseconds, because the project server holds the build state in memory and updates it on every save. The agent asks for the same result as JSON with elements build -json, or through the editor, and knows about a mistake as soon as it makes one.
Terminalelements test
The agent wrote the tests, and their results come back in microseconds too. Tests are how you keep an app working as it passes from one agent session to the next, or to a person: if a new feature breaks something built months ago, a test fails.
Terminalelements db
elements db opens a shell on the app's Postgres database, with the tables the agent created: users, teams, invites, companies, contacts, deals, tasks and activities. Having every part of the business in one database you can query is worth a lot. Locally the database comes with Elements; in production we recommend a managed database such as RDS, which adds backups.
The app framework the agent builds on
Each page is an .ehtml template, Elements' reactive HTML: TypeScript at the top, HTML below it that a person or another agent can read and maintain. The pipeline page imports the kanban board and other components from Elements UI, and Session and LiveView from @elements/app, which give the page its signed-in user and its real-time updates. Constructor attributes type-check the template, and a shared AppLayout template gives every page the same look.
The tests are short and readable. Styles are plain CSS. Routes are functions you write, and every page is rendered on the server by default, which matters for search. Emails are HTML templates marked for email, and jobs run on a worker off the main process: the 8am task digest is one. Jobs are part of a deploy, with nothing extra to set up.
It is all TypeScript. When we call a function that does not exist, elements build reports the error right away, and fixing it turns the state back to green. The checks run for the server and browser code.
Try it yourself
The CRM is one of the demos on elements.dev (opens in a new tab). Each demo has a "Run it yourself" command that creates the app on your machine from its scaffold and starts it.
Add a comment