Skip to content
Saketh Kamatham

Building this site

A portfolio a recruiter or hiring manager can explore that also works as a live example of my stack: Next.js and TypeScript in a Docker container on Cloud Run, deployed by Cloud Build on every merge to main.

Status
Shipped
Dates
Tags
  • Next.js
  • TypeScript
  • Tailwind CSS
  • MDX
  • zod
  • Docker
  • Cloud Run
  • Cloud Build

Problem

A resume PDF doesn't show how I actually build software. I wanted a portfolio a recruiter or hiring manager could explore, that also works as a live example of the stack I use day to day.

Approach

Next.js (TypeScript) frontend with Tailwind, content authored as MDX. A contact form backed by Resend, with the domain's SPF/DKIM DNS records verified in Cloudflare so mail doesn't land in spam. Packaged as a multi-stage Docker build (Next.js standalone output, non-root user, a pinned Node base image) and deployed to Cloud Run on GCP. CI/CD runs through Cloud Build on every merge to main: install, lint, typecheck, unit tests, a content-validation check, a dependency audit, then build and deploy. DNS and the domain itself sit in Cloudflare.

Architecture

  1. Browserclient
  2. Cloudflare DNSapex DNS-only
  3. Cloud RunNext.js container
  4. content/MDX
Fig. 2a · Request path. Cloud Run also calls Resend when the contact form is submitted
  1. GitHubmain
  2. Cloud BuildCI · check:content
  3. Artifact Registryimage
  4. Cloud Rundeploy
Fig. 2b · Deploy path, on every merge to main
Drawn
SK
Rev
C
Status
Shipped

Content is data: content/resume.json and content/projects/*.mdx are validated with zod at build time, and an invalid file fails the build. Project frontmatter uses a strict schema:

export const projectFrontmatterSchema = z.strictObject({
  slug: z.string().regex(/^[a-z0-9]+(-[a-z0-9]+)*$/),
  title: text,
  summary: text,
  featured: z.boolean().optional(),
  tags: z.array(text),
  status: z.enum(["in-progress", "shipped", "archived"]),
  diagrams: z.array(diagramSchema).min(1).optional(),
});

Key decisions and trade-offs

  • Deployed to us-east1 over us-east4 after running into a documented Cloud Run domain-mapping latency issue in the other region.
  • Used Cloud Run's domain mapping (free) instead of a load balancer, to keep hosting cost near zero for a personal site.
  • Kept the apex domain DNS-only (not proxied) in Cloudflare so the app sees real client IPs for rate limiting; www stays proxied and redirects to the apex.
  • Built a launch switch: the site defaults to an "under construction" state (banner shown, noindex) until a reviewed pull request explicitly flips it live, and a content-validation check fails the build if placeholder text is still present once it's live, so there's no way to ship it half-finished by accident.
  • Built a separate resume-import pipeline that pulls facts from a trusted source into the site's resume page, with checks against inventing or leaking anything that shouldn't be public.

Outcome

Live at sakethkamatham.com, auto-deployed on every merge to main, with its own CI/CD pipeline end to end.