Skip to content

Under the Hood

This site runs on Next.js with two API routes of its own. Here is what each one does, and a button to call it.

GET/api/github

Recent activity from my GitHub: when I last committed, to which repo, and how often in the last 30 days. It powers the live strip on the home page. GitHub is asked at most every 10 minutes, so visitors never use up its rate limit.

200
{ activity: { repo, isPrivate, lastAt, count30d, unit } | null, cachedSeconds }

Sends a real request and shows the real response.

POST/api/contact

The contact form. It checks every field on the server, drops bot submissions caught by a hidden field, limits each visitor to 3 messages per 10 minutes, and sends the message to my inbox through Resend.

Body
{ name: string, email: string, message: string }
200
{ ok: true }
400
{ error, fields: { name?, email?, message? } }
429
{ error } more than 3 messages in 10 minutes
502
{ error } the email service failed

Sends an empty message on purpose, so you see the real validation errors. No email is sent.