<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Api-Design · MangoDriod</title><link>https://md.eknath.dev/tags/api-design/</link><description>Api-Design updates from MangoDriod</description><language>en-us</language><atom:link href="https://md.eknath.dev/tags/api-design/index.xml" rel="self" type="application/rss+xml"/><lastBuildDate>Thu, 03 Dec 2026 23:36:12 +0530</lastBuildDate><item><title>NoCodeREST: The Small Decisions That Make a Generated Backend Usable</title><link>https://md.eknath.dev/posts/software-development/nocoderest-the-small-decisions-that-make-a-backend-usable/</link><guid isPermaLink="true">https://md.eknath.dev/posts/software-development/nocoderest-the-small-decisions-that-make-a-backend-usable/</guid><pubDate>Thu, 03 Dec 2026 23:30:00 +0530</pubDate><category>nocoderest</category><category>rest-api</category><category>backend</category><category>api-design</category><category>mcp</category><category>ai-agents</category><category>architecture</category><category>ux</category><description>A field guide to a no-code REST backend prototype: the idea, the data model, publishing, access control, reliability rules, console UX and AI-agent tooling, and every small decision that made it feel usable. Written so it can be rebuilt on any stack.</description><content:encoded><![CDATA[<p>I am taking the NoCodeREST prototype offline. It ran on a managed Java runtime in a development environment, and keeping a service alive for an invite-only experiment is not worth the monthly bill.</p>
<p>The code is not the thing I want to keep. The <em>decisions</em> are. A proof of concept teaches you a hundred small lessons that never make it into a README: why a button says &ldquo;Publish changes&rdquo; and not &ldquo;Deploy&rdquo;, why a list endpoint rejects a query parameter it used to accept, why an AI agent is not allowed to press one particular button.</p>
<p>So this is the long version. It is the documentation I wish I had when I started, and the document I will open when I rebuild this on a different stack.</p>
<p>If you want the motivation first, I wrote it up in two essays: <a href="https://md.eknath.dev/posts/software-development/seeing-software-through-abstraction/">Seeing Software Through Abstraction</a> and <a href="https://md.eknath.dev/posts/software-development/why-are-we-still-writing-backends-from-scratch/">Why Are We Still Writing Backends from Scratch?</a>. NoCodeREST is what happened when I tried to take those ideas seriously.</p>
<hr>
<h2 id="1-the-idea-in-one-flow">1. The idea in one flow</h2>
<p>Every small project starts with the same plumbing: sign-in, tables, validation, CRUD routes, pagination, filters, keys. NoCodeREST turns that plumbing into configuration.</p>
<p>The whole product is one journey:</p>
<blockquote>
<p><strong>Sign in → create an organization → create a project → design tables → choose who can do what → test → publish a versioned API → connect an app or an AI agent</strong></p>
</blockquote>
<p>Three things sit under that flow, and they never changed during the whole prototype:</p>
<ol>
<li><strong>Definitions are data, not code.</strong> A customer&rsquo;s table is interpreted metadata. It is never executable Kotlin, never raw SQL, never an expression the client sends in. This one rule made validation, safety and the UI all simpler.</li>
<li><strong>Publishing is a deliberate act.</strong> You edit a draft freely. You publish an immutable version when you are ready. Callers only ever see published versions.</li>
<li><strong>There are three kinds of people, and they never mix.</strong> Builders use the console. Integrations (apps, servers, AI agents) use scoped keys. End users of a customer&rsquo;s app sign in through the project&rsquo;s own app auth. Each has its own credentials and its own trust boundary.</li>
</ol>
<p>Everything else in this article is a consequence of those three rules.</p>
<hr>
<h2 id="2-the-hierarchy-small-enough-to-explain-in-one-breath">2. The hierarchy: small enough to explain in one breath</h2>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>Organization            shared monthly allowance and members
</span></span><span style="display:flex;"><span> └── Project            one isolated backend for one app or workflow
</span></span><span style="display:flex;"><span>      ├── Tables        optional folders group them
</span></span><span style="display:flex;"><span>      │    └── Published versions   v1, v2, ...  (immutable)
</span></span><span style="display:flex;"><span>      ├── Keys          scoped, hashed, one-time reveal
</span></span><span style="display:flex;"><span>      ├── App users     the customers of the app being built
</span></span><span style="display:flex;"><span>      └── Files         private library, attachments on records
</span></span></code></pre></div><p>I spent more time on vocabulary than on any other part of the product. The console never says &ldquo;schema&rdquo;, &ldquo;DDL&rdquo; or &ldquo;tenant&rdquo;. It says what the thing <em>is for</em>:</p>
<table>
  <thead>
      <tr>
          <th>What the screen says</th>
          <th>What it really is</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Organization</td>
          <td>the team/account boundary and shared quota</td>
      </tr>
      <tr>
          <td>Project</td>
          <td>one isolated backend workspace</td>
      </tr>
      <tr>
          <td>Table</td>
          <td>one kind of item (contacts, habits, requests)</td>
      </tr>
      <tr>
          <td>Detail</td>
          <td>a field/column</td>
      </tr>
      <tr>
          <td>Connect collections</td>
          <td>a same-project relation</td>
      </tr>
      <tr>
          <td>Protect this detail</td>
          <td>field-level encryption</td>
      </tr>
      <tr>
          <td>Publish changes</td>
          <td>cut an immutable API release</td>
      </tr>
      <tr>
          <td>Connection key</td>
          <td>a scoped API key</td>
      </tr>
  </tbody>
