Platform auth architecture
- Solo~5 days
- Total~50 h
- Without AI40 MD
- Estimate3–4 seniors
The hardest thing I've shipped so far.Auth across a platform that drives robots. First I gathered what was there, wrote the spec, and only then did it become code.
The hardest task I've shipped so far. Authentication and authorization inside an AI platform that automates tasks on computers through robots. I was given a basic architecture proposal, and the goal was to connect and finish the security and the data flows between the individual nodes of the whole stack. For one person, a huge task (the estimate without AI was about 40 MD, for 3–4 seniors). Thanks to AI I did it alone in about 5 days (about 50 hours).
The base task was centralized auth, roles, RBAC with granular permissions, delegated tokens, verification, checks, audit, passing data along a safe path between all the nodes, together with monitoring and revocation.
I did the whole thing the way that has worked for me — gather the data and the information, a detailed spec, then implementation in phases.
Gathering the data and the information
This task ran across several nodes:
- a legacy app for controlling the robots
- platform BE
- platform FE
- a new app for controlling the robots
- agent runtime
- a proxy node
- robots on the end devices
- other inputs into the agent, for example from Slack, or from anywhere else
The point of the whole auth flow was that the platform backend holds identity and permissions, and every other node depends on the platform.
Someone else had originally worked on each part, so I spent the first hours of the project thoroughly understanding all the important details.
Writing the spec
This is where I brought in an AI agent (this was the Opus 4.6 era), and together we wrote about 30 A4 pages of a detailed technical brief. I had to pick through a lot of technical tradeoffs — understand the pluses and the minuses of each one. There were about 16 key decisions. I made most of them myself, and about 6 of them we talked through with the team. I tried to be wise about what was worth putting on the team, and what was mine to decide.
Gathering the information, writing the spec, understanding the consequences of the technical decisions — that's the key to success, even though we don't write the code by hand anymore 🙂.
Implementation
Then I split the 30-page spec into 6 phases, and each phase had its own subphases. Implementing each of them meant reacting to further problems that showed up, and I had to pivot the plans 3 times. So in the end it was around 100 A4 pages of technical text. At one point I felt like a pipe that information was just pouring through 😅. Getting it into code took about 30 hours.
What I took from it
AI is immensely powerful, and monorepos (where all those nodes lived) are the king of context. There was just too much information for one head — it pushed me to the edge of what I can stand, a limit I had never met. In the old days that many technical decisions would have been spread across 2–3 months. Here it happened in essentially one week, and a brain isn't really built for that. Which is why it seems wiser to brake a little.