Terminal-style personal portfolio. Built with SolidJS, Vite, and Bun.
- Frontend: SolidJS + Vite SPA with SSR prerender to static HTML
- Content: Markdown + frontmatter, validated with Zod, rendered via marked + shiki
- Monorepo: Bun workspaces
apps/web- the SPAapps/recto-landing- RECTO pre-MVP landing page (Vite + Solid + Pages Function)packages/content- content loading and rendering
bun install
bun run dev| Command | Description |
|---|---|
bun run dev |
Start Vite dev server |
bun run build |
Production build |
bun run prerender |
SSR prerender to static HTML |
bun run preview |
Preview prerendered build |
bun run typecheck |
Type-check all workspaces |
bun run lint |
Biome lint |
bun run format |
Biome format |
bun run test |
Vitest unit tests |
bun run e2e |
Playwright e2e tests |
The site is a single terminal-style page. User input is parsed and dispatched through a command registry (apps/web/src/terminal/). Each command returns a typed entry that is rendered by a matching block component.
Content lives in packages/content/markdown/ as Markdown files with frontmatter. All content is loaded eagerly at build time.
The terminal now supports an AI command:
/ask <question>- ask about Hoa Trinh Hai (profile, projects, experience, skills, contact)
Out-of-topic questions are refused by policy.
This repo uses a Cloudflare Pages Function at apps/web/functions/api/ask.ts and calls Workers AI server-side.
Preferred runtime setup:
- Bind
AIin Cloudflare Pages/Workers (recommended, no token/account env needed)
Optional REST fallback environment variables (used only when AI binding is missing):
CLOUDFLARE_ACCOUNT_IDCLOUDFLARE_API_TOKENWORKERS_AI_MODEL(optional, defaults to@cf/meta/llama-3.1-8b-instruct)WORKERS_AI_FALLBACK_MODELS(optional, comma-separated models; used on 429/5xx or empty output)
Deployment includes functions with:
wrangler pages deploy apps/web/dist --functions=apps/web/functions
- Copy env template:
cp apps/web/.dev.vars.example apps/web/.dev.vars
- Fill real values in
apps/web/.dev.vars. - Run local full-stack Pages runtime:
bun run local:ai
This command builds + prerenders the site, then runs Cloudflare Pages local server from apps/web (which includes its functions/ directory), so /ask <question> works locally.