Skip to content
Proyectos

Acerca de

Personal portfolio site - open-source security tools, hardware research and projects, with GitHub stats pulled from the API. Hosted on Cloudflare Workers.

Seguridad y privacidad

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
+1
in 15 days
Recopilando historial
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

portfolio

My personal site. Open-source security tools, hardware research, and small things I build while figuring out how computers actually work.

Live: zhameer.tampugao.workers.dev

What's on it

  • A home page built around the portrait, with a glitch layer and a binary field sampled from the same image, both skipped under prefers-reduced-motion
  • An About page with the photo, what I am focused on, and how I work
  • A Projects grid where every card pulls live star, fork and last-push counts from the GitHub API
  • A Certifications page with 21 certificates, each one linking to its issuer's verification page
  • A contact form that delivers to my inbox when a provider key is configured, and answers 502 rather than pretending a message went out when it is not
  • A footer with links to GitHub, LinkedIn, Facebook and email
  • A dark theme by default with a light theme and a toggle, both remembered

Stack

TypeScript on Next.js 15 (App Router) with React 19. Tailwind for styling. The contact form, the GitHub stats and the view counter are Next.js Route Handlers, so the backend lives in the same project as the front end. It is deployed to Cloudflare Workers through the OpenNext adapter, which runs the Next.js app on Workers unchanged.

GitHub counts the repository as 92.9% TypeScript, 6.8% CSS and 0.3% JavaScript. The only JavaScript is eslint.config.mjs and postcss.config.mjs.

Run it locally

npm install
cp .env.example .env.local   # fill in any keys you want to use
npm run dev

Open http://localhost:3000.

Environment variables

The site works without any of them, except the contact form, which needs at least one provider key to deliver anything.

Variable What it does
FORMSPREE_FORM_ID Required. Default provider. Free, no domain of your own, no card
RESEND_API_KEY Optional upgrade. Only works for real senders once you own a domain verified in Resend
CONTACT_FROM_EMAIL Resend only. The verified sender, e.g. [email protected]
CONTACT_TO_EMAIL Resend only. Where messages land (usually your inbox)
GITHUB_TOKEN Bumps GitHub API rate limit from 60 to 5000 req/hr. An unscoped classic token is enough
NEXT_PUBLIC_SITE_URL Used for OG image and sitemap absolute URLs

If none are set the endpoint returns 502 and tells the visitor the form is not configured, rather than reporting a send that never happened.

API routes

Method Path What it does
POST /api/contact Validate + forward contact form to email
GET /api/github?repo= Repo stats (stars, forks, language, pushed_at)
GET /api/github?user= List public repos for a user
GET /api/stats Aggregated GitHub stats for the owner
GET /api/views?slug= Read view counter for a project slug
POST /api/views Increment view counter for a project slug

All routes are rate-limited per IP.

Deploy

The site runs on Cloudflare Workers, not Pages. Pages only serves static assets and this app has four API routes, including a contact form that needs a Node runtime. The OpenNext adapter runs the Next.js app on Workers unchanged, so the route handlers, the shared @/lib imports and the whole build stay exactly as they are.

Push to deploy

Pushing to main runs .github/workflows/deploy.yml, which builds the worker and uploads it. Nothing to click.

Two repository secrets are required, under Settings → Secrets and variables → Actions:

Secret What it is
CLOUDFLARE_API_TOKEN A Cloudflare API token with Workers Scripts Edit and Workers KV Storage Edit for the account
CLOUDFLARE_ACCOUNT_ID The Cloudflare account id, npx wrangler whoami prints it

The workflow runs on Node 22. Wrangler refuses to start on anything below 22.12, so the runner image's default Node 20 does not work.

Deploy by hand

npm install
npx wrangler login          # once, opens the browser
npm run deploy              # build the worker and upload it
npm run preview             # run it locally in wrangler before deploying

npm run deploy runs opennextjs-cloudflare build and then opennextjs-cloudflare deploy --upload-source-maps=false. Source maps off is deliberate. With them on the bundle is about 39 MB and the upload times out. Without them it is 5.8 MB.

Secrets on the Worker

The Formspree id and the GitHub token live on the Worker, not in a file:

npx wrangler secret put FORMSPREE_FORM_ID
npx wrangler secret put GITHUB_TOKEN

PowerShell will insert a byte order mark if you pipe a string straight into wrangler secret put, and the secret then arrives with a hidden U+FEFF in front of it. Formspree answers "Form not found". Stage the value in a file written without a BOM and pipe that instead:

[System.IO.File]::WriteAllText("$env:TEMP\secret.txt", $value, (New-Object System.Text.UTF8Encoding($false)))
cmd /c "type %TEMP%\secret.txt | npx wrangler secret put FORMSPREE_FORM_ID"

The view counter

It uses the KV namespace named in wrangler.jsonc. It used to write to a file on disk, which survives neither a redeploy nor a Worker cold start, so the numbers reset on every deploy. KV persists.

GitHub rate limits

GitHub answers are cached in the Workers Cache API for thirty minutes. Without it every project card was a separate call to GitHub, eight calls per visitor, against a sixty an hour limit shared across Cloudflare's address range. The site throttled itself.

npm run build still produces a normal next build output, so the app still runs on any Node host if you ever want to move off Workers.

License

MIT. See LICENSE.

Explorar proyectos relacionados

Cargando…