Skip to main content

Personal Portfolio

This is the site you're reading right now — built with Docusaurus, deployed to GitHub Pages, and wired up so that I can stay consistent with LeetCode without it feeling like a chore.

Why I built it​

I wanted one place that holds both sides of what I do:

  • Professional / weekend builds — I like learning new things on weekends. Writing the explanation in my own words gives me something I can come back to later instead of re-reading docs from scratch.
  • LeetCode — I wanted to track DSA practice, but I didn't want the friction of "now go write a markdown file" after every problem. The friction is what kills consistency.

The homepage is intentionally simple. I'll add to it as the site grows.

How the LeetCode automation works​

The dev community pointed me to LeetHub, a Chrome extension that auto-pushes accepted submissions to GitHub. That handled the "get code into a repo" part. The rest I automated:

  1. Solve a problem on LeetCode. I write my approach as a Python module docstring at the top of the solution, in my own words.
  2. LeetHub pushes the solution + problem README to a separate kalyanramchimmili/leetcode repo (per-problem folders like 0001-two-sum/).
  3. I trigger the Generate LeetCode Docs GitHub Action manually on this portfolio repo. Manual on purpose — running it on every push would burn through the free-tier Gemini quota for the day.
  4. The workflow checks out the LeetHub repo, runs a Python script that:
    • Skips problems already documented (idempotent)
    • For new ones, extracts the module docstring and sends README + docstring + the solution code to the Gemini free tier (gemini-2.5-flash-lite)
    • Gets back a Docusaurus-friendly markdown file with frontmatter, problem summary, polished approach, code, and complexity analysis
  5. A pull request opens on the portfolio repo with the generated markdown under docs/leetcode/.
  6. I review it (especially the complexity claims — Gemini sometimes hand-waves), edit if needed, and merge.
  7. A second GitHub Action (deploy.yml) builds the site and ships it to GitHub Pages on every push to main.

The whole loop, from "I just solved a problem" to "it's live on my site", is one merge click.

Tech stack​

  • Docusaurus 3.10 — TypeScript, React 19. Sidebar is autogenerated from the docs/ filesystem so adding a folder is enough.
  • GitHub Actions — two workflows: one for AI doc generation (manual dispatch), one for deploy (push to main).
  • Gemini — gemini-2.5-flash-lite on the free tier. Cheap enough to run as often as I want, polished enough that the markdown rarely needs hand-editing.
  • LeetHub — the bridge between LeetCode and GitHub. Without it, I'd be back to manual file creation.
  • GitHub Pages — free static hosting tied to the same repo.

What I learned building it​

  • Free-tier APIs are good enough for personal use cases as long as you batch and cache. Manual dispatch + idempotent skipping was the cheap-but-correct trade-off.
  • The hardest part wasn't the AI bit — it was the architecture decision to keep raw solutions in a separate repo so the portfolio repo doesn't get cluttered with 0001-two-sum/, 0002-â€Ļ/ folders at the root.
  • Writing the docstring before submitting is the small habit that makes the AI-generated writeups actually mine. If I skip it, the script flags the page as "approach inferred from code" so I can spot it.