<?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: Allen McCabe</title>
    <description>The latest articles on DEV Community by Allen McCabe (@fissible).</description>
    <link>https://dev.to/fissible</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3860034%2F2f95815c-5427-4208-b943-fcba8aef7ac3.png</url>
      <title>DEV Community: Allen McCabe</title>
      <link>https://dev.to/fissible</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fissible"/>
    <language>en</language>
    <item>
      <title>Your API contract belongs in CI</title>
      <dc:creator>Allen McCabe</dc:creator>
      <pubDate>Sun, 17 May 2026 04:36:32 +0000</pubDate>
      <link>https://dev.to/fissible/your-api-contract-belongs-in-ci-4273</link>
      <guid>https://dev.to/fissible/your-api-contract-belongs-in-ci-4273</guid>
      <description>&lt;h1&gt;
  
  
  Treating OpenAPI specs as build artifacts: a working pattern in Laravel with accord, forge, and drift.
&lt;/h1&gt;

&lt;p&gt;You ship a Laravel API. You publish OpenAPI docs. The two are correct on the day you launch.&lt;/p&gt;

&lt;p&gt;Three months later they aren't.&lt;/p&gt;

&lt;p&gt;Maybe a &lt;code&gt;nullable&lt;/code&gt; slipped into a response field and the iOS client started crashing on null pointer dereferences. Maybe a field got renamed in v1.2 and a partner integration silently broke for two weeks. Maybe an entire endpoint got added without a spec entry, and the docs page lies to every new developer who reads it.&lt;/p&gt;

&lt;p&gt;The spec didn't lie when it was written. It just stopped being true.&lt;/p&gt;

&lt;p&gt;The cost of catching that drift scales with how late you catch it: cheap in your editor, manageable in CI, expensive in staging, ruinous in production. The longer the contract goes unverified, the more confidently your team builds on top of a fiction.&lt;/p&gt;

&lt;p&gt;The good news is that a contract is just a spec file. It can be checked. It can be a CI gate. The version of this checking that I've found practical is what this post is about.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "API contract adherence" actually means
&lt;/h2&gt;

&lt;p&gt;Two specific guarantees:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Implementation matches spec.&lt;/strong&gt; Every route the application actually serves is described by the spec. Every request and response shape that goes over the wire conforms to the schemas in the spec.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spec matches implementation.&lt;/strong&gt; No spec entries describe routes the application no longer serves. No schemas in the spec describe shapes the application no longer produces.
Both directions matter. If your spec says "/users supports DELETE" and your code removed DELETE last sprint, clients are going to call DELETE and you're going to wonder why they're seeing 405s.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;OpenAPI 3.0 is the standard format for writing this contract down. It's a YAML or JSON document describing paths, operations, parameters, request bodies, and response shapes. The format is mature enough that I'm going to skip describing it in this post. If you're working on a JSON HTTP API, you've seen OpenAPI before; if you haven't, the &lt;a href="https://swagger.io/specification/" rel="noopener noreferrer"&gt;spec docs&lt;/a&gt; are short.&lt;/p&gt;

&lt;p&gt;The interesting question isn't "what does OpenAPI look like." The interesting question is: &lt;em&gt;how do you keep your spec honest?&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Three classes of drift
&lt;/h2&gt;

&lt;p&gt;When your spec and your implementation get out of sync, the drift falls into roughly three buckets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structural drift.&lt;/strong&gt; Routes added, removed, or moved. The spec says &lt;code&gt;/v1/posts&lt;/code&gt; exists; your code doesn't have it. Or your code has &lt;code&gt;/v1/posts/{id}/restore&lt;/code&gt;; the spec doesn't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shape drift.&lt;/strong&gt; Request or response bodies that no longer match the schema. The spec says &lt;code&gt;name&lt;/code&gt; is required and a string; your code is now accepting an array, or making it optional, or removing the field entirely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Semantic drift.&lt;/strong&gt; The route exists and the shape matches, but the &lt;em&gt;meaning&lt;/em&gt; has changed. Same field name, different units. Same status code, different conditions for returning it. This is the hardest class to catch programmatically and the most expensive when it happens.&lt;/p&gt;

&lt;p&gt;The first two classes are mechanizable. The third is mostly about reviewer discipline. The pattern I'll describe handles the first two well enough that the third is the only thing humans still need to look for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contract adherence as a CI/CD gate
&lt;/h2&gt;

&lt;p&gt;The pattern I want to talk about is treating contract adherence as a build gate. Not a soft expectation, not a documentation chore, but a hard CI check that exits non-zero when violated.&lt;/p&gt;

