🔥MERN Stack Interview
M - MongoDB (Database)
● CRUD operations (Create, Read, Update, Delete)
● Mongoose ORM (schemas, models, validation)
● MongoDB aggregation pipeline (basics)
● Relationships (One-to-Many, Many-to-Many)
● Indexes and performance tips
E - Express.js (Backend Framework)
● REST API creation (GET, POST, PUT, DELETE)
● Middleware usage
● Routing techniques
● Error handling
● JWT (JSON Web Token) authentication
● CORS, body-parser, dotenv
R - React.js (Frontend Library)
● Component-based architecture (functional + class components)
● Props vs state
● useState, useEffect, useRef, useContext
● React Router
● Controlled vs uncontrolled components
● Lifting state up / React forms
● Conditional rendering
● Fetching API data (axios or fetch)
N - Node.js (Runtime)
● Core modules: fs, http, path
● Event loop, async/await, Promises
● Express.js integration
● Working with file systems (uploads using multer)
● Environment variables
● nodemon usage
Full Stack Integration
● Connecting React frontend to Express backend
● Axios / fetch to make API calls
● Managing state across components (Context API / Redux)
● Deployment concepts: hosting on Vercel (React) and Render/Heroku (Node +
MongoDB)
● .env usage on both sides
Authentication & Security
● Login / Registration with JWT
● Password hashing with bcrypt
● Authorization middleware
● Securing routes
Most Common Interview Questions
1. What is the difference between useEffect and useState?
2. How do you handle form validation in React?
3. How do you protect a route in Express.js?
4. Explain how JWT works.
5. What happens when you type a URL and hit Enter? (System design)
6. How do you connect MongoDB with Node.js?
7. What is a virtual DOM? Why is it important?
8. How to handle CORS issues?
9. How do you structure your MERN project?
10.How would you optimize a slow React app?