Software Engineering,
Architecture & Code.
samuelsantana.dev is a personal blog about software engineering, architecture, and code — notes from someone who builds real products day to day.
RxJS performance, measured: the bottleneck is almost never the operator
One question that shows up under "RxJS performance" is whether RxJS is slow. I measured it. On my machine, each operator in a chain costs between 8 and 12 nanoseconds per value. Th…


OAuth sign-in error? How to find the step where the login broke
"Failed to initialize OAuth", "Couldn't sign you in", "Login failed". The message that reaches the user almost never says where the flow stopped, and an OAuth login has at least fi…

React #418 After 9 PM: My Server Was Already in Tomorrow
During the day, nothing. From 9 PM on, every load of the dashboard and of the public demo page of BolsoVerde, the sales-tracking app I build for small sellers in Brazil (bolsoverde…

Angular 22 folder structure: lazy features and boundaries enforced by lint
In July I wrote an overview of folder architecture for React, Angular and Node.js. The Angular part aged badly. It recommended checkout.component.ts and auth.guard.ts, components/…

Idempotency in Tool Calls: the Bug Nobody Sees Until the AI Agent Double-Charges Someone
An AI agent calls the charge_customer tool. The HTTP call takes longer than expected, the timeout fires, and the model itself (not a script, the model) decides to try again. Or the…

Context engineering in practice: what the agent doesn't load doesn't exist
On August 19 I found out that the rules I had written for all my repositories had never applied to a single session. They lived in an AGENTS.md in the folder that holds my projects…

Connection Pooling on Serverless Postgres: Why Your API Chokes in Production
It works perfectly on your localhost. It passes CI. It works in staging with two test users. Then you ship to production, traffic grows a little, and the API starts returning too m…

RxJS Already Knows How to Do loading/error/data: the Operators Behind rx-state-bridge
Every screen that fetches data has the same skeleton: a loading that flips to true before the request and false after, an error that captures whatever went wrong, a data that recei…

signal() Is Also a Function: the Bug That Silenced Every rx-state-bridge Operator Under Angular
rx-state-bridge is a library I wrote to solve a tedious, repetitive problem: every fetch in a UI ends up with the same loading/error/data trio rewritten by hand, subscription after…

The Silent OAuth Bug: Why the Token Should Never Travel Through the URL
OAuth login works. The popup opens, the user approves on Google, the popup closes, and your app receives ?token=eyJhbGciOi... in the callback URL. You read the token off the query…

Folder Architecture at Scale: How to Organize React, Angular, and Node.js Projects with SOLID and Clean Architecture
Update: looking for Angular only? The Angular 22 folder structure post was tested on the current CLI, with today's file names (no .component.ts), lazy routes per feature and bounda…

The AI-Driven Frontend: WebMCP, Tools, and Accessibility in Angular
For years, the role of the frontend was very clear: fetch data from an API (REST or GraphQL), manage local state, and render HTML. We built "dumb" applications that relied exclusiv…

Authentication and Security: JWT vs. Server-Side Sessions in the Next.js + NestJS Ecosystem
If there is a topic in software engineering capable of generating more debates than the choice between spaces and tabs, it's authentication. For years, the frontend community adopt…

RxJS vs. Signals: The impact on performance and architecture in Angular applications
Anyone building Angular applications for more than a few years has probably developed a sort of Stockholm Syndrome with RxJS. We love it for its robustness in handling complex asyn…

Real Strategies for Complex Frontend Migrations
The End of the "Big Bang" Every senior dev has been in this meeting. The legacy code has accumulated unpayable technical debt, build times take agonizing minutes, every new feature…

LLM Architecture: Tokens, Context, Skills, and Agents
The integration of generative AI is no longer just about chat interfaces; it has become a direct software architecture challenge. Understanding how the engine of these tools works…

Why My OAuth Login Worked in Dev and Broke in Production
For weeks, the Google and GitHub login on samuelsantana.dev worked perfectly—in my local environment. In production, the popup would open, the user would authorize, and after that,…

The Angular Renaissance: Signals and the New HTTP Approach
If you follow the Angular ecosystem closely, you know the framework is going through its biggest renaissance since the AngularJS-to-Angular-2 rewrite. With versions 16 and 17 landi…

Has the Frontend Become the New Monolith? How Architecture Impacts Business Scale
For a long time, the term "legacy monolith" was a nightmare exclusive to backend teams. But as the complexity of modern web applications grew, business logic, state management, and…