Interview practice

Full Stack Developer (MERN)

0–2 years · Junior — Node.js · Express · MongoDB · React · REST APIs · Authentication

0–2 years 2–5 years 5–8 years 8+ years
technical REST APIs 1 of 6
You’ve built a REST API endpoint that is expected to return a list of users. The response time has increased significantly over time. What steps would you take to troubleshoot this?
What a strong answer covers

Starts by profiling the endpoint with a tool like Postman or Insomnia; checks database query performance; looks for missing indexes on the user collection; considers response payload size; suggests pagination or filtering to limit results.

The follow-up you would get

If the query itself is slow, what are some methods to improve database performance?

Could you have answered that?
ownership A decision that cost 2 of 6
Describe a time when you mismanaged a state in your React application, and how you realised it.
What a strong answer covers

Identifies a specific instance of mismanaging state; explains how the issue manifested in the application; describes debugging steps taken to identify the state mismanagement; mentions any tools or methods used to resolve it; reflects on what could have been done differently.

The follow-up you would get

What early indicators could have helped you catch it?

Could you have answered that?
technical Debugging 3 of 6
While testing your Node.js application, you encounter an error that states 'Cannot read property of undefined'. What systematic approach do you take to resolve this?
What a strong answer covers

Reproduces the error to understand the context; checks the stack trace for the exact line; verifies variable initialisation and scope; inspects function parameters and their values; uses console.log or debugger statements to trace data flow.

The follow-up you would get

If the error seems intermittent, what additional debugging techniques could apply?

Could you have answered that?
technical Authentication 4 of 6
You need to implement user authentication in your MERN stack application. What are the key steps you would follow to securely manage user sessions?
What a strong answer covers

Uses bcrypt for password hashing; implements JWT for stateless authentication; ensures secure storage of tokens in HttpOnly cookies; configures CORS to protect the API; mentions token expiration and refresh strategies.

The follow-up you would get

If a user reports issues with session expiration, what could be causing this?

Could you have answered that?
scenario State Management 5 of 6
Your React application has a complex state that is managed by Context API. You notice that some components are not updating as expected when the state changes. What do you do first?
What a strong answer covers

Validates that the state is correctly updated; checks component subscriptions to context; evaluates whether components are memoised or optimised; identifies unnecessary re-renders with React DevTools; inspects the structure of the state for any mutations.

The follow-up you would get

You find that a component is not re-rendering due to a memoisation issue. How do you resolve this?

Could you have answered that?
scenario MongoDB Schema Design 6 of 6
You need to add a new feature to your application that requires a significant change to the existing MongoDB schema. How do you handle this change while minimizing disruption?
What a strong answer covers

Assesses impact of changes on existing data; creates migration scripts to update data; uses versioning for new schemas; communicates with the team about downtime; tests changes in a staging environment before deployment.

The follow-up you would get

If users are still using the old version of the app, how do you manage the transition without breaking functionality?

Could you have answered that?
That is this set.

Load six more — you will get questions you have not seen first.

Give me six more →

Say your answer out loud before revealing. Reading the answer first feels like learning and is not.