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.
Run it yourself
Get the finished app on your own machine, ready to change however you like.
Press 'Enter' to confirm your input or 'Escape' to cancel
Press ⇧⌘P in VS Code and choose Elements: New App. Then paste this line and press Enter.
New to Elements? Install Elements first.
The code
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.
Join the community
Get a weekly digest of new posts.
Comments· 0