
How I Ended Up Doing CQRS in a Node.js Monolith (Without Planning It)
📌 This is part 1 of a series on building event-driven architecture in a Node.js monolith. No microservices, no Kafka — just patterns that actually work at scale. I didn't set out to implement CQRS. I'm a solo developer building a sync platform for e-commerce stores. Node.js, Express, Firestore. Nothing fancy. But at some point, I needed search. Real search. With filters, facets, and sorting. And Firestore just... couldn't. So I made a decision that changed my entire architecture without me even realizing it. The moment it broke Here's the thing about Firestore — it's great for writes. Atomic operations, real-time listeners, scales without thinking. I was happy with it. Then the frontend came along and asked for this: "I need to search products by name, filter by three categories, sort by price, and show me how many results are in each status." If you've tried doing this in Firestore, you know the pain. Composite indexes for every combination. Client-side filtering. Queries that kinda w
Continue reading on Dev.to Webdev
Opens in a new tab


