Forge64 logo
All app types

Build a CRM

How to build a CRM with AI

To build a CRM, describe who it is for and what they do in it, and let Forge64 plan and generate the app. Contacts, companies and a deals pipeline with custom fields, activities, notes and tasks, saved views and filters, bounded CSV import/export and bulk actions run as queued jobs, role and field-level permissions, an append-only audit trail and rollup-based reporting; webhooks and email sync are designed for and deferred. The core parts of a first version are contacts, companies and deals, pipelines and stages (kanban), custom fields, activities, notes and tasks and saved views, filters and search.

Last checked

What the first version needs

These are the parts a CRM needs before it is useful. Each one is something the plan covers.

  • Contacts, companies and deals: The core records, relationships between them, owners and lifecycle status.
  • Pipelines and stages (kanban): Move deals through configurable stages with ordering, win/loss reasons and stage history.
  • Custom fields: Let each workspace add typed fields without schema migrations, and still filter, sort and report on them.
  • Activities, notes and tasks: Log calls/meetings/notes against records and schedule follow-ups with due dates and assignees.
  • Saved views, filters and search: Table views with column choice, sort, filters and shared team views.
  • Roles, record scope and field-level permissions: Decide who can see and change which records and which fields.
  • CSV import: Bring existing data in safely, with a preview, validation errors and idempotent commit.
  • CSV export: Download filtered data without stalling the app or leaking hidden fields.
  • Bulk actions: Reassign, change stage, tag, delete or update many records without timeouts or partial states.

Parts you can add in the first version

  • In-app notifications and email reminders: Task due, deal assigned, mentions in notes.

The data it stores

Each table below becomes part of the Postgres database that belongs to your app.

  • workspace_members: role: admin|manager|rep|viewer|custom; the last admin cannot be removed or demoted (checked in the same transaction); invitations expire after 7 days.
  • companies: domain lowercased and stripped of www; custom validated against custom_field_defs before write; soft delete purged after 30 days.
  • contacts: email_norm = lowercase trimmed email, maintained by trigger; do_not_contact blocks bulk email actions; phone stored E.164; PII table, see compliance.
  • pipelines: kind: sales|renewal|custom; archiving a pipeline requires moving or closing its open deals.
  • pipeline_stages: exactly one won and one lost terminal stage per pipeline; probability 0-100 drives weighted forecast.
  • deals: status: open|won|lost; amount stored in minor units with an explicit currency, never float; rank is a fractional-index string so reorder touches one row; stage change and history insert happen in one transaction.
  • deal_stage_history: insert-only; source of truth for funnel and velocity reports.
  • activities: subject_type: contact|company|deal; body is plain text or sanitized markdown, max 20,000 chars; system activities record stage moves and assignments.
  • tasks: status: open|done|cancelled; recurrence is phase 2.

Pages and endpoints

Routes in a first version of a CRM
RouteWho can use itWhat it does
/autheddashboard: my tasks, open deals, rollup-based KPIs.
/contactsauthedtable view with saved views, filters, keyset paging and bulk select.
/contacts/[id]authedrecord page: fields (permission projected), activity timeline, tasks, deals, audit history.
/companiesauthedcompany table with saved views.
/companies/[id]authedcompany record with contacts and deals.
/dealsauthedkanban board and list view per pipeline.
/deals/[id]autheddeal record, stage history, activities.
/tasksauthedmy tasks by due date.
/reportsauthedpipeline, conversion and activity reports from rollups.
/importsauthedupload, map columns, preview errors, confirm, track progress.
/settings/custom-fieldsauthedmanage custom field definitions (admin).

What to leave out of version one

  • No email or calendar sync, outbound webhooks or workflow automation in phase 1 (designed for, deferred).
  • No raw SQL or user-supplied query fragments from the UI, ever.
  • No inline processing of imports, exports or bulk actions in the request.
  • No float money; amounts are integer minor units with a currency.
  • No unbounded 'select all' that exceeds BULK_MAX_ROWS.
  • Outbound webhooks and public API: plan for it, build it later.
  • Email and calendar sync: plan for it, build it later.

How Forge64 builds it

Forge64 matches your description to one of 12 reference architectures, writes the plan and data model into the project, generates the app, and runs a quality gate over the code before you see it. Each app gets its own Postgres database and sign-in with no per-user fee. Hosting on Forge Cloud and Forge Payments are rolling out.

This is a reference design for the category, not a promise that every item is generated today. Built-ins such as email, background jobs, file uploads and search are coming soon, so anything here that needs them is something you add yourself for now.

FAQ

What does a CRM need first?
Contacts, companies and deals, pipelines and stages (kanban), custom fields, activities, notes and tasks, saved views, filters and search and roles, record scope and field-level permissions. The plan for a CRM covers all of these before it generates code.
What should I leave out of the first version of a CRM?
No email or calendar sync, outbound webhooks or workflow automation in phase 1 (designed for, deferred). No raw SQL or user-supplied query fragments from the UI, ever. No inline processing of imports, exports or bulk actions in the request.
Which products define the CRM category?
Well-known examples include HubSpot CRM, Pipedrive, Salesforce, Attio and Close. Use them to decide which features your users expect, then describe your own version.

Build your app with Forge64

One prompt to a running app with auth, database, hosting and payments. Start free, no credit card required.

Start building for free