crm
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
main.ts
https://dcm31--6756222e02de11f1b5a742dde27851f2.web.val.run
A full-featured, open-source CRM built entirely on Val Town. Manage contacts, companies, deals, and activities with a clean light UI -- no external infrastructure needed.
- Pipeline value and revenue stats at a glance
- Recent deals feed
- Activity timeline
- Full CRUD with search
- Linked to companies
- Job title, email, phone, location tracking
- Color-coded avatar initials
- Domain, industry, size tracking
- Contacts auto-linked on detail page
- Search and filter
- Kanban board -- visual pipeline with Lead / Qualified / Proposal / Negotiation / Won / Lost stages
- Table view -- sortable list of all deals
- One-click stage transitions from the detail page
- Amount, probability, close date, linked contact and company
- Log notes, calls, emails, meetings, and tasks
- Link to contacts, companies, or deals
- Due date tracking
- Chronological timeline view
- Runtime: Val Town (Deno)
- Database: Val Town SQLite (persistent, zero-config)
- Server: Hono with JSX -- server-side rendered HTML pages
- Styling: Tailwind CSS via CDN
- No build step, no client-side JS framework
main.ts Hono entry point, mounts all page routers
db.ts SQLite schema, types, and all data access functions
components.tsx Shared layout, sidebar, stat cards, badges, SVG icons
pages/
dashboard.tsx Dashboard with stats and recent activity
contacts.tsx Contacts list, detail, create, edit
companies.tsx Companies list, detail, create, edit
deals.tsx Deals pipeline (kanban + table), detail, create, edit
activities.tsx Activity log with create and delete
All pages are server-rendered HTML. Forms POST directly and redirect.
GET / -- Dashboard with aggregate stats
GET /contacts-- List (with ?search= support)GET /contacts/new-- Create formPOST /contacts-- CreateGET /contacts/:id-- Detail viewGET /contacts/:id/edit-- Edit formPOST /contacts/:id-- UpdatePOST /contacts/:id/delete-- Delete
Same pattern as contacts at /companies/*
GET /deals-- Pipeline or table view (with ?view=pipeline|table)GET /deals/new-- Create formPOST /deals-- CreateGET /deals/:id-- Detail with stage quick-change buttonsPOST /deals/:id/stage-- Change stageGET /deals/:id/edit-- Edit formPOST /deals/:id-- UpdatePOST /deals/:id/delete-- Delete
GET /activities-- Timeline viewGET /activities/new-- Log formPOST /activities-- CreatePOST /activities/:id/delete-- Delete
lead / qualified / proposal / negotiation / won / lost
note / call / email / meeting / task
Some ideas for what to build on top:
- CSV import/export for bulk contact uploads
- Email integration via Val Town email vals
- Webhooks on deal stage changes
- Custom fields per entity type
- Multi-user auth with Val Town environment variables
- Reporting -- win rate, avg deal size, sales velocity charts