Roadmaps › Web Development
MERN Stack Roadmap
Become a full stack web developer with MongoDB, Express, React and Node.
Level: Beginner → Intermediate · Duration: 5–6 months
Step 1: HTML & CSS
Semantic HTML, Flexbox, Grid, responsive design.
Every web app starts with HTML for structure and CSS for looks. You do not need to be a designer, but you must be able to build clean, responsive layouts — React will generate HTML, and you still style it with CSS.
- Page structure with semantic HTML
- The box model and positioning
- Flexbox and Grid layouts
- Responsive design for phones
Resources: ▶ HTML, CSS, JavaScript & Git · HTML documentation · CSS documentation
Semantic HTML
header, main, section, forms and accessibility basics.
Use elements that describe meaning — header, nav, main, section, footer, button, form. It helps accessibility, SEO and makes your React components easier to read.
- Semantic layout elements
- Forms, inputs and labels
- Accessible buttons and links
- Images with alt text
Box model & positioning
margin, padding, border, position.
Every element is a box of content, padding, border and margin. Positioning (relative, absolute, fixed, sticky) places boxes on top of or relative to each other — think navbars and modals.
- margin, padding, border and box-sizing
- position: relative, absolute, fixed, sticky
- z-index and stacking
- display: block, inline, none
Flexbox & Grid
Modern layouts without hacks.
Flexbox arranges items in a row or column; Grid handles two-dimensional layouts. Together they cover navbars, cards, dashboards and full page layouts.
- justify-content, align-items and gap
- flex-wrap and flex-grow
- grid-template-columns with repeat() and minmax()
- Building a responsive card grid
Responsive design
Media queries and mobile-first CSS.
Your app must work on a 360px phone and a wide monitor. Mobile-first CSS with media queries and flexible units makes that straightforward.
- Viewport meta tag
- Mobile-first media queries
- rem, %, vw and clamp()
- Testing in browser device mode
Step 2: JavaScript
ES6+, DOM, events, fetch, async/await.
In the MERN stack you write JavaScript everywhere — in the browser with React and on the server with Node. A strong grip on modern JavaScript is the single most important skill in this roadmap.
- Core language and ES6+ features
- The DOM and events
- Asynchronous code
- Working with JSON and APIs
Resources: ▶ Chai aur JavaScript · JavaScript documentation · Notes: JavaScript Promises & Async/Await
ES6+ syntax
let/const, arrow functions, destructuring, spread, modules.
Modern JavaScript features appear in every React and Node file. Learn them until they feel natural.
- let/const, template literals and arrow functions
- Destructuring and the spread/rest operators
- Array methods: map, filter, reduce, find
- Modules: import and export
- Optional chaining (?.) and nullish coalescing (??)
DOM & events
Select elements, handle clicks and forms.
Before React, learn how JavaScript changes a page directly. It helps you understand what React does for you.
- Selecting and changing elements
- addEventListener and the event object
- Event bubbling and delegation
- Building a small to-do app in plain JS
Async JS
Callbacks → promises → async/await, the event loop.
Network calls, timers and database queries are asynchronous. Understanding promises and async/await prevents most beginner bugs in both React and Node.
- The event loop
- Callbacks and promises
- async/await with try/catch
- Promise.all for parallel work
fetch & JSON
Call APIs and render the data.
fetch calls APIs from the browser; JSON is the format they speak. This is how your React app will talk to your Express backend.
- GET and POST with fetch
- Headers and JSON bodies
- Handling HTTP errors
- JSON.parse and JSON.stringify
Step 3: Git & GitHub
Commits, branches, pull requests.
Git tracks every change in your project and GitHub stores it online. You will use it every day and it is how teams collaborate.
- Repositories and commits
- Branches and merging
- Pull requests and code review
Resources: Git documentation · Git cheat sheet · ▶ Complete Git and GitHub Tutorial
Commit & push
init, add, commit, push, .gitignore.
Commit small, logical changes with clear messages and push them to GitHub so your work is backed up and shareable.
- git init, add, commit, push
- Writing good commit messages
- .gitignore for node_modules and .env
Branches & merging
Feature branches, merge conflicts.
Branches let you build features without breaking the main code. Merge them when they are ready, and resolve conflicts calmly.
- git branch, switch and merge
- Resolving merge conflicts
- Keeping a branch up to date
Pull requests
Code review on GitHub.
Pull requests are how changes get reviewed before merging. Even on solo projects they keep history clean.
- Opening a PR with a clear description
- Reviewing and responding to comments
- Squash vs merge commits
Step 4: React
Components, props, state, hooks, React Router.
React builds the frontend of your MERN app from reusable components. You describe the UI for each state and React keeps the page in sync as data changes.
- Components and JSX
- Props, state and hooks
- Fetching data from your API
- Routing between pages
Resources: ▶ Chai aur React · React documentation
Components & JSX
Build UI from small pieces.
A component is a function that returns JSX — HTML-like syntax inside JavaScript. Break your UI into small components that each do one thing.
- JSX rules (one parent, className, {expressions})
- Composing components
- Conditional rendering
- Lists with keys
Props & state
useState, lifting state up.
Props pass data down from parent to child; state is data a component owns. Changing state re-renders the component.
- Passing and reading props
- useState and immutable updates
- Lifting state up
- Controlled form inputs
useEffect & data fetching
Load data from your API.
useEffect runs code after render — the place to fetch data from your Express API. Handle loading and error states so the UI never looks broken.
- The dependency array
- Fetching with axios or fetch
- Loading, error and empty states
- Cleaning up effects
React Router
Pages, params and protected routes.
React Router turns your single-page app into multiple pages with URLs, including dynamic pages like /posts/:id and protected pages for logged-in users.
- Routes, Link and useNavigate
- URL params with useParams
- Protected routes
- Not-found page
State management (optional)
Context API, Redux Toolkit or Zustand.
When many components need the same data (the logged-in user, a cart), pass it with Context or use a store like Redux Toolkit or Zustand.
- Context API for global data
- Redux Toolkit basics
- Zustand as a lighter option
Tailwind CSS (optional)
Utility-first styling.
Tailwind lets you style React components with small utility classes and keeps designs consistent.
- Setting up Tailwind with Vite
- Utilities for spacing, colour and layout
- Responsive and hover variants
Step 5: Node.js & Express
REST APIs, middleware, authentication with JWT.
Node.js runs JavaScript on the server and Express makes building REST APIs simple. This is the "E" and "N" of MERN — the backend your React app talks to.
- Node runtime and npm
- Express routes and middleware
- REST API design
- Authentication with JWT
Resources: ▶ Chai aur JavaScript Backend · Node.js documentation
Node basics
Modules, npm, the event loop, fs.
Understand what Node is good at — lots of concurrent I/O — and how modules, npm and environment variables work.
- The event loop and non-blocking I/O
- CommonJS vs ES modules
- process.env and dotenv
- The fs and path modules
Express routing
GET/POST/PUT/DELETE, params, body.
Routes connect URLs and HTTP methods to handler functions. Organise them by resource in separate router files.
- app.get/post/put/delete
- Route params and query strings
- express.Router for modular routes
- Sending JSON and status codes
Middleware
Logging, validation, error handling.
Middleware are functions that run before your route handlers — parsing JSON, logging, checking auth, handling errors.
- express.json() and cors()
- Writing custom middleware
- Auth-check middleware
- Central error handler
Auth with JWT
Hash passwords (bcrypt), issue and verify tokens.
Hash passwords with bcrypt, issue a signed JWT on login, and verify it on protected routes.
- Register and login endpoints
- bcrypt for password hashing
- Signing and verifying JWTs
- Protecting routes and roles
File uploads (optional)
multer + Cloudinary.
Profile pictures and documents need file uploads. Multer handles multipart forms; cloud storage like Cloudinary or S3 stores the files.
- Multer setup
- Validating file type and size
- Uploading to Cloudinary or S3
Step 6: MongoDB & Mongoose
Schemas, CRUD, relations, aggregation.
MongoDB is the database in MERN. It stores JSON-like documents, which fit naturally with JavaScript. Mongoose adds schemas, validation and helpful methods.
- Documents and collections
- Mongoose models and validation
- Relations with references
- Queries, indexes and aggregation
Resources: MongoDB documentation · ▶ Chai aur JavaScript Backend · ▶ Complete MongoDB Tutorial
Documents & collections
How MongoDB stores data; Atlas setup.
Data is stored as documents (like JSON objects) in collections. MongoDB Atlas gives you a free cloud database to start.
- Documents, collections and _id
- Creating a free Atlas cluster
- Connecting from Node with a connection string
Mongoose schemas
Models, validation, CRUD.
Schemas define the shape of your documents and validate data before it is saved.
- Defining schemas and models
- Validation and default values
- CRUD: create, find, updateOne, deleteOne
- Timestamps
Relations & populate
Referencing other documents.
Related data can be embedded inside a document or referenced by id. populate() fetches referenced documents in one call.
- Embedding vs referencing
- ObjectId references
- populate() for joined data
Aggregation (optional)
Group, lookup and reports.
The aggregation pipeline groups, filters and transforms data on the server — for reports, stats and leaderboards.
- $match, $group, $sort, $project
- $lookup for joins
- Indexes for faster queries
Resources: Notes: Indexing and SQL vs NoSQL
Step 7: Deployment
Deploy frontend and backend (Render, Vercel, Atlas).
A MERN project is only impressive when it is live. Deploy the API and the React app separately, connect them with environment variables and keep secrets safe.
- Production environment variables
- Hosting the API
- Hosting the frontend
- Connecting frontend, backend and database
Environment variables
Keep secrets out of your code.
Secrets like database URLs and JWT keys must never be committed to Git. Store them as environment variables locally (.env) and in your host's settings.
- .env files and dotenv
- Adding .env to .gitignore
- Different values for dev and production
Deploy the API
Render / Railway with MongoDB Atlas.
Render and Railway deploy a Node app straight from GitHub. Connect it to MongoDB Atlas and set CORS to allow your frontend.
- Deploying Express on Render/Railway
- Connecting to Atlas from production
- Configuring CORS for your frontend domain
Deploy the frontend
Vercel / Netlify, connect to the API.
Vercel and Netlify host React apps for free and rebuild on every push. Point the app at your live API URL.
- Deploying a Vite app on Vercel
- VITE_ environment variables
- SPA rewrites so refreshing a route works
Docker (optional)
Ship the same environment everywhere.
Docker packages your API so it runs the same everywhere. Optional for beginners, valued by companies.
- Dockerfile for a Node app
- docker compose with MongoDB
- Deploying a container
Resources: Docker documentation
Step 8: Full stack projects (optional)
Prove your skills with real apps.
Projects prove you can build a complete product. Each one should have authentication, a database, a clean UI and a live link.
- Planning features and data models
- Building frontend and backend together
- Deploying and writing a README
Resources: Interview questions: JavaScript · ▶ Complete Web Dev using MERN
Blog or notes app
Auth + CRUD + deployment.
A great first full stack app: users sign up, create, edit and delete posts, and see others' posts.
- Auth with JWT
- CRUD for posts with ownership checks
- Pagination and search
E-commerce mini store
Cart, orders, payments in test mode.
An online store covers products, a cart, orders and payments — features recruiters recognise instantly.
- Product listing with filters
- Cart and checkout flow
- Orders and an admin panel
- Payment gateway in test mode (Razorpay/Stripe)
Real-time chat
Socket.IO.
A chat app teaches WebSockets: messages appear instantly without refreshing.
- Socket.IO rooms and events
- Saving messages to MongoDB
- Online status and typing indicators