Personal Website
My bilingual portfolio, built and run like a real production service: it runs in Docker on my own server, has an AI assistant that answers questions from the site’s own content, meets WCAG AAA accessibility, and every change passes 222 end-to-end tests and Lighthouse checks before it ships.


A personal site, held to production standards.
It has 17 pages, 17 API routes, a blog, a photo gallery and privacy-friendly analytics, all in English and Chinese. The part I enjoy most is Ask: you can ask it about me and it answers from what is actually on the site, with citations. A deploy only goes live once the new version passes its health check.
- Stack
- Next.js 16
- React 19
- TypeScript
- Tailwind CSS
- PostgreSQL + pgvector
- Docker
- Playwright
- Category
- Full-stack
Why This Exists
Playground & productionAt a Glance
By the numbers- Pages
- 17
- API Routes
- 17
- Test Files
- 63
- Languages
- 2
- WCAG Level
- AAA
- i18n Keys
- 565
Across the Stack
Seven dimensions- FE
Frontend Interface & motion
- Next.js 16
- React 19
- TypeScript
- Tailwind CSS 4
- Framer Motion 12
- next-intl · 565×2 keys
- BE
Backend APIs & contracts
- 17 API routes
- RFC 9457 errors
- SSE streaming
- rate limits + quotas
- OpenAPI spec
- DB
Database Persistence
- PostgreSQL 18 · self-hosted
- 11 tables
- pgvector(1024)
- _zh i18n columns
- nightly pg_dump
- AI
Ask RAG over the site
- LiteLLM gateway
- voyage-4-large · 1024-dim
- pgvector · top-5 cosine
- forced [n] citations
- live pipeline panel
- UI
Design System & a11y
- OKLCH color system
- WCAG AAA · 13:1+
- 3 themes
- Cormorant · Geist · JetBrains Mono
- QA
Testing Quality gates
- Playwright E2E · 4 shards
- Vitest unit suite
- axe-core a11y
- Lighthouse CI
- OPS
DevOps The layer that ships everything
- Docker
- Dokploy
- Traefik
- GHCR image
- Cloudflare R2
GitHub Actions- lint
- typecheck
- build
- test
- e2e ×4
- health-gated deploy
See It Live
Desktop · Mobile
![Ask on a phone answering how private data is protected, with [n] citations inline](/cdn-cgi/image/width=3840,quality=90,format=auto,fit=scale-down/images/projects/personal-website-ask-mobile.webp)
How Ask Works
One question, six stepsQuestionHow does the Ask assistant keep private data from leaking?
A visitor asks a question
Someone types into Ask: “How does the Ask assistant keep private data from leaking?” Every step after this exists to answer it.
Question · POST /api/ask
To answer it, the site already has a library
Site content is cut into about 260 passages. A model scores each passage on 1,024 “meaning directions”; that list of scores is its position in the space, and two passages with similar meaning get similar scores. This is done in advance, not for each question.
Chunking · embedding · direction names are a simplification · really 1,024 dimensions, drawn in 3
The question gets scored the same way
The same model scores the question. Its high scores on “privacy & security” and “AI” match the passage’s, so it lands near that passage in the space.
Embedding model · voyage-3.5-lite · 763 ms measured
Find the passages closest to the question
Compare how closely the question points the same way as each passage; the 5 closest light up, all from one blog post. Private content sits in a locked vault the search cannot reach.
Cosine similarity · Top-5 · 23 ms measured
The AI writes from those 5 passages only
The question and the 5 passages go to the AI together. Each [n] in the answer points back to the passage it used.
Generation · Claude Haiku · streamed
Two smaller steps around it
Cheap checks run before anything costs money; when the passages are not enough, the AI searches again by itself.
Guardrails · tool loop (not triggered here)
What It Does
Three pillarsA full-stack portfolio with a blog, photography gallery, project showcases, an AI assistant grounded in the site's own content, privacy-first analytics, and production-grade infrastructure — all bilingual.
01Content
Blog
- MDX with syntax highlighting
- Categories, subcategories, tags and an archive
- Table of contents that follows your place
Photography
- Masonry grid with category filters
- EXIF details for every frame
- Full-screen lightbox
Project Showcases
- Structured detail pages
- Every page in English and Chinese
02AI & UX
Ask
- Answers from the site's own content, with citations
- The retrieval pipeline shown as it runs
- On /ask, the home page and ⌘K
Command Palette
- ⌘K searches pages, projects and posts
- Switches into Ask without leaving the page
Themes & Keyboard
- Light, dark or follow the system
- OKLCH colour at AAA contrast
- Arrow keys turn the page
03Infrastructure
Privacy-First Analytics
- Self-hosted umami
- No cookies, no IP logging
- Public numbers on /stats
Security
- Content Security Policy
- Edge guard in front of the origin
- Per-IP rate limits and daily quotas
SEO
- Sitemap with hreflang
- JSON-LD and share images per page
- robots.txt and llms.txt
Trade-offs
Decisions that heldSelf-hosted over Vercel + Supabase
pgvector in the app database, not a vector DB
An LLM gateway between site and model
Retrieval threshold tuned by failure, not theory
WCAG AAA, not just AA
_zh suffix columns over separate translation tables
Want the full walkthrough?
Happy to talk through the architecture, the decisions, and the trade-offs behind this build.
More work

INOVIT Dealer Portal
A B2B ordering portal that replaces the front end of a legacy .NET ERP. The new React and Django system shares the legacy production SQL Server, so the two ran side by side while features moved across; one codebase serves every region, and the frontend’s types are generated from the API.

Lumia Crystal - E-commerce Platform
A modern headless e-commerce platform for crystal jewelry brand. Built with Next.js 15 and Shopify Storefront API, featuring real-time product catalog, shopping cart, search with filtering, and responsive design with OKLCH color system.


Australia EOI Points Calculator
A modern web application for calculating points for Australian Expression of Interest (EOI) for skilled migration visas. Features real-time calculation, bilingual support, responsive design, and dark/light mode.