nimashadloo.dev
This site: a Django content API and a Next.js front end on one small host, with every architecture decision written down.
- Role
- Design, build, and operations
- Years
- Since 2026
- Status
- Maintained
- Stack
- Django 6, DRF, Next.js 16, SQLite, nginx
- Links
The brief
A personal site that a hiring manager can read in fifteen seconds and a developer can read for an hour, run by one person on one small server, with every decision written down where the next maintainer will find it.
One host, two applications
Django serves an internal API and the admin, which is called Studio. Next.js renders every public page on the server, prerenders it, and caches it until Django says otherwise. nginx terminates TLS and serves the static files. Both applications run under systemd as an unprivileged user, and SQLite holds the data in WAL mode.
| Surface | Choice | Why |
|---|---|---|
| Data | SQLite in WAL mode, with a daily backup and a restore drill | One writer, and every read is cached |
| Rendering | Next.js Cache Components with tag revalidation | A save in Studio reaches the page within a minute |
| Admin | The Django admin on Unfold, behind a sign-in lockout | One operator, and no second application to secure |
| Security | A strict content security policy owned by the application | The headers ship with the code they protect |
A save becomes a page
Each save in Studio dispatches the cache tags it touched once its transaction commits, so a write that rolled back never asks the frontend to read it. The frontend drops the pages under those tags and renders them again on the next request.
def dispatch(tags: Iterable[str]) -> None:
"""Sends these tags to the frontend once the current write commits.
A rollback discards the callback, so a write that never landed never asks
the frontend to read it back.
"""
wanted = allowed(tags)
for batch in batched(wanted, TAGS_FOR_EACH_REQUEST, strict=False):
transaction.on_commit(partial(revalidate.enqueue, list(batch)))
Releases that can go back
A release builds on the host into a directory of its own, applies only migrations that the release before it can still serve against, and switches with one rename of a symbolic link. It then requests every public route through nginx; a failed check puts the previous release back without a hand on the keyboard. At one concurrent request, the API answers its content endpoints in about 8 ms at the 95th percentile.
Every release can roll back without touching the database.
Written down
Forty-three architecture decision records, a ground-truth file of measured facts, a runbook, and a site specification decide the system. A unit test reads the specification, so the interface copy cannot drift from it.
The drawing set
The interface is a set of drawing sheets that stack as the page scrolls. Each project carries a drawing of its own system, written as code and animated only while it is in view, and a project without one shows a title plate until it has one. Under reduced motion, the set arrives finished.