Going full-stack JavaScript: notes from a MERN build
MongoDB, Express, React, Node — the pitch is one language and one mental model. After shipping a real product on it, here's the honest ledger.
For a recent product build I went all-in on one language: MongoDB, Express, React, Node. After years of PHP on the backend and an ever-growing pile of JavaScript on the front, the pitch was seductive — one language, one mental model, JSON from the database to the DOM with no translation layers.
The parts that delivered
- async/await ended the darkness. I still have scars from the callback pyramids of early Node. Being able to write asynchronous code that reads top-to-bottom changed the daily experience completely.
- One language, real leverage. Validation logic shared between client and server. Engineers moving across the stack without a context switch. On a small team, that flexibility is worth real money.
- The npm ecosystem — there is a package for everything, which is both the blessing and the curse. More on that below.
The parts that need adult supervision
Mongo's flexibility is a loaded gun. "Schemaless" quietly becomes "five generations of document shapes in one collection, and every query defends against all of them." Mongoose schemas from day one, treated as seriously as SQL migrations, saved us. And the dependency tree deserves suspicion — our modest app pulled in nine hundred transitive packages, and I could vouch for maybe twenty.
Schemaless doesn't mean no schema. It means the schema lives in your head — the most unreliable database there is.
Would I choose it again?
For dashboards, real-time features and API-first products with a small team — yes, without hesitation. For heavily relational domains like fee ledgers and timetables, I'd still reach for a relational database under a Node API. The stack is a tool, not a religion — the older I get, the more that sentence covers everything in this industry.