🌉 Bridging the Frontend-Backend Split
Buried in the struggle of session bugs and foggy brain, I stumbled onto something foundational. Splitting the frontend and backend into separate repos created a new kind of interface: one that needs its own infrastructure to work cleanly.
Before, everything lived in one Cursor window. The frontend could “see” the backend just by proximity. The code was there, autocomplete worked, types were accessible, you could fudge your way forward. But now, with a clean split, the frontend is essentially flying blind. Unless the backend exposes its contract, the frontend is left to hallucinate the structure of endpoints, auth requirements, and response shapes.
That hallucination is expensive. It’s what’s been dragging down session testing. It's not just the auth bugs themselves, but the confusion around how the frontend is supposed to talk to the backend at all. When there’s no shared truth, you end up playing broken telephone between two codebases that don’t know how to meet in the middle. There's a lot of doing things, then undoing them and just useless jiggling of the code in the workflow.
So the next necessary feature emerged: the backend has to publish its surface area in a consumable way. That means route definitions, auth schemes, maybe even types or in-depth specs, depending on how far I want to go. Once the frontend can pull that in, it can stop guessing and start cooperating.
This is a low-level architectural insight. An important one. It’s the kind of thing that becomes obvious only once the pain hits. Until now, I hadn’t internalized how much implicit structure was being relied on when everything lived in a monorepo. Now that the codebases are cleanly split, the communication has to be formalized. Otherwise, you’re just debugging shadows.
I actually feel really good when I find these kinds of issues. There's something about uncovering a major requirement like this that makes me feel like I made progress, that I'm "smart", and that I'm adding value by building structures that will eliminate this pain.
Next step: get the backend to emit its API surface clearly. Then I can get back to implementing actual features without being stuck in a loop of guess-and-check.