Skip to content
YanX
All writing

Engineering

Building yuxuanyan.com

The stack and a few design decisions behind this site: bilingual routing, a database-backed CMS, and security by default.

Published 1 min read

This site is a small full-stack application rather than a static template. A few decisions shaped it:

  1. Content lives in Postgres. Projects and articles are rows with one translation per language, so English and Chinese versions stay linked to the same entity.
  2. Security is enforced in the database. Row-level security means drafts are invisible to the public API even if application code has a bug.
  3. Pages are cached and revalidated on publish. Public pages are prerendered; publishing in the admin invalidates exactly the affected cache tags.

Writing should be as easy as opening the admin page — no Git commit required.

Tags

  • #Next.js
  • #Supabase