MERN uses JavaScript on every layer: React in the browser, Express and Node.js on the server and MongoDB for data. That makes it a popular way to build a whole product with one language, but the parts still have to be joined carefully. In this course you build one real application from empty folders to a deployed app, covering the decisions that tutorials usually skip: project structure, validation, authentication, error handling and deployment.
What you'll learn
- Structuring a MERN project as a client and an API, in one repository or two
- Designing a REST API with Express 5: routes, controllers, middleware and consistent error responses
- Modelling data in MongoDB with Mongoose: schemas, references versus embedding, indexes and validation
- Validating every request with a schema library such as Zod
- Authentication with secure, HTTP-only cookies, password hashing and role-based access
- Building the React client with Vite, React Router and a data-fetching library such as TanStack Query
- File and image uploads to object storage with signed URLs
- Pagination, search and filtering on the server
- Testing the API with Vitest and Supertest, and the client with React Testing Library
- Deploying the API, database and front end, with environment variables and logging
Who it's for
- JavaScript developers who know some React and want to build the back end too
- Front-end developers moving towards full-stack roles
- Students who want one substantial, deployed project to talk about
Prerequisites
- Comfortable with modern JavaScript and the basics of React (see React for Beginners)
- Some command-line experience
- Node.js LTS installed and a free MongoDB Atlas account or a local MongoDB
Outcomes
By the end of this course you will be able to:
- Design and build a REST API with Express and MongoDB that validates input and handles errors consistently.
- Add secure authentication and role checks to a full-stack app.
- Connect a React client to your API with sensible caching and loading states.
- Test and deploy a MERN app with a repeatable process.
Projects you'll build
- Team task board: users, workspaces, boards and tasks with comments and assignments. It is the main project and practises data modelling, REST design and role-based access.
- Image upload service: profile pictures and task attachments stored in S3-compatible storage with signed uploads. It practises file handling, limits and security checks.
- Activity feed and search: a paginated activity log with text search and filters. It practises MongoDB indexes, aggregation and server-side pagination.
Tools you'll use
Node.js 24 LTS, Express 5, MongoDB 8 or Atlas, Mongoose, Zod, React 19 with Vite, React Router, TanStack Query, Vitest, Supertest, Docker for local services, and a host such as Render, Railway or a VPS.
Course outline
| Module | Topic |
|---|---|
| 1 | MERN architecture and project setup |
| 2 | Express 5: routing, middleware and errors |
| 3 | MongoDB and Mongoose data modelling |
| 4 | Request validation and API conventions |
| 5 | Authentication, sessions and roles |
| 6 | React client setup and routing |
| 7 | Data fetching and caching on the client |
| 8 | File uploads and object storage |
| 9 | Search, pagination and aggregation |
| 10 | Testing the API and the client |
| 11 | Security hardening and rate limiting |
| 12 | Deployment, logging and monitoring |
FAQ
How is this different from the Node.js and MongoDB courses?
Node.js & Express APIs goes deeper on the server alone, and MongoDB and NoSQL Data Modelling on the database. This course joins all four layers into one deployed product.
Is MongoDB the right database for every app?
No. It suits flexible, document-shaped data. We discuss where a relational database such as PostgreSQL would be a better fit.
Do you use Next.js?
No. We keep a separate React client and Express API so each layer is clear. Next.js is covered in other courses.
How do I join?
Get in touch and we'll share the current format, schedule and enrolment details.