Skip to content

tdaweb

tdaweb runs this site: a self hosted Next.js app in a Docker style container, with offline reading, drawn covers and content mirrored from a CMS.

On this page

The portfolio piece that is holding all the other portfolio pieces. tdaweb is the code behind this site: a Next.js app I started on 25 June 2025 and now self host in a container described by a Containerfile, which is a Dockerfile wearing a different name tag (Podman does the building). Every project page you open here is served by the project this page is about, so please be gentle.

What this site has to do

On the surface it’s blogs, projects and a page about me. Underneath there’s a longer job list, and some of it is handed to services from TDACorp, my company.

JobWho does it
Search, feeds, sitemap, social cardsthe app itself
Writing and publishingHyle, TDACorp’s content system
Sign inTDACorp Identity, our sign-in service
AnalyticsPrism, also ours
Tools for my own agentsan MCP server, so nothing scrapes the HTML

The first commit used Drizzle, Auth.js and one flat Next.js app, and its message says, roughly, that I did a lot of things and don’t remember them. The history has been considerably more talkative since. By late November 2026 it ran past fourteen hundred commits on the main working branch, most of them from that November. The turning points fit on one line.

timeline
    title Turning points in tdaweb
    June 2025 : 25th, first commit
    Aug to Oct 2026 : 10 Aug, pnpm workspace : 20 Oct, posts mirrored from Hyle
    November 2026 : 4th, drawn covers : 5th, dead code deleted : 25th, own server : 26th, offline worker

Notice how crowded the last column is. It was not a quiet month.

One workspace, twenty packages

Since August 2026 the code is a pnpm workspace run by Turborepo. The app renders and routes. Twenty packages hold the logic: the Markdown renderer, the database layer, SEO, the content sync, the cover generator and so on. The split matters because a function that lives in a package can’t quietly reach into a route to find what it needs. It has to be handed it.

There’s one command that decides whether a change is done. It runs the type check, the tests, the build, the linter and a documentation check, and green means zero warnings. The code carries no eslint-disable, no @ts-ignore and no as any, because the rule is to fix the cause. The documentation check is my favourite of the set: every file path a doc cites has to exist in the repository and must not be something git ignores. A doc that points at a generated file looks fine on my side and is broken for every fresh clone, which is the sneakiest kind of wrong.

Delete it, git remembers

For a while the rule here was to park unused components, never delete them. The reason was real. One client module exported 25 visual effects, nine had no caller, and all nine still showed up in 13 built chunks, because every export of a "use client" module ships whether anything renders it or not. So the idle ones moved into a file nothing imported, a little library for later.

Later never came. By 5 November 2026 the library had grown to 341 files and 23,025 lines that no entry point could reach, all of them still type checked, linted and read by whoever came next. The rule flipped that day: dead code gets deleted and git history is the library. A walker follows imports from the real entry points to find what is unreachable, which beats grepping for a name and hoping.

Writing happens somewhere else

Posts and project pages are written in Hyle, and this site only mirrors them. It reads with the official SDK and a read-only credential, and the app has no code that writes back. The site used to have its own editor. Keeping it meant two places that both believed they were the truth. So the editor went.

Here is one sync, from the nudge to the search engines.

sequenceDiagram
    participant T as Nudge
    participant S as Site sync
    participant H as Hyle
    participant D as Site database
    T->>S: webhook, schedule or button
    S->>H: list published writing
    H-->>S: the listing
    S->>H: fetch what is new or changed
    H-->>S: those documents
    S->>D: write new and changed pages
    alt listing looks sound
        S->>D: unpublish what left it
    else listing looks wrong
        Note over S,D: nothing goes offline
    end
    S->>S: expire affected page caches
    Note over S: then tell IndexNow

Every arrow towards Hyle is a question. The writes all land in the site’s own tables, where ownership is split cleanly.

Hyle ownsThe site owns
title and descriptionviews and tags
body and addressimages and dates
publish statelinks

Offline reading and covers nobody drew

The public pages can be read with no network. A hand written service worker, with no library and no build step, keeps a copy of the public posts and projects, asks the network first on every visit and only answers from its copy when the network fails. The design has more corners than that sentence suggests, including one browser that needed to be handled by name, and it gets its own write-up.

Every post and project also gets a cover drawn from its slug.

flowchart LR
    A["Slug and salt"] --> B["Hash"]
    B --> C["Pick drawing family,<br/>layout, background"]
    C --> D["SVG cover"]

There is no image to upload. Nothing but the slug and a small salt decides the picture, and a version pin in the tests notices when a refactor changes what gets drawn. This is how a site gets art direction without hiring any.

Self hosting Next.js in a Docker style container

Until 25 November 2026 production ran on Vercel. Now it runs in containers on my own server. The image is built in two stages with Next’s standalone output and runs as a non-root user.

Each deploy builds an image tagged with its commit, swaps it in, checks that it answers and puts the previous image back if it doesn’t. Leaving a managed platform also meant adopting the chores it had been doing without telling me. Tag expiry lives in memory, for one, so the app now expires its content tags when it boots, and a restart can’t resurrect a page that had been unpublished since the build.

Making the heavy page lighter

I filled the Explore page with graphs, panels and games, and it first sent all of that as HTML up front. Two rounds of work on 5 November 2026 put it on a diet. The second one made the sections below the fold load as you approach them.

Explore pageBeforeAfter
HTML in bytes, first round1,120,788340,754
HTML in bytes, second round286,898126,587
Performance score, second round6485
Total blocking time, second round671 ms133 ms

These are Lighthouse 12 runs on mobile settings, median of three, on a local production build against a seeded database. The cost is written down next to the numbers in the repository: someone who jumps straight to a lower section sees an empty frame for a moment.

Where it came from

This site had earlier lives, including tda-root, the Next.js version that had its own editor. What tdaweb keeps from that line is the habit of writing in Markdown and the stubborn belief that a personal site is a fine place to try real engineering. The audience is forgiving, the owner is on call and the next idea is rarely far behind. The rest of the work is under projects.