&lt;p&gt;This is more useful than runtime-only validation, for one reason: by the time a contract violation hits production, the cost is already incurred. Catching it at build time means the version of the code that violates the contract literally cannot merge. The drift doesn't ship.&lt;/p&gt;

&lt;p&gt;A CI gate has three components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A &lt;strong&gt;spec file&lt;/strong&gt; that's authoritative (committed to the repo, reviewed in PRs, treated as code).&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;runtime validator&lt;/strong&gt; that checks live requests and responses against the spec.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;drift detector&lt;/strong&gt; that runs in CI, compares the routes the app actually exposes against the routes the spec describes, and fails the build on mismatch.
You can build this yourself. You can also use existing tools. I built and maintain the toolchain I'm about to describe because the existing PHP options either didn't enforce both directions, didn't support multiple frameworks, or were heavy enough that adoption was a project unto itself.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The working pattern, in Laravel
&lt;/h2&gt;

&lt;p&gt;The toolchain is called &lt;a href="https://github.com/fissible/accord" rel="noopener noreferrer"&gt;accord&lt;/a&gt;, and it's the foundation of a small family of &lt;a href="https://fissible.dev/" rel="noopener noreferrer"&gt;Fissible&lt;/a&gt; packages that together cover the spec → validate → drift loop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/fissible/forge" rel="noopener noreferrer"&gt;&lt;code&gt;fissible/forge&lt;/code&gt;&lt;/a&gt; scaffolds an OpenAPI spec from your existing routes.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/fissible/accord" rel="noopener noreferrer"&gt;&lt;code&gt;fissible/accord&lt;/code&gt;&lt;/a&gt; validates live traffic against the spec at runtime.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/fissible/drift" rel="noopener noreferrer"&gt;&lt;code&gt;fissible/drift&lt;/code&gt;&lt;/a&gt; detects drift between routes and spec, and fails CI when it happens.
Each piece is independently useful, and they snap together into the CI/CD gate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 1: get a spec, even if it's empty
&lt;/h3&gt;

&lt;p&gt;If your API has been running without a spec, the cheapest first step is to scaffold one from your existing routes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require &lt;span class="nt"&gt;--dev&lt;/span&gt; fissible/forge
php artisan accord:generate &lt;span class="nt"&gt;--title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"My API"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;forge walks your registered routes, infers request body schemas from your Laravel &lt;code&gt;FormRequest&lt;/code&gt; classes, and writes a starting &lt;code&gt;resources/openapi/v1.yaml&lt;/code&gt; with every endpoint accounted for. Response schemas are scaffolded as empty objects, and those are the ones you fill in to describe what your API actually returns.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;FormRequest&lt;/code&gt; inference is the one piece of forge that I want to call out. Laravel's validation rules are already a declarative description of an input contract, so lifting them into an OpenAPI request schema is mostly a translation problem rather than a generation problem. If your codebase uses &lt;code&gt;FormRequest&lt;/code&gt; classes in a disciplined way, you get half of the spec for free.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: turn on runtime validation in log mode
&lt;/h3&gt;

&lt;p&gt;Install accord and register the middleware:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require fissible/accord
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// bootstrap/app.php (Laravel 11+)&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Fissible\Accord\Drivers\Laravel\Http\Middleware\ValidateApiContract&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;withMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Middleware&lt;/span&gt; &lt;span class="nv"&gt;$middleware&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$middleware&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;appendToGroup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'api'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;ValidateApiContract&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;class&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Configure log mode initially:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ACCORD_FAILURE_MODE=log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Log mode is the adoption trick. In log mode, accord still validates every request and response, but instead of throwing on violations it logs PSR-3 warnings and lets the request through. Your application keeps working, your logs start filling up with concrete violations, and you have a list of things to fix in your spec or your code before flipping to exception mode.&lt;/p&gt;

&lt;p&gt;Without this mode, adopting accord on a live API is a "stop everything" project. With it, adoption is "run it for a week, fix what surfaces, then flip the switch."&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: add the CI gate
&lt;/h3&gt;

&lt;p&gt;Once you trust the spec, add drift's &lt;code&gt;accord:validate&lt;/code&gt; command to CI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Check API contract (drift)&lt;/span&gt;
  &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;php artisan accord:validate&lt;/span&gt;

&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Check implementation coverage&lt;/span&gt;
  &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;php artisan drift:coverage&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;accord:validate&lt;/code&gt; exits non-zero if the spec and the implementation have drifted in either direction. &lt;code&gt;drift:coverage&lt;/code&gt; is an optional second check that catches routes that exist in the codebase but are wired to nothing (skeleton routes, a real production hazard).&lt;/p&gt;