</table>
<p>The technical term is always one click away. It just is not the first thing you read. That is the single most useful UX rule I took from the prototype, and I come back to it in section 9.</p>
<hr>
<h2 id="3-tables-the-little-details-that-save-a-day-each">3. Tables: the little details that save a day each</h2>
<h3 id="folders-are-optional">Folders are optional</h3>
<p>The first design required a collection (a folder) before you could create a table, which is a lot of ceremony for one table. So folders became optional, and <strong>table URLs became project-wide</strong>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>/api/v{version}/{projectId}/{table_name}
</span></span></code></pre></div><p>No folder segment, no <code>/records</code> suffix. Folders still exist, but only as a way to group tables and to hang shared policy on. They are not part of the address.</p>
<h3 id="names-are-readable-and-the-system-tells-you-the-real-one">Names are readable, and the system tells you the real one</h3>
<p>Table and folder names become lowercase <code>snake_case</code>, start with a letter, and are unique across the project, because the table name is the URL. The API always returns the canonical <code>apiName</code>, and the guidance for both humans and agents is the same: <em>use the returned name, never a guessed display label.</em> IDs remain the stable locators for schema, grants and relations. Names are for people and URLs. IDs are for the machine.</p>
<p>Older resources that predate readable names can be given one later, with an explicit step to register them. Collisions are resolved by you, not guessed by the system.</p>
<h3 id="field-ids-outlive-field-names">Field IDs outlive field names</h3>
<p>Every field has a stable internal ID. You can rename a label, change a description, add an optional field, and nothing that was stored becomes unreachable. Published versions refer to field IDs, so a <code>v2</code> can show a friendlier label than <code>v1</code> without touching a single record.</p>
<h3 id="a-small-boring-set-of-types">A small, boring set of types</h3>
<p><code>text</code>, <code>email</code>, <code>integer</code>, <code>decimal</code>, <code>boolean</code>, <code>date</code>, a bounded <code>object</code> (shallow JSON with a hard depth and size limit), a same-project <code>relation</code>, and a <code>file</code> reference. That is it.</p>
<p>The restraint is the feature. Each type has a documented range. Decimals are handled as exact decimals, never floats. Dates are ISO calendar dates, and system timestamps are RFC 3339 UTC strings. Unknown fields are rejected. Types are <strong>never silently coerced</strong>: <code>&quot;12&quot;</code> is not an integer. When a request fails, the error says which field and why.</p>
<p>Four field names are reserved and owned by the platform: <code>id</code>, <code>created_at</code>, <code>updated_at</code>, <code>revision</code>.</p>
<h3 id="defaults-you-do-not-have-to-think-about">Defaults you do not have to think about</h3>
<p>The default page size is 20, the maximum is 50, the default sort is <code>created_at</code> descending. Each table can enable any of five operations (create, get, list, update, delete), and parent policies start by permitting all five. Defaults are server-resolved and preserved across ordinary edits, so the console never forgets a choice because you changed a neighbouring setting.</p>
<hr>
<h2 id="4-query-capabilities-are-declared-not-invented">4. Query capabilities are declared, not invented</h2>
<p>This was the decision I am most sure about.</p>
<p>A field is not searchable, filterable or sortable by default. You mark it:</p>
<ul>
<li><strong>Searchable</strong> (text and email only): case-insensitive substring search, with the searchable fields combined with OR.</li>
<li><strong>Filterable</strong>: equality filters, combined with AND, passed as <code>filter.&lt;field&gt;=value</code>.</li>
<li><strong>Sortable</strong>: allowed in <code>sort_by</code>.</li>
</ul>
<p>Anything else fails validation. There is no query language, no caller-supplied expressions, no &ldquo;just let me pass a WHERE clause&rdquo;. It sounds limiting, and it is, deliberately. It means the server can always tell you <em>exactly</em> which queries it will accept, the console can build its sort and filter controls from that list, and an AI agent cannot invent a query that was never designed.</p>
<p>Sorting got its own small contract. The original single <code>sort</code> parameter was replaced, and sending it now is <strong>rejected</strong>:</p>
<ul>
<li><code>sort_by</code>: <code>created_at</code> (default), <code>updated_at</code>, or a field marked sortable</li>
<li><code>sort_order</code>: <code>asc</code> or <code>desc</code> (default), case-insensitive</li>
<li>nulls sort last in either direction</li>
<li>the record ID is always the final tie-breaker, so ordering is stable</li>
</ul>
<p>Query capabilities are not permissions. Marking a field filterable never lets anyone read a row they could not already read.</p>
<hr>
<h2 id="5-publishing-the-part-that-makes-it-safe-to-change-your-mind">5. Publishing: the part that makes it safe to change your mind</h2>
<p>A table draft can change as often as you like. Callers never see it. Publishing freezes the draft into a numbered, immutable version (<code>v1</code>, <code>v2</code>, &hellip;).</p>
<p><strong>Versions share one dataset.</strong> This was one of the central decisions. If every version had its own data, publishing <code>v2</code> would look like wiping the table. Instead, all published versions of a table read and write the <em>same</em> records, each through its own contract, and each version only exposes the fields it knows about. An older client editing a record preserves the newer fields it cannot see.</p>
<p>That is only safe if changes are compatible, so the rules are strict:</p>
<ul>
<li>You may add optional fields, rename labels, change query flags and operations.</li>
<li>You may <strong>not</strong> remove or retype a field that stored data depends on. The API answers <code>SCHEMA_MIGRATION_REQUIRED</code> rather than quietly breaking an older version.</li>
</ul>
<p><strong>Publishing has a review step.</strong> Before anything is cut, a publish review reports blockers and the impact on existing versions. The console shows it in plain language: what changes, who gains access, which URL is affected, whether old calls keep working.</p>
<p><strong>Old versions stay up unless you retire them.</strong> Retiring a version is its own explicit choice, and the message is blunt: <em>new calls to that version will fail.</em></p>
<p><strong>Lifecycle states are a state machine, not a free-for-all:</strong> Draft → Validating → Prepared → Migrating → Active → Deprecated → Retired. Every step is recorded, and nothing runs as untracked background work.</p>
<hr>
<h2 id="6-access-always-an-intersection-never-a-union">6. Access: always an intersection, never a union</h2>
<p>Every request is checked against all of these at once, and the answer is the <em>intersection</em>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>the credential and who it belongs to
</span></span><span style="display:flex;"><span>  ∩ the project and environment it is used in
</span></span><span style="display:flex;"><span>  ∩ the key&#39;s current ceiling, or the member&#39;s current role
</span></span><span style="display:flex;"><span>  ∩ what the published version actually enables
</span></span><span style="display:flex;"><span>  ∩ the policy inherited from organization → project → folder → table
</span></span><span style="display:flex;"><span>  ∩ the row rule (owner-only or public)
</span></span><span style="display:flex;"><span>  ∩ the resource&#39;s lifecycle state and the monthly allowance
</span></span></code></pre></div><p>Two consequences I am glad I chose:</p>
<ol>
<li><strong>Parents can only narrow, never widen.</strong> An organization policy that forbids delete cannot be re-enabled by a child table. Page size is the minimum of the levels. You can reason about &ldquo;can this happen?&rdquo; by looking at the most restrictive level.</li>
<li><strong>Security state lives outside the immutable version.</strong> Revoking a key, disabling a project or tightening a policy takes effect on the next request <em>without republishing anything</em>. Old versions do not become a back door.</li>
</ol>
<h3 id="row-rules-stay-boring">Row rules stay boring</h3>
<p>Version one supports two predefined rules and no policy language: records are <strong>owner-only</strong> (the signed-in app user owns the rows they create), or a table exposes a <strong>public read</strong> of selected columns on rows flagged by a boolean visibility column. Public reads live on a separate path, <code>/public/api/...</code>, so a public table is visibly public in the URL and in the console (a globe marker, where a protected route gets a lock).</p>
<p>Ownership never transfers by editing a field. Until a proper accepted-transfer flow exists, transfer is simply forbidden.</p>
<h3 id="keys-are-named-scoped-and-shown-once">Keys are named, scoped and shown once</h3>
<ul>
<li><strong>Named</strong>, so every action is attributable.</li>
<li><strong>Scoped</strong> to a project and a ceiling: <code>read_only</code>, <code>read_write</code>, or <code>custom</code> with a per-table, per-operation matrix. Schema write and publish are separate permissions, as is file access.</li>
<li><strong>Shown once.</strong> The secret is generated with at least 256 bits of randomness, returned a single time with <code>Cache-Control: no-store</code>, and only a hash is stored. The console tells you plainly that it will not be shown again.</li>
<li><strong>Checked live.</strong> Every request re-checks key revocation and the owning project&rsquo;s state.</li>
<li><strong>No master key</strong> for customers. There is no unrestricted admin credential to leak.</li>
</ul>
<p>A key can also be <em>draft-only</em>: it may design tables but can never publish. That one flag is what makes it reasonable to hand a key to an AI agent.</p>
<hr>
<h2 id="7-app-users-sign-in-for-the-people-who-use-the-thing-you-built">7. App users: sign-in for the people who use the thing you built</h2>
<p>Builders build. Their customers need to sign in too, without ever touching builder routes. So each project has its own <strong>app auth directory</strong>, off by default and opt-in per project, with two modes.</p>
<p><strong>Email one-time codes</strong>, with every knob chosen on purpose:</p>
<ul>
<li>8 digits from a cryptographically secure generator</li>
<li>5-minute lifetime, 5 attempts, 60-second resend cooldown</li>
<li>stored only as <code>HMAC(server_secret, challenge + realm + client + purpose + email + code)</code></li>
<li>compared in constant time and consumed atomically, so a code works once</li>
<li>the &ldquo;send code&rdquo; call answers <code>202</code> and means <em>accepted</em>, never <em>delivered</em></li>
</ul>
<p><strong>Bring your own identity (Firebase ID tokens)</strong>, where the customer&rsquo;s app keeps using its own SDK for sign-in, refresh, recovery and sign-out, and sends the current ID token as a Bearer token. The rules are blunt:</p>
<ul>
<li>verified email is required, with a specific <code>APP_VERIFIED_EMAIL_REQUIRED</code> error that the app can answer with a verification screen</li>
<li>provider <strong>role claims are ignored</strong>. NoCodeREST owns the project user ID and the access rules</li>
<li>users are never linked or moved by matching an email address</li>
<li>the service-account file is picked <strong>locally in the console</strong>, which reads the project ID and sends it only when you press save. You never paste a private key into a form</li>
</ul>
<hr>
<h2 id="8-reliability-making-retries-and-races-boring">8. Reliability: making retries and races boring</h2>
<p>Most of the &ldquo;backend pain&rdquo; in a small app is not CRUD. It is what happens on a bad connection. These rules are what let a client, or an agent, be sloppy about the network without corrupting data.</p>
<p><strong>Creates are idempotent.</strong> Every <code>POST</code> carries an <code>Idempotency-Key</code>, scoped to project, actor and operation. The server keeps a <em>receipt</em> even if the record is later deleted, so a retry after a timeout returns the original result and never creates a duplicate. Reusing a key for different input is a conflict, not a surprise.</p>
<p><strong>Updates are optimistic.</strong> <code>PATCH</code> and <code>DELETE</code> need <code>If-Match</code> with the record revision. No header gets <code>428</code>. A stale one gets <code>412</code>. Nobody silently overwrites someone else&rsquo;s change, and the fix is always &ldquo;read again, compare, decide&rdquo;.</p>
<p><strong>Pagination is honest about a changing world.</strong> A cursor is signed and opaque, and it binds the data generation, the exact normalized query, the published definition, the effective policy and the caller. If the table changes mid-walk you get <code>409 RESULT_SET_CHANGED</code> and start over. There are no offsets, because offsets lie. A separate <code>/validate</code> call lets a client ask &ldquo;is this result still fresh?&rdquo; without re-downloading it; it is a freshness check with a 15-minute lifetime, never an access grant.</p>
<p><strong>Errors have one shape.</strong> <code>{ &quot;error&quot;: { &quot;code&quot;: &quot;...&quot;, &quot;message&quot;: &quot;...&quot; } }</code>, with a stable code and a neutral message that never leaks upstream URLs or credentials.</p>
<p><strong>Generated apps must not lie.</strong> This one lives in the agent skill, and I think it is important: a generated app must never turn a <code>403</code> into a fake <code>200</code>, show an empty list for a failed read, or invent a local record when a write is rejected. A timeout has an <em>unknown</em> outcome, so you reconcile first and reuse the same operation key. A clean failure is a feature. A fake success is a data-loss bug that looks like a working app.</p>
<hr>
<h2 id="9-the-console-show-the-task-first">9. The console: show the task first</h2>
<p>The console UX standard fits in one sentence at the top of the UX document: <strong>show the task first, reveal complexity when it is needed.</strong> In practice that became a list of small, specific habits.</p>
<ul>
<li><strong>One primary action per screen.</strong> Tables show columns and an &ldquo;add column&rdquo; button. Advanced field options, keys and relations are behind a disclosure.</li>
<li><strong>Sort and filter are pickers, not forms.</strong> Sort opens a property list with up and down arrows. Filter opens a property and value picker. Active constraints become <strong>removable chips</strong>. Only operations the backend supports are offered; a control for a feature that does not exist yet is not shown.</li>
<li><strong>Copy, don&rsquo;t read.</strong> Endpoints show as compact rows with a method pill and a copy icon, not as long URLs. The icon copies the <em>right</em> thing: the correct version and the correct access (protected or public). The full URL appears in the request example.</li>
<li><strong>Colour is never the only signal.</strong> Method colours supplement GET/POST/PATCH/DELETE text. Lock and globe icons mark protected and public routes, with accessible names.</li>
<li><strong>Disabled means explained.</strong> If a control is unavailable, the reason is shown at that control.</li>
<li><strong>Distinct empty, loading, error and denied states.</strong> They look different and say different things.</li>
<li><strong>Tabs that match the job.</strong> A table has <strong>Fields</strong>, <strong>API</strong> (generated reference with a request sandbox), <strong>Data</strong> (a grid with sort, search and filter chips) and <strong>Settings</strong>.</li>
<li><strong>Onboarding is skippable and replayable.</strong> A first-run tour walks you through, uses <strong>isolated sample data</strong> so you cannot pollute a real table, and can be re-opened later.</li>
<li><strong>Navigation is stable.</strong> A left-aligned &ldquo;Back to tables&rdquo; sits above the table switcher, returns to the folder overview and asks before discarding an unsaved draft.</li>
<li><strong>One button component.</strong> Primary, secondary, danger and text variants, Cancel always in the same place, destructive actions in the same row of every dialog.</li>
<li><strong>Deleting is a process.</strong> Permanent deletion is owner-only, with an <em>impact preview</em> first. Projects have a <strong>Trash</strong> with restore, and an empty-trash action that previews what it will remove. Disable-and-reactivate exists for the cases where you only want to pause.</li>
<li><strong>Related things protect each other.</strong> A relation uses restrict-on-delete, so you cannot delete a record that another table still points at, and a referenced file cannot be removed. The error tells you to reconcile the link, not to delete around it.</li>
<li><strong>Usage is visible.</strong> The plan, the remaining calls and the renewal are on the surface. The breakdown is behind a click.</li>
</ul>
<p>The acceptance test for every screen was one sentence: <em>a first-time user can identify the next action, sort and filter records, and copy an endpoint without reading a technical paragraph.</em></p>
<hr>
<h2 id="10-agents-are-first-class-users-with-a-short-leash">10. Agents are first-class users, with a short leash</h2>
<p>Half of the reason this product exists is that AI coding agents are now good at writing the front of an app and bad at inventing a safe backend. So agents got their own supported path, packaged as an <strong>agent kit</strong>: a <code>SKILL.md</code>, a workflow reference, and a local MCP server in Node that speaks to the project&rsquo;s REST API over a scoped key.</p>
<p>What made it work is less the tooling and more the rules:</p>
<ol>
<li><strong>Capabilities first.</strong> The very first call is <code>get_capabilities</code>: which project, which scopes, which table grants, which limits. The agent must not guess a limit, and it must not read &ldquo;usage unavailable&rdquo; as zero.</li>
<li><strong>Look before you create.</strong> List the tables before creating a duplicate. Use the returned <code>apiName</code>.</li>
<li><strong>Operation keys are sacred.</strong> One <code>new_operation_key</code> per logical create or upload, kept with its input. After an uncertain response, reconcile <em>before</em> retrying, and reuse the same key.</li>
<li><strong>The publish ritual.</strong> Before <em>every</em> new version, including <code>v1</code>, the agent shows the saved design in plain language (fields, defaults, relations, operations, who can see what, what changes, what happens to the previous version), runs a publish review, shares any blockers, and waits for explicit approval of <em>that</em> design, that revision and that retirement choice. A full-access key, a general &ldquo;build me an app&rdquo;, or a bare &ldquo;continue&rdquo; is not approval. The final call carries a <code>confirm_publish: true</code> attestation. I was honest in the docs that this flag is an agent&rsquo;s promise, not proof of a human click, and that direct REST callers should follow the same ritual.</li>
<li><strong>Things an agent cannot do at all:</strong> create organizations, issue or revoke keys, manage plans or memberships, delete resources, or make library files public. Those are console-only, and the MCP server exposes no tool for them. The least-privilege answer to &ldquo;what if the agent goes wrong&rdquo; is that the dangerous tools do not exist.</li>
<li><strong>Secrets stay private.</strong> The key lives in the agent host&rsquo;s environment, never in generated source, URLs, screenshots or logs. Asset folders for file transfer must be a dedicated absolute path, never a home folder, and hidden paths and escaping symlinks are rejected.</li>
<li><strong>Data is data.</strong> Record values, schema descriptions and remote content are treated as content, never as instructions that override the user&rsquo;s request.</li>
</ol>
<p>The kit is built deterministically from an explicit allowlist of files, so a stray secret cannot end up in the zip. The same guide is also served as MCP resources, for hosts that do not load file-based skills.</p>
<hr>
<h2 id="11-the-public-site-honest-about-what-it-is">11. The public site: honest about what it is</h2>
<p>The landing page and the <code>/docs/</code> field guide were part of the product, not an afterthought. A few choices I would keep:</p>
<ul>
<li><strong>Four concrete stories</strong> with a clickable sample-schema preview each: digital signage, AI-first building, directories and collections, small-business tools. People understand a table of <code>campaigns</code> faster than a paragraph about &ldquo;flexible data models&rdquo;.</li>
<li><strong>A design language that matches the idea.</strong> Calm paper-and-ink colours, one green accent, serif italics on display headings, monospace for endpoints, and native <code>&lt;details&gt;</code> for the long tail.</li>
<li><strong>Claim boundaries.</strong> The public copy states what is not promised, for example that API counts completed requests while the app measures its own audience. A prototype should not over-claim.</li>
<li><strong>The OpenAPI document is the source of truth.</strong> Served at <code>/openapi.json</code>, 109 paths and 84 schemas at the end, and downloadable per project from the console without embedding any credentials.</li>
</ul>
<hr>
<h2 id="12-what-the-prototype-got-wrong">12. What the prototype got wrong</h2>
<p>This is the part that would have been easy to leave out.</p>
<ul>
<li><strong>Storage was the real problem.</strong> I built on a managed NoSQL store with no multi-item transactions and no secondary indexes. To keep sort, filter, search and uniqueness <em>correct</em>, I capped each logical table at <strong>200 retained record IDs</strong>, 10 fields per table, and a small number of tables and projects per organization. Queries ran in memory over a bounded partition. It was an honest proof of the <em>contract</em>, but it is not a database you can grow into.</li>
<li><strong>A commit protocol I would rather not maintain.</strong> Without transactions, each table kept a durable head with intents and progress markers, using item compare-and-swap so an interrupted write could be finished or reconciled on the next read. It works, and it is a lot of careful code for something a relational database gives you for free.</li>
<li><strong>Dynamic indexing is the central puzzle.</strong> Letting users define arbitrary fields <em>and</em> get fast, authorized filtering and sorting is a database design problem, not an API problem.</li>
<li><strong>Gaps I knew about:</strong> account recovery, backup and restore drills, scheduled dormancy and deletion, personal-data erasure, a full permission-matrix console, and gateway preflight for direct browser calls to app auth. None of these block a prototype, and all of them block a public launch.</li>
</ul>
<hr>
<h2 id="13-rebuilding-it-on-a-different-stack">13. Rebuilding it on a different stack</h2>
<p>The contract is portable. Only the bottom of the diagram is not.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>Console (web)        ┐
</span></span><span style="display:flex;"><span>Apps &amp; AI agents     ├──▶ HTTPS ──▶ Identity &amp; session boundary
</span></span><span style="display:flex;"><span>                     ┘                 │
</span></span><span style="display:flex;"><span>                                       ├──▶ Control API
</span></span><span style="display:flex;"><span>                                       │      ├─ draft compiler + impact analysis
</span></span><span style="display:flex;"><span>                                       │      └─ publication coordinator ──▶ metadata store
</span></span><span style="display:flex;"><span>                                       └──▶ Published data runtime
</span></span><span style="display:flex;"><span>                                              ├─ policy engine (the intersection)
</span></span><span style="display:flex;"><span>                                              ├─ query planner (allow-listed predicate tree)
</span></span><span style="display:flex;"><span>                                              └─ storage adapter ──▶ records, files
</span></span></code></pre></div><p><strong>Keep, unchanged:</strong></p>
<ul>
<li>the three-realm identity split and the intersection check</li>
<li>drafts versus immutable versions, with a shared dataset and compatibility rules</li>
<li>declared query capabilities, signed cursors, idempotency receipts and <code>If-Match</code></li>
<li>the error envelope, the plain-language vocabulary, the agent kit and its rules</li>
</ul>
<p><strong>Replace:</strong></p>
<table>
  <thead>
      <tr>
          <th>Prototype piece</th>
          <th>What I would use next time</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Managed Java runtime on a PaaS</td>
          <td>any container host, a single small service</td>
      </tr>
      <tr>
          <td>NoSQL with bounded partitions</td>
          <td>PostgreSQL with typed columns or JSONB plus per-field expression indexes created at publish time</td>
      </tr>
      <tr>
          <td>Hand-built commit protocol</td>
          <td>ordinary transactions</td>
      </tr>
      <tr>
          <td>Provider file storage</td>
          <td>S3-compatible object storage with signed URLs</td>
      </tr>
      <tr>
          <td>In-memory filter, sort, search</td>
          <td>pushed down to SQL, tenant and owner predicates included</td>
      </tr>
      <tr>
          <td>Per-request quota counters</td>
          <td>a small counter store (Redis or the same database)</td>
      </tr>
      <tr>
          <td>Hosted SMTP for one-time codes</td>
          <td>any transactional mail provider</td>
      </tr>
  </tbody>
