Spectral Codex

Spectral Codex is a digital garden, geospatial database, and photography portfolio with an emphasis on neglected spaces and untold histories. It grew out of an old WordPress travel blog I started around 2012, but has since transformed into something more like a personal Atlas Obscura, with a focus on explorations of human geography and the palimpsests left by successive generations.

On the technical side it is a highly performant static site built with Astro, authored entirely in MDX through the Content Layer API and served by Caddy. The trickiest problem was scale: with 8,000-plus high-resolution photos, letting Astro optimize images at build time meant memory exhaustion and glacial builds. The fix was to offload image processing to a self-hosted imagor server behind an aggressively caching Nginx proxy, driven by signed, URL-based transforms generated at build time so every image is resized exactly once.

From there it leans into the fun stuff. Interactive MapLibre maps render Protomaps tiles and FlatGeobuf administrative boundaries, with kdbush spatial indexing powering nearby-location discovery across thousands of points. Related content is genuinely semantic, backed by Transformers.js embeddings and a USearch nearest-neighbor index. Search is client-side and instant via Pagefind, and social preview images are generated programmatically with Satori, including multilingual font subsetting for Latin, CJK, and Thai scripts. The whole thing ships through a custom TypeScript deployment pipeline that validates content, regenerates redirects, and warms caches on the way out. I will dig into the interesting pieces in posts of their own.

Tags