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.
Viewing readonly version of main branch: v7View latest version
A full-featured, open-source CRM built entirely on Val Town. Manage contacts, companies, deals, and activities with a modern dark UI — no external infrastructure needed.
- Pipeline value & 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
- Search & 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 kanban cards
- Amount, probability, close date, linked contact & 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)
- Frontend: React 18 via esm.sh (no build step)
- Styling: Custom CSS, dark theme
- API: RESTful JSON endpoints
All endpoints return JSON. Base URL is the val's HTTP endpoint.
| Method | Path | Description |
|---|---|---|
| GET | /api/dashboard | Pipeline stats & counts |
| Method | Path | Description |
|---|---|---|
| GET | /api/contacts?search= | List/search contacts |
| GET | /api/contacts/:id | Get single contact |
| POST | /api/contacts | Create contact |
| PUT | /api/contacts/:id | Update contact |
| DELETE | /api/contacts/:id | Delete contact |
| Method | Path | Description |
|---|---|---|
| GET | /api/companies?search= | List/search companies |
| GET | /api/companies/:id | Get single company |
| POST | /api/companies | Create company |
| PUT | /api/companies/:id | Update company |
| DELETE | /api/companies/:id | Delete company |
| Method | Path | Description |
|---|---|---|
| GET | /api/deals?stage= | List deals (optional stage filter) |
| GET | /api/deals/:id | Get single deal |
| POST | /api/deals | Create deal |
| PUT | /api/deals/:id | Update deal (including stage changes) |
| DELETE | /api/deals/:id | Delete deal |
| Method | Path | Description |
|---|---|---|
| GET | /api/activities?contact_id=&company_id=&deal_id= | List activities (filterable) |
| POST | /api/activities | Create activity |
| PUT | /api/activities/:id | Update activity |
| DELETE | /api/activities/:id | Delete activity |
lead → qualified → proposal → negotiation → won / lost
note · call · email · meeting · task
main.ts # HTTP handler — serves frontend + routes API
backend/
db.ts # SQLite schema, migrations, all data access functions
api.ts # REST API router
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