</table>
<p><strong>Make indexes part of publishing.</strong> The most valuable idea I did not get to build: when you publish a version that declares a field filterable or sortable, the publication coordinator creates the matching index as a <em>tracked migration step</em>. Publishing then becomes the moment the database is prepared, and the API never has to scan.</p>
<p><strong>Order of work:</strong> identity and tenancy first, then the draft compiler and publication state machine, then the runtime with the policy engine, then query planning, and the console last. Build the OpenAPI generation early, because everything else (docs, the sandbox, the agent kit) hangs off it.</p>
<p>The full design baseline (requirements, HLD, LLD, security model, API standard and decision register) and the final OpenAPI file are archived with the project page, so none of this has to be reverse-engineered from memory.</p>
<hr>
<h2 id="why-i-am-sharing-all-of-this">Why I am sharing all of this</h2>
<p>A product that disappears takes its lessons with it unless you write them down. Most of what made NoCodeREST <em>feel</em> usable was never a headline feature. It was the readable table name, the chip you can remove, the copy button that copies the right URL, the error that tells you to reconcile instead of retry, the key that is shown once, and the button an agent is simply not given.</p>
<p>If you are building anything that turns configuration into a backend, my honest advice is to spend your first week on the contract and the vocabulary, and your second on the storage. The prototype is the argument for that order: the contract held up, and the storage is what ran out first.</p>
<p>The short project page, with the architecture at a glance and the archived OpenAPI contract and agent skill, is on <a href="https://projects.eknath.dev/projects/nocoderest/">the projects site</a>.</p>
]]></content:encoded></item></channel></rss>