$ whoami
> a visitor who found the trapdoor
$ cat ./README.md | head -2
> ch-ai.in — a portfolio with four skins and an unreasonable amount of care
$ ./reveal --app=ch-ai
> booting write-up...
This is how ch-ai.in — the site you were just looking at — is actually built: the stack, the four-theme engine, the infrastructure, and the pipeline that ships it. No marketing copy, just the real thing.
Next.js 16 (App Router, built with Turbopack) running on React 19 and TypeScript in strict mode, styled with Tailwind CSS v4. The whole site is a static export — output: "export" in next.config.ts — so there is no server at request time, no API routes, no middleware. Just files.
Two flows worth knowing about: what happens when a change gets pushed, and what happens when someone opens the site. Both end up at the same two GCP resources.
Both flows converge on the same Firebase Hosting site — one deploys to it, the other is served from it.
Infrastructure is code, not console clicks: CDKTF (Terraform CDK, written in TypeScript) defines a Cloud DNS managed zone for ch-ai.in — carrying the MX/SPF records that keep email forwarding working, plus the A and TXT records Firebase needs to verify and serve the custom domain — and a Firebase Hosting site the static export deploys to.
It's actually two CDKTF stacks, the same split the AWS stack used. A one-time, hand-run infra-gcp-bootstrap stack sets up Workload Identity Federation — a WIF pool and provider GitHub Actions federates into, a deploy service account scoped to exactly this project, and the Cloud Storage bucket the real stack's state lives in. The real stack, infra-gcp, reads and writes its state there.
This site didn't start on GCP. It ran entirely on AWS — S3 + CloudFront + Route53 + ACM — until a billing/support dead end made GCP the faster path forward. Rather than tear the AWS stack down, it's left deployed on purpose: CloudFront, S3, ACM, Lambda, DynamoDB, and IAM are all still there, orphaned, free to run at this traffic level, and ready to cdktf deploy live in an interview if the multi-cloud story is worth telling. Only Route53's hosted zone got deleted — the one AWS resource in this whole stack that actually cost money ($0.50/mo), and the only thing DNS ownership required removing.
The live deploy path authenticates to GCP the same way the AWS one did to AWS — no long-lived credentials sitting in repo secrets anywhere.
gcp-static-deploy.yml runs on every push to main that touches the app code: install, build the static export, federate into a scoped GCP service account via Workload Identity Federation — no service-account JSON key ever touches this repo — then firebase deploy --only hosting. No approval gate — a content change is low-stakes and reversible.
Cloud DNS and Firebase project changes (infra-gcp) don't have a CI pipeline yet — they're applied by hand, npx cdktf deploy from a laptop. The AWS stack's infra.yml, by contrast, still exists exactly as it did before the migration: a pull request touching infra/** gets a read-only cdktf diff comment, and an actual deploy pauses at a required reviewer. It still works — it's just not wired to anything that affects the live site anymore, since DNS no longer points at CloudFront.
The site you were on has four completely different skins — magazine, pixel, material, and the one this page's aesthetic is deliberately not — sharing one semantic CSS custom-property contract (--color-surface, --color-ink, --color-accent, and so on). Each theme overrides that contract under its own [data-theme="id"] selector, so shared components like the nav and footer reskin automatically without per-theme component variants.
Light/dark mode is a second, independent layer on top (data-mode), and both the active theme and mode persist to localStorage. A blocking inline script in the root layout applies whatever was stored before the first paint, so switching themes — or just reloading the page — never flashes the wrong one.
A few bugs that were more interesting than they looked.
overflow-x: hidden on body quietly forces overflow-y into a scrolling value too, per spec — which turned body into its own scroll container and broke the nav's position: sticky (it stuck to body's box, not the viewport). Fixed with overflow-x: clip, which suppresses the same horizontal overflow without creating a new scroll container.
One theme's hero section used a padding shorthand that quietly zeroed out Tailwind's px-6 on the same element — shorthand properties always set all four sides, and the custom class won on specificity. The content sat flush against the screen edge on mobile only. Fixed with longhand padding-top/padding-bottom.
The mobile dropdown was position: absolute, meant to anchor to the sticky header. A leftover position: relative on its own wrapper div became the real containing block instead, so it inherited that wrapper's content width — about 48px — rather than the header's. Removed the stray position: relative and it opened full-width, as intended.
The Workload Identity Federation provider's attributeCondition is supposed to check the deploying repo is this one. It got deployed checking against REPLACE_ME_github_owner/REPLACE_ME_github_repo instead — the real values were meant to come from env vars that were never actually set on the bootstrap run that created it, so the code's placeholder defaults got baked into live infrastructure. Every deploy failed auth with unauthorized_client until that got spotted by reading the deployed Terraform state directly and hardcoding the real repo as the default instead.