<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: bo li</title>
    <description>The latest articles on DEV Community by bo li (@aqtenor_crm).</description>
    <link>https://dev.to/aqtenor_crm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4276747%2Faf3ac2e9-f4e0-431e-b7e3-281ec0e44ca5.png</url>
      <title>DEV Community: bo li</title>
      <link>https://dev.to/aqtenor_crm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aqtenor_crm"/>
    <language>en</language>
    <item>
      <title>How we model a configurable CRM: objects, fields and page layouts</title>
      <dc:creator>bo li</dc:creator>
      <pubDate>Tue, 01 Dec 2026 15:15:49 +0000</pubDate>
      <link>https://dev.to/aqtenor_crm/how-we-model-a-configurable-crm-objects-fields-and-page-layouts-3884</link>
      <guid>https://dev.to/aqtenor_crm/how-we-model-a-configurable-crm-objects-fields-and-page-layouts-3884</guid>
      <description>&lt;p&gt;I'm building Aqtenor CRM, and the admin side is a configurable metadata model rather than hard-coded pages. This post skips the sales pitch and breaks down how we split the model into objects, fields and layouts — the trade-offs we made, and what each layer is meant to solve.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a configuration layer
&lt;/h2&gt;

&lt;p&gt;Different industries describe a "customer" very differently. A trading company tracks payment terms, credit limits and multiple contact roles. An engineering firm tracks projects, sites and equipment. A software company tracks licenses and renewal versions.&lt;/p&gt;

&lt;p&gt;If fields are baked into the code, every new vertical means a schema change, a form change and a release. The approach we took was to pull the business structure out of the code and keep it as maintainable metadata in the admin console. The frontend reads that metadata and renders forms and lists dynamically instead of using fixed pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 1: Object
&lt;/h2&gt;

&lt;p&gt;An object represents one kind of business entity: customer, contact, opportunity, quote, contract, order, payment, ticket, asset, and so on.&lt;/p&gt;

&lt;p&gt;For each object the metadata layer records:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API name, display name, icon&lt;/li&gt;
&lt;li&gt;Primary field — the column shown by default in the list&lt;/li&gt;
&lt;li&gt;Relationships: one-to-many and many-to-many; for example, one customer can have many contacts and opportunities&lt;/li&gt;
&lt;li&gt;Record types: the same object can split into types that carry different fields and layouts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The object itself stores no business data; it is a table definition. Actual records live in the data structure generated for that object.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 2: Field
&lt;/h2&gt;

&lt;p&gt;Fields hang under an object and define what information that entity records.&lt;/p&gt;

&lt;p&gt;Field types cover the common business cases: text, long text, number, currency, percent, date, datetime, single select, multi select, picklist, user, related record, attachment, phone, email, URL, and more.&lt;/p&gt;

&lt;p&gt;Each field can be configured for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Required, unique, duplicate-check rules&lt;/li&gt;
&lt;li&gt;Validation: length, range, regex, cross-field rules&lt;/li&gt;
&lt;li&gt;Option sets: single/multi select choices maintained once and reused across fields&lt;/li&gt;
&lt;li&gt;Permissions: which roles can see or edit the field&lt;/li&gt;
&lt;li&gt;Help text and default values&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A trade-off here: more field types is not automatically better. Every added type branches the rendering, import/export, report aggregation and permission logic on the frontend. Get the high-frequency types solid first, add rare ones later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 3: Page layout
&lt;/h2&gt;

&lt;p&gt;Once objects and fields exist, the layout layer decides how those fields appear on the page. It covers three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Form layout&lt;/strong&gt;: how many sections the detail page uses, the field order top to bottom, and which fields are collapsed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;List layout&lt;/strong&gt;: which columns show, column width, sorting, and filter conditions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Role-based layouts&lt;/strong&gt;: sales and managers can see different fields, paired with record-level access control&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Layouts are configured by drag and drop; changes take effect on the frontend without a release. Multiple list views can be saved — for example "My accounts", "Follow up this week", "High-value opportunities" — each with its own filters and sort order.&lt;/p&gt;

&lt;h2&gt;
  
  
  Supporting capabilities above the model
&lt;/h2&gt;

&lt;p&gt;Once the configuration layer runs, we attach a few things on top:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Flow automation&lt;/strong&gt;: trigger on record create/update/delete, or on a schedule; update fields, send notifications, check duplicates, route approvals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Approval flows&lt;/strong&gt;: different chains by amount, stage or department&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permission sets&lt;/strong&gt;: object-level, field-level and record-level control&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Import/export and API&lt;/strong&gt;: metadata and records can be exported; we expose a REST API and SDK so data is not locked inside the system&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Trade-offs we actually made
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic rendering has a performance cost&lt;/strong&gt;: lists and detail pages read metadata before rendering, so metadata needs caching instead of a database query on every request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Freedom to configure vs. ease of onboarding are in tension&lt;/strong&gt;: the more the admin can configure, the easier it is for a first-time user to get lost. Onboarding guidance and default templates matter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't make the core flow draggable just for configurability&lt;/strong&gt;: keep the main chain fixed; hand only the parts that actually vary to the configuration layer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;The system is running today; objects, fields, layouts, flows and permissions are all self-serve configured in the admin console. You can try it on a 14-day free trial (2 users, no card required):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ccnw7cb8urhm.doubao.link/app/app_17j93gsqt7h" rel="noopener noreferrer"&gt;https://ccnw7cb8urhm.doubao.link/app/app_17j93gsqt7h&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've built a similar configurable model, I'd welcome the architecture discussion in the comments.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>architecture</category>
      <category>saas</category>
    </item>
  </channel>
</rss>