&lt;p&gt;With this gate in place, the only way to merge a route change is to update the spec to match. The spec stops being a documentation artifact and becomes part of the codebase under the same review discipline as any other change.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's technically interesting under the hood
&lt;/h2&gt;

&lt;p&gt;Most of what makes accord work is unglamorous: parse the OpenAPI document, build a route lookup, hand each request through a validator that knows about JSON schemas. Three pieces are worth pulling out.&lt;/p&gt;

&lt;h3&gt;
  
  
  PSR-7/15 core, framework drivers
&lt;/h3&gt;

&lt;p&gt;The validator and middleware in &lt;code&gt;src/&lt;/code&gt; have no Laravel dependency, no Slim dependency, no Mezzio dependency. Framework integration lives entirely in &lt;code&gt;src/Drivers/{Framework}/&lt;/code&gt;. The Laravel driver is a thin service provider plus a middleware wrapper that adapts Laravel's request/response objects into PSR-7 messages.&lt;/p&gt;

&lt;p&gt;The boundary is enforced architecturally: anything outside &lt;code&gt;src/Drivers/&lt;/code&gt; is forbidden from importing framework-specific code. Adding a new framework driver is implementing &lt;code&gt;DriverInterface&lt;/code&gt; and writing a glue middleware. The cleanliness of this boundary is the kind of thing that doesn't matter the day you build it and matters every day after.&lt;/p&gt;

&lt;h3&gt;
  
  
  FailureMode as an enum, not a flag
&lt;/h3&gt;

&lt;p&gt;I wanted three behaviours for contract violations: throw, log, or hand the result to a user-provided callable. The naive way is to thread booleans and special config values through the validator. The honest way is a single enum:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="n"&gt;enum&lt;/span&gt; &lt;span class="nc"&gt;FailureMode&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'exception'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Log&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'log'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Callable&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'callable'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The validator produces an immutable &lt;code&gt;ValidationResult&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;final&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ValidationResult&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="nv"&gt;$valid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$version&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="kt"&gt;array&lt;/span&gt; &lt;span class="nv"&gt;$errors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;valid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$version&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kt"&gt;self&lt;/span&gt;    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;invalid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;array&lt;/span&gt; &lt;span class="nv"&gt;$errors&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$version&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kt"&gt;self&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The failure mode decides what to do with the result. The benefit shows up when you go to extend: adding a fourth behaviour (queued reporting, for example) is a new enum case and a new branch, not a new flag and a new conditional everywhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pluggable spec sources
&lt;/h3&gt;

&lt;p&gt;A spec doesn't have to be a local file. The &lt;code&gt;SpecSourceInterface&lt;/code&gt; abstraction lets accord load specs from anywhere:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;SpecSourceInterface&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$version&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kt"&gt;?OpenApi&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$version&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The default file source loads YAML or JSON from disk. A URL source fetches from a remote endpoint with optional PSR-16 caching, which is useful when multiple services validate against a shared central spec. A custom source lets you load specs from a database, a registry, or a tenant-specific lookup in a multi-tenant API. The interface is intentionally small: two methods, and you can validate against specs from anywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this fits in Fissible's larger picture
&lt;/h2&gt;

&lt;p&gt;I run a company called &lt;a href="https://fissible.dev/" rel="noopener noreferrer"&gt;Fissible&lt;/a&gt; and build a product called Station, a self-hosted Laravel CMS and workflow platform. Station ships with a Platform Core that lets focused modules (CMS, Flow, Forms, an API module, more on the way) dock in and share auth, navigation, search, and admin UI.&lt;/p&gt;

&lt;p&gt;The API module is where accord becomes load-bearing. Station's API surface is contract-validated end to end: forge scaffolds the spec from the routes the modules expose, accord validates live traffic, drift fails CI when the spec and the implementation diverge. Treating the contract as code isn't an aspirational team policy in Station. It's mechanically enforced.&lt;/p&gt;

&lt;p&gt;If you want to see this pattern running end-to-end on a real product, &lt;a href="https://fissible.dev/station" rel="noopener noreferrer"&gt;Station&lt;/a&gt; is where to look. If you just want the validator and the CI gate for your own Laravel API, &lt;a href="https://github.com/fissible/accord" rel="noopener noreferrer"&gt;accord&lt;/a&gt; and &lt;a href="https://github.com/fissible/drift" rel="noopener noreferrer"&gt;drift&lt;/a&gt; are the two packages to install.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;API contract adherence is a CI/CD problem more than a documentation problem. You write the contract once. You validate against it at runtime. You fail the build when it drifts. After that, the spec is honest because the build won't pass otherwise, and the cost of a contract violation collapses from "found in production" to "found in the PR that introduced it."&lt;/p&gt;

