Home Blog My Projects Lumen
Abstract illustration of the aifedespaix logo on a plum background

Why this site is a monorepo

When I started sketching out this site, I already had several subdomains in mind: a personal site, a blog, a portfolio, and a space for video and game experiments. Rather than duplicating configuration, colors, and components across four separate projects, I went with a monorepo.

One set of tokens

packages/tokens holds a single CSS file that defines every color on the site from three variables: a brand hue, a saturation, and a neutral hue. Six palettes and two themes (light/dark) fall out of that automatically, with no app ever needing to redefine a single color.

Shared components, not duplicated ones

packages/ui hosts the shared Svelte components: the navigation, header, and settings switcher. If the portfolio needs the same nav bar as this blog tomorrow, it imports it; it doesn’t copy it.

The trade-off

A monorepo has a cost: running bun run build at the root rebuilds everything, even if I only touched one app. Turborepo (the root turbo.json) caches whatever hasn’t changed, which makes the trade-off easily worth it for a site this size.

That’s also why this blog lives directly under aifedespaix.com/blog/, rather than on its own subdomain: as long as the content stays simple, sharing the main site’s infrastructure costs less than standing up a fifth Astro project.