Docs
Everything in this repository: the optz framework this site runs on, how it's built and with what, how fast it is and why, the Rust engine, and how it all deploys to a $1.50 server. Start with the introduction.
Start here
- Introductiondihlabs.lol is a dev lab by sxnistxr: a place to try things for fun, from diffusion models and LLMs to fast software on small machines, and write down what happens. This…
- Getting startedInstall Bun, run this site, edit its content, and start a new optz app.
- Why optzPick a framework by what your site does most. For most sites that's serving pages people read, and that's what optz makes nearly free, without giving up the features an app needs.
Building with optz
- Framework referenceEverything optz does, with examples: routes, render modes, islands, Server Actions, streaming, ISR, API routes, i18n, images, fonts and deploy targets.
- Every feature in one appEvery feature optz shares with Next.js, in one small app: streaming and _loading, Server Actions (also without JavaScript), ISR and on-demand revalidation, dynamicParams, draft…
- Social demoThe social feed that used to be on dihlabs.lol, now its own app: a token panel, compose box, feed and post pages as optz islands, over the Rust engine in portfolio/engine (the…
How it's made
Speed
- optz vs Next.jsThe same site on optz and on Next.js 16, measured on one core, and a feature-by-feature comparison.
- Would C be faster?No, not measurably, for this site. The pages are already compiled at build time into finished bytes (HTML, brotli and gzip copies, ETags), and serving them is a map lookup…
- MeasurementsWhere each number came from. Everything here was measured; estimates are labelled as such.
The $12 Server Challenge
Operations
- Deploymentdihlabs.lol runs on one $1.50 VPS: 1 vCPU, 2 GB of memory, Ubuntu 24.04. nginx in front, the site on Bun, the Rust engine next to it, all under systemd, updated from this…
- Production filesEvery file in ops/: systemd units, the generated nginx config, deploys with rollback, verified backups.
- Restoring a backupBackups are in /var/backups/optz/feed-<UTC stamp>.db.gz, each with a .sha256 of the uncompressed file. Every backup already passed PRAGMA integrity_check before it was kept.