The secret life of this number

  1. Your browser checks its notes. Is site:visit-counted in localStorage? Then you're already in.

  2. First time? One letter. POST /api/visits. After that, only GET, which just reads the number.

  3. A tiny function wakes up. A Cloudflare Pages Function takes the request.

  4. D1 does the maths. count = count + 1, in one row of SQLite.

No cookies, no IP, no ID. A new browser counts as a new visitor, so this is a friendly estimate.

Projects

Things I'm building in the open. Each one lives in the same repository and ships on its own.

  • Interview Prep

    interview.shivaanshagarwal.com

    My interview notes in one place: topics by area, common questions per topic and practice problems, with done ticks for a quick revision before an interview.

    • Astro
    • MDX
    • TypeScript
    • Pagefind
  • Learn AI Engineering

    learnai.shivaanshagarwal.com

    A free 5-week AI Engineering study track: day-by-day plans built only from free resources.

    • Astro
    • TypeScript
    • Tailwind
  • shivaansh-os

    shivaanshagarwal.com

    The monorepo behind this site: the portfolio, its blog and every side project, with shared tooling.

    • Astro
    • TypeScript
    • Tailwind
    • React islands