Start here
Introduction
dihlabs.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…
dihlabs.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 documentation covers the code behind it: one repository with a web framework, the site built on it, a Rust backend and everything that deploys them.
What's in the repository
| folder | what it is |
|---|---|
framework/ | optz, a React framework for Bun. The site and every app here run on it |
portfolio/ | This site: pages, Markdown content, API routes and this documentation |
portfolio/engine/ | A Rust server on raw io_uring and SQLite, built for the $12 Server Challenge |
apps/features/ | Every optz feature in one app, with browser checks |
apps/social/ | A small social network over the Rust engine (it used to be on this site) |
apps/example/ | The starter optz create makes |
bench/ | The site ported to Next.js, and the benchmark scripts |
ops/, deploy/ | Production: systemd units, generated nginx, deploys with rollback, backups, auto-sync |
docs/ | Design notes and measurements |
The short version
- optz renders pages to HTML at build time and ships JavaScript only for the parts marked interactive ("islands"). Serving a page is a memory lookup: about 55,000 requests per second on one CPU core, roughly 100× Next.js on the same app and core, in a sixth of the memory.
- It still has what an app needs: streaming, Server Actions, incremental static regeneration, typed routes and APIs, i18n, image and font optimization, Open Graph images, and it deploys as a Bun server, a single executable or an edge worker.
- The whole thing runs on a $1.50 VPS (one CPU, 2 GB of memory) that pulls this repository every 30 seconds, builds it, and rolls back by itself if a release isn't healthy.
Where to go next
- Getting started: run the site and make a new app.
- Framework reference: everything optz does, with examples.
- Architecture and tech: how it's built, and with what.
- Contributing: work on optz itself, the tests and the release flow.
- Why optz: what it's good at, measured, and when to pick something else.