Dealwren: a CRM with a live pipeline board for a small sales team
Contacts, companies and deals on a drag-and-drop pipeline board, with deal timelines, follow-up tasks, a morning task email and CSV export, all live.
Agent specs
- Agent
- Claude Code, Opus 5.5 Medium
- Time
- 25 min
- Cost
- $9.39*
Agents work faster and more accurately on Elements.
* Cost at API rates, September 2026.
Run it yourself
Paste this prompt into your AI agent. You get the finished app on your own machine, ready to change however you like.
Install elements: curl -fsSL 'https://install.elements.dev?os=darwin' | sh && export PATH=~/elements/bin:$PATH Create an Elements app from the elementscode/demo-dealwren scaffold: cd ~/elements/projects elements create dealwren -scaffold=elementscode/demo-dealwren cd dealwren Start the app.
How it's built
Dealwren needed owner and rep accounts, email invites, a pipeline board and deal timelines that update for everyone on the team, a CSV export, and a morning email of each rep's tasks. Each of those is a part of Elements, so the agent spent its 25 minutes on the CRM itself.
What Elements gave the app
- Live records. Deals, timeline entries, contacts, companies and tasks are LiveTables. Dragging a deal to a new stage saves it and logs the stage change on the deal's timeline in one transaction, and a database trigger broadcasts each timeline entry, so the move shows on every open board, timeline and dashboard.
- Morning task emails. A one-line cron schedule runs a job at 8am that queues one email per rep listing the follow-ups due that day, keyed so each rep gets one email a day.
- Invites by email. The owner invites a rep by email from an
@rpcfunction, and the invite link signs the new rep in. - Owner-only actions. One guard on the signed-in user's role lets only the owner delete records or invite, and the owner downloads contacts as CSV.
- Data from SQL files. Migrations define the schema, seed an owner, two reps, five companies, ten contacts and fifteen deals with timelines and tasks, and add the timeline trigger. The project server applied each one as soon as it was saved.
What the project server gave the agent
The project server runs alongside the agent and answers as soon as a file is saved: it type-checks the templates, TypeScript and SQL, applies migrations and reruns the tests, so every question came back right away and the agent kept building.
What shipped
The app type-checks with zero errors and all 43 tests pass. Every page works on desktop and phone, and live updates arrive across tabs, such as a board move or a new note appearing on another open board and timeline.
The code
Build it from scratch
To watch your agent build this app from an empty project, use the prompt we used instead. It takes longer than starting from the finished app above.
Install elements: curl -fsSL 'https://install.elements.dev?os=darwin' | sh && export PATH=~/elements/bin:$PATH Create an Elements app: cd ~/elements/projects elements create dealwren cd dealwren Start the app, then build this: Build a CRM named dealwren for a small sales team. The team's data is private to the team. Two kinds of accounts: owner and rep. The owner invites reps by email. Everyone sees all records. Only the owner can delete records or export. - Contacts: name, email, phone, company, owning rep, notes. - Companies, each listing its contacts and deals. - Deals: name, company, value, stage (lead, qualified, proposal, negotiation, won, lost), expected close date, owning rep. - Pipeline board: a column per stage with its total value, drag a deal to change 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 8am each rep gets an email listing their tasks due that day. - Dashboard: pipeline value by stage, deals won this month, open deals per rep. - Export contacts as CSV. Seed one owner, two reps, five companies, ten contacts and eight deals across stages. Show the seeded logins on the sign-in page. Board moves and new activity update in real time.
Comments· 0