Back to blog
Engineering

How to build a CRM system (without boiling the ocean)

The smallest CRM that's actually useful: data model, API, dashboard, and what to skip on v1.

RMC Engineering·22 March 2026·11 min read

Every six months we get the same question from a customer: 'should we buy Salesforce or build something?'. The answer is almost always 'buy', but for a meaningful minority of cases, the right answer is 'build a small one'. This post is the architecture for the small one.

When to build instead of buy

  • Your sales process is highly specialised and Salesforce is fighting you
  • You need deep integration with custom internal systems
  • You have <50 sales seats and the per-seat cost is biting
  • You're building product on top of CRM data, not just selling with it

The smallest useful data model

// 6 tables. That's it.
type Account = { id, name, domain, owner_id, created_at };
type Contact = { id, account_id, name, email, phone, role };
type Deal    = { id, account_id, value, stage, owner_id, close_date };
type Activity = { id, deal_id, contact_id, type, body, occurred_at };
type User    = { id, name, email, role };
type Note    = { id, entity_type, entity_id, body, author_id };

That's 90% of what every sales team needs. Everything else (custom fields, workflows, dashboards) is built on top of these six tables.

What to skip on v1

  • Permissions beyond owner/admin — add when you have 10+ users
  • Custom fields — hardcode the 5 you need, refactor when you have a 6th request
  • Workflow engine — write the 3 important workflows in code
  • Email integration — start by logging emails as activities, full IMAP later
  • Mobile app — responsive web is enough until you have 20+ field reps

Stack we'd use today

  • Next.js 14 + tRPC for the dashboard
  • Postgres + Drizzle for storage
  • Auth via Clerk or NextAuth
  • Background jobs via Inbox/Outbox in Postgres (skip Redis until you need it)
  • Deploy on Vercel or Fly.io

Total build time for the v1 above: 4–6 weeks for a senior team. After that, every feature is an iteration on real usage instead of a prediction.

Written by

RMC Engineering

Work with us