MERN Stack Development is the second volume of the Web Coding Series. It is about what happens after the tutorial ends: a Node.js runtime you understand rather than merely start, a React front end that survives its second year, an API with real authentication and real error handling, a MongoDB schema designed for the queries it will actually receive, and a Next.js application that ties the two ends together. Almost every example was run. The listings show the output they really produced — server logs, query plans, build tables, test failures and rendered screenshots — and where an example needs a paid account or a deployment an automated run cannot provide, the book says so instead of inventing a result.
What you will learn
Node.js: the runtime and its module systems, the file system and paths, buffers and streams, events and async context, networking and HTTP, worker threads and clustering, cryptography, configuration, errors and logging, debugging and profiling, the built-in test runner, TypeScript on Node, publishing packages and monorepos, the permission model and supply-chain security, and performance in production.
React: JSX and components, state, effects, context and reducers, refs, memoization and the React Compiler, concurrent rendering, forms and actions, custom hooks, component design patterns, performance, TypeScript, accessibility, testing, React Router including data routers with loaders and actions, Redux Toolkit, the wider library ecosystem, and server components.
Express and NestJS: routing, the request and response objects, middleware, static files, templates and uploads, cookies, sessions and authentication, validation and error handling, observability and testing, REST design and OpenAPI, security hardening and rate limiting, GraphQL and real-time APIs, caching and deployment — then the same API rebuilt in NestJS with modules, dependency injection, pipes, guards and interceptors.
MongoDB: the document model and BSON, CRUD and querying, the aggregation pipeline, indexes and query plans read from real explain output, schema design and relationships, transactions and change streams, time-series and search collections, operating a deployment, the Node.js driver, Mongoose, seeding, migrations and testing — and an honest chapter on when a relational database would serve you better.
Next.js: the App Router, navigation and streaming, server and client components, data fetching, caching and revalidation, server actions, route handlers and the proxy, authentication and security, styling, fonts and images, metadata and SEO, TypeScript and tooling, testing, Core Web Vitals, and deployment — including self-hosting with a standalone build.
Why this book is different
The code was executed, not imagined. Where documentation and reality disagreed, the book reports what actually happened and says so.
One API — a bookshelf catalog — is built in Express, rebuilt in NestJS, backed by MongoDB and consumed by Next.js, so the chapters connect instead of standing alone.
Hundreds of listings, tables and diagrams, quick-reference appendices for Node modules, React hooks, the Express and Mongoose APIs and the MongoDB operators, a glossary, and an index of open-source tools with their repositories and licences.
Ten "Test Yourself!" questions end every chapter, each one a real behaviour that catches experienced developers out, with worked answers at the back.
Every version number, default and deprecation was verified against official documentation while the book was being written.
Chong Lip Phang is a seasoned web and mobile app developer in Malaysia. He has been writing computing books since 2013.
The mobile game he created, Quiz Jungle, features multiplayer quiz games on various subjects. In the game, all the animals talk, interact with one another, and have intelligence literally.
One of the books he published, Mastering Front-End Web Development, has won seven awards from Book Authority.