Interview practice

Full Stack Developer (MERN)

2–5 years · Mid — Node.js · Express · MongoDB · React · REST APIs · Authentication

0–2 years 2–5 years 5–8 years 8+ years
scenario Debugging production issues 1 of 6
You notice that a recently deployed feature is causing a significant increase in the load times of your application. Describe your first steps to identify the cause.
What a strong answer covers

Reviews performance metrics to identify impacted routes; checks recent code changes for resource-heavy operations; uses logging to trace execution paths; inspects database queries for inefficiencies; isolates the feature to test in a staging environment.

The follow-up you would get

You find that a third-party API call is the bottleneck. What changes would you make to mitigate this issue?

Could you have answered that?
technical Schema Design 2 of 6
You are designing a MongoDB schema for a blog application that includes posts, comments, and users. How do you decide between embedding and referencing data, especially for comments?
What a strong answer covers

Considers the access patterns, ensuring frequent queries can be optimised; mentions embedding comments if they are always accessed with the post; discusses referencing if comments are large or needed independently; evaluates trade-offs in data duplication and consistency; considers future scalability.

The follow-up you would get

What would change if comments needed to be updated frequently?

Could you have answered that?
technical Debugging Production Issues 3 of 6
You receive reports that a feature in your application fails intermittently in production. How do you approach diagnosing the issue?
What a strong answer covers

Enables detailed logging around the feature to capture error details; checks for race conditions or state inconsistencies; utilises monitoring tools to track performance metrics; reproduces the issue in a controlled environment to isolate variables; reviews recent code changes that may have introduced bugs.

The follow-up you would get

What if the issue only occurs under specific load conditions?

Could you have answered that?
scenario State management 4 of 6
Your React application is showing inconsistencies in state across different components and leads to user confusion. How do you diagnose and resolve this?
What a strong answer covers

Identifies the source of state management, checks for direct state mutations; reviews context providers or global state solutions; implements logging to track state changes; considers lifting state up or using local component state; suggests memoisation to prevent unnecessary re-renders.

The follow-up you would get

You implemented a global state management solution but users are still facing issues. What steps do you take next?

Could you have answered that?
technical Authentication 5 of 6
You have implemented JWT for user authentication in your application. What do you do to handle token expiry and refresh securely?
What a strong answer covers

Implements a refresh token strategy where the access token is short-lived while the refresh token has a longer lifespan; stores refresh tokens securely, ideally in HttpOnly cookies; uses a secure endpoint to exchange refresh tokens for new access tokens; considers revocation strategies for compromised tokens.

The follow-up you would get

What measures would you take to mitigate the risk of token theft?

Could you have answered that?
technical State Management 6 of 6
Your React application has performance issues when rendering a list of 10,000 items. What strategies can you employ to improve rendering performance?
What a strong answer covers

Utilises virtualisation libraries like react-window or react-virtualized to only render visible items; leverages memoisation with React.memo or useMemo for expensive components; checks for unnecessary re-renders using React DevTools; suggests pagination for managing large data sets.

The follow-up you would get

If virtualisation isn't an option, what else could you try?

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.