Skip to content

Portfolio Deployment (h5h.me)

The portfolio at h5h.me lives in code/apps/web/ (React 19 + Vite 7). It has two deployment paths — Vercel is production; the Dockerfile is a publishable fallback.

Architecture

  • npm workspace monorepo rooted at code/apps/package.json (workspaces: ["*"]).
  • Two workspaces: web/ (portfolio) and dashboard/ (experimental — see apps/dashboard/README).
  • Root scripts proxy to the web workspace: npm run dev, npm run build.
  • Portfolio depends on @vercel/analytics and @vercel/speed-insights (they are no-ops off Vercel).

Path A — Vercel (production)

code/vercel.json:

json
{
    "buildCommand": "cd apps && npm run build:all",
    "outputDirectory": "apps/web/dist",
    "installCommand": "cd apps && npm ci"
}
  • The Vercel project's root directory is code/ (not the repo root).
  • build:all builds both web and dashboard workspaces but only apps/web/dist ships.
  • DNS: h5h.me and www.h5h.me point to Vercel (outside the Cloudflare Tunnel — tunnel only handles *.h5h.me subdomains).
  • Analytics + Speed Insights activate automatically on Vercel deployments.

Path B — Docker (Docker Hub / self-host)

code/Dockerfile builds a static Nginx container with just the portfolio:

bash
cd code
make build-web         # docker build -t h5h .
docker run -p 8080:80 h5h
  • Multi-stage: node:25-alpine builds apps/web, nginx:alpine serves /app/web/dist.
  • Image is safe to push to Docker Hub — .dockerignore excludes .env*, docker/, scripts/, homelab-data, *.md.
  • Not currently pushed by CI; ci.yml only performs a dry-run docker build. Uncomment the docker/login-action block in ci.yml to enable pushes.

CI — .github/workflows/ci.yml

Runs on every push/PR to main:

  1. npm ci in code/apps.
  2. npm run lint (ESLint 9 flat config over web/src).
  3. npm run build (portfolio) + npm run build:dashboard (experimental dashboard — proves it still compiles).
  4. On main: dry-run docker build -t h5h:ci code/.

Local dev

bash
cd code
make dev               # cd apps && npm run dev — Vite on :5173
# or
cd apps && npm run dev:dashboard  # Vite on :3000 for the experimental dashboard

Theming

Themes and font stacks are in code/apps/web/src/themeConfig.js:

  • 5 themes: serika_dark (default), phantom, retro, miami_nights, matrix.
  • 5 fonts: JetBrains Mono (default), Fira Code, IBM Plex Mono, Space Grotesk, Inter Tight.
  • Preference persists in localStorage under h5h:theme / h5h:font.

Not published

The portfolio is intentionally separate from the homelab auth stack — it has no Authentik middleware and is served straight from Vercel. Do not add SSO without also solving the cold-start/bootstrap problem (can't log in if Authentik is down).

MIT License