Rebuilt my portfolio with a hidden working terminal and a custom click-tracking engine

Wait 5 sec.

The terminal on my portfolio homepage isn't decoration. Try closing it by clicking the red dot once, and a session starts. You can run help, projects, skills, and there's command history with arrow keys, tab completion and a few easter eggs (try sudo). Run ai or activate ai and you're talking to an LLM with context about the portfolio.The part I learned the most from was tracking clicks without making the site feel laggy. It took three attempts:1. button-track fired patch() calls on every click. It blocked navigation, added lag, and sometimes dropped data if someone bounced fast.2. click-track was lighter, but it still depended on async requests finishing before page unload. It wasn't reliable on fast exits or mobile browsers.3. track-external uses navigator.sendBeacon() to send a tiny fire-and-forget payload to a Vercel serverless function. An in-page queue batches events, retries them, syncs on online events, and requeues failures. If sendBeacon fails, it falls back to a direct Firebase call.That took click reaction from 200-300ms to basically unnoticeable.What didn't work: I leaned hard on AI tools plus a CLAUDE.md, and got a barely functional prototype. The admin panel it generated read every document iteratively on each reload, and I hit Firebase's rate limit. I ended up redesigning the user doc schema so it supports both recording and viewing efficiently, and rearchitecting a lot of it myself. Vibe coding can reduce productivity if you don't keep it in check.I also built my own admin panel for visit charts and per-hash-URL activity, plus a self-hosted git-stats-api for live GitHub stats.   submitted by   /u/OfferBeginning1903 [link]   [comments]