&lt;p&gt;The earlier a breach is caught, the cheaper it is to fix. Treating the spec as a build gate makes catching it the default.&lt;/p&gt;

</description>
      <category>php</category>
      <category>laravel</category>
      <category>api</category>
      <category>openai</category>
    </item>
    <item>
      <title>Why I built a SQLite workbench in bash</title>
      <dc:creator>Allen McCabe</dc:creator>
      <pubDate>Fri, 03 Apr 2026 20:03:59 +0000</pubDate>
      <link>https://dev.to/fissible/why-i-built-a-sqlite-workbench-in-bash-3m5o</link>
      <guid>https://dev.to/fissible/why-i-built-a-sqlite-workbench-in-bash-3m5o</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;You SSH into a server. The SQLite database is right there — you can see it in the filesystem.&lt;br&gt;
Every GUI tool you own stops working. TablePlus, DB Browser, Beekeeper — all of them need a local connection. sqlite3 is available, but it's raw SQL with no browsing. litecli is read-biased and still needs installing.&lt;br&gt;
You need to look at some rows, update a field, check an index. You end up writing SELECT statements into a CLI, copying output into a notes file, writing UPDATE statements by hand.&lt;br&gt;
There's a better way.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The build
&lt;/h2&gt;

&lt;p&gt;ShellQL is built on shellframe — a TUI framework I wrote in bash. shellframe handles screen management, keyboard routing, dirty-region rendering, and component lifecycle. Writing a new application on top of it is closer to writing a React app than writing a bash script.&lt;/p&gt;

&lt;p&gt;The surprising parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mouse support in bash is real, and it's not that hard once you understand xterm escape sequences&lt;/li&gt;
&lt;li&gt;SQLite's &lt;code&gt;.schema&lt;/code&gt; output is parseable enough to build a schema browser without any external tools&lt;/li&gt;
&lt;li&gt;Tab management (multiple tables open simultaneously) required rethinking shellframe's focus model&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The SSH use case
&lt;/h2&gt;

&lt;p&gt;This is the thing that makes ShellQL different from every other SQLite tool.&lt;/p&gt;

&lt;p&gt;If the machine has bash and sqlite3, ShellQL runs. That means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Production servers (read and write, with care)&lt;/li&gt;
&lt;li&gt;Docker containers&lt;/li&gt;
&lt;li&gt;CI environments for debugging test databases&lt;/li&gt;
&lt;li&gt;Remote dev boxes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No GUI install. No port forwarding. No pulling the file to your laptop and pushing it back.&lt;/p&gt;

&lt;p&gt;SSH in, run &lt;code&gt;shql /var/app/production.db&lt;/code&gt;, browse your data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Full CRUD
&lt;/h2&gt;

&lt;p&gt;Most TUI database tools are read-only. ShellQL isn't.&lt;/p&gt;

&lt;p&gt;The record editor is a schema-aware form overlay. It shows column types and NOT NULL constraints. Tab through fields, edit values, press Enter to submit. Insert new rows the same way.&lt;/p&gt;

&lt;p&gt;Table creation uses a SQL query tab preloaded with a &lt;code&gt;CREATE TABLE&lt;/code&gt; template — you get full DDL control without a rigid GUI wizard.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mouse support
&lt;/h2&gt;

&lt;p&gt;This one surprised people in early demos. Most bash tools are keyboard-only by design. ShellQL supports both.&lt;/p&gt;

&lt;p&gt;Keyboard navigation is fast once you learn it — the keybindings are shown at the bottom of every screen. Mouse works for everything else: clicking into tables, scrolling rows, selecting records.&lt;/p&gt;

&lt;p&gt;This matters for adoption. Not everyone who SSHes into a server is a power user.&lt;/p&gt;




&lt;h2&gt;
  
  
  Install and try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;fissible/tap/shellql
shql my.db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Tool page: &lt;a href="https://fissible.dev/tools/shellql" rel="noopener noreferrer"&gt;https://fissible.dev/tools/shellql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/fissible/shellql" rel="noopener noreferrer"&gt;https://github.com/fissible/shellql&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>database</category>
      <category>tooling</category>
      <category>bash</category>
    </item>
  </channel>
</rss>
