Moving a Next.js docs app from LIKE to SQLite FTS5: triggers, quoting terms so input never becomes syntax, a stable order, and rebuilding after VACUUM.
Devlogs · Abdulkader Safi
The build diary. What changed this week, what broke, and what I got wrong.
- Website
- abdulkadersafi.com · all feeds from this site
- Feed URL
https://abdulkadersafi.com/devlogs/feed.xml
Read it in your FeedListing reader
Or add to: Feedly Inoreader Raw feed
Latest posts
-
Search that quotes whatever you type
-
Backlinks that use the renderer's own link rules
Backlinks for an Obsidian vault on the web, computed at view time with the renderer's resolver, plus aliases, PDF embeds and a route that cannot shadow docs.
-
Backups behind one flag in docker compose
In-app backups for a Next.js and SQLite app: VACUUM INTO, content-addressed assets, a schedule read from archive names, and a restore that catches up.
-
My login rate limit was a lockout button
Why a per email login limit is a lockout button, which X-Forwarded-For entry to trust, and signing out other devices with JWT sessions in next-auth.
-
A failed download that was never going to be retried
A sync stored the new head even when files failed, so they were never retried. The fix, a 300 lookup budget, and a fake GitHub that counts calls.
-
Sync said unchanged, and the new project stayed empty
A sync that skips when the branch head has not moved also skipped new, moved and restored projects. Clearing the head, and why it is cleared twice.
-
Tagging 1.0.0 with four features missing, on purpose
Four features from the v1 scope are missing and the tag went out anyway. The number is about the API not moving, not about the list being finished.
-
Reading my own release checklist found two bugs I had written down and walked past
A canonical tag pointing at a duplicate of the home page, and a javascript: URL reaching an href. Both written down eleven days earlier.
-
A script in three layouts is a contract nobody signed
A page builder needed a few lines of JS inside the page it previews. Putting them in the layout made them a contract that fails silently.
-
The editor was a dead end with one exit, and the preview lied about it
Clicking a nav link in a page builder's preview left the canvas and the section list describing different pages. What an editor's iframe should do instead.
-
The example app stopped using the blocks the package ships
A demo that borrows half its components from the package cannot be read on its own. Rewriting all nine, and the two tests it broke.
-
The demo needed a booking form, and a form needs someone to not trust
The example app grew a booking form. Prices are read from the page, never from the posted data, and the demo is a template whether you meant it or not.
-
The design tokens were correct, and no block was reading them
Setting a brand colour changed the section backgrounds and nothing else. The block library had the primary colour hardcoded for eight releases.
-
A generated /services page shadowed a 301 I shipped three releases ago
Adding a generated listing route ahead of a catch-all quietly took over a 301 written three releases earlier. What the test suite caught.
-
A field nobody can list is a form field with no consumer
Custom fields are worthless until something lists them. Building the listing block, and giving every block view the page it renders on.
-
The storage shape for custom fields was already in the codebase, one column over
A content type declares its own fields. Choosing where the values live, why the locale comes first in the path, and what is not drafted.
-
Services needed their own sidebar entry, and Filament had already solved it
Giving each content type its own panel entry looked like a resource subclass per type. Filament v5 resource configurations removed the subclass.
-
Two UI critique rounds
A UX review and a 27 out of 40 heuristic critique of a Next.js docs app: phone layout, ink blue accent, readable diagrams, modal menus and tab titles.
-
Heavy Markdown, light pages
Server-side Shiki, Mermaid loaded on demand, HTML cached per blob sha, and the one import that shipped a whole Markdown pipeline to the browser.
-
The $5 problem
Why "$5 a month, or $50" turned into KaTeX italics, and the small remark plugin that applies the Pandoc dollar rule so prices stay as text.