rimzzlabs' personal website built with Astro. it's small but nice
rimzzlabs' personal website built with Astro. it's small but nice
Personal site of Rizki Citra. Live at rimzzlabs.com.
A fully static Astro site with React islands, deployed on Cloudflare Pages. A thin layer of Pages Functions adds the dynamic parts: locale negotiation, a guestbook backed by D1, OAuth sign-in, and a contact form — without pulling in an SSR adapter.
locale cookie or Accept-Language; everything else is prerendered per locale.prefers-reduced-motion and a stored user preference, draggable dock navigation, image sitemap, SEO/OG tags.| Layer | Choice |
|---|---|
| Framework | Astro 7 (static output) + React 19 islands |
| Styling | Tailwind CSS v4, Base UI primitives (shadcn base-vega style), Motion |
| State | nanostores (+ persistent), TanStack Query for server data |
| Forms | react-hook-form + zod |
| Content | Astro content collections (MDX), Shiki, rehype-slug / rehype-autolink-headings via unified() |
| Backend | Cloudflare Pages Functions, D1 (guestbook), better-auth, Resend, Turnstile |
| Tooling | TypeScript, Biome, Husky + lint-staged, commitlint (conventional commits), pnpm |
Prerequisites: Node 22.12 (see .nvmrc) and pnpm.
pnpm install
pnpm approve-builds # select `sharp` — needed for remote-image builds
cp .env.example .env # fill in values (see comments in the file)
pnpm dev.env only holds build-time values: the public Turnstile site key, and optional Cloudflare credentials to bake guestbook comments into the static HTML. Everything is documented inline in .env.example.
| Command | Description |
|---|---|
pnpm dev |
Dev server (astro sync && astro dev) |
pnpm build |
Production build (applies remote D1 migrations first) |
pnpm preview |
Preview the built site |
pnpm check |
TypeScript + Astro type check |
pnpm lint / pnpm format |
Biome check / autofix |
pnpm commit |
Guided conventional commit (commitizen) |
pnpm guestbook:migrate |
Apply D1 migrations locally |
pnpm guestbook:preview |
Full local run with Pages Functions: local D1 migrations → build → wrangler pages dev dist |
There is no test suite — verify changes with pnpm check, and pnpm build when touching images or build config.
astro dev serves the static site only; the API lives in Pages Functions. To exercise the guestbook, auth, or contact endpoints locally, use:
pnpm guestbook:previewwhich builds the site and serves dist/ through wrangler pages dev with a local D1 database (schema in migrations/).
…Runtime secrets (Turnstile secret, OAuth client ids/secrets, Resend key, session secret, notification emails) are set on the Cloudflare Pages project, not in .env — grep env. in functions/ for the full list.
Code style, naming, and workflow conventions live in AGENTS.md — the single source of truth for working in this repo (tabs via Biome, named function declarations, no barrel files, conventional commits, PRs into main with squash-merge).
No open issues yet, or sync has not completed.