Two Tasks That Broke Me (And What I Took From It)
A backend engineering internship retrospective I'm not going to write one of those blog posts where everything goes smoothly and the developer learns a neat lesson at the end. That's not what happened. This is about two tasks from my internship that were genuinely hard — one individual, one team — and the honest version of how they went. Part 1 — Stage 3: Build Insighta Labs+ What it was Stage 3 was the biggest individual task I'd faced up to that point. The assignment: take the demographic intelligence platform from Stage 2 — filtering, sorting, pagination, natural language search, all of it — and turn it into something real users could actually log into. Three separate repos. One backend. GitHub OAuth with PKCE, JWT access and refresh tokens, role-based access control (admin vs analyst), a globally installable CLI tool, and a web portal with HTTP-only cookies and CSRF protection. Break anything from Stage 2 and it counts against you. The problem it was solving The platform had no auth at all. Anyone could hit any endpoint. No ownership, no access control, no sessions. Stage 3's job was to fix that — not just slap a login button on it, but build a system where the CLI and the web portal could both authenticate against the same backend through completely different flows, and still behave consistently. How I approached it — the actual build I started with the backend and worked outward. The first thing I had to figure out was that the CLI and web portal OAuth flows are fundamentally different, even though they both use GitHub. The web portal flow is what most people think of as OAuth — user clicks a button, gets redirected to GitHub, GitHub redirects back to the backend callback, backend sets HTTP-only cookies, done. The tokens never touch JavaScript because they live in cookies the browser sends automatically. The CLI flow is weirder. There's no browser session to set a cookie on, so I had to think about this differently. What I ended up doing: when you run insighta