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 Component-level design 1 of 6
You have to redesign a component that fetches and displays user profiles, but the requirements have changed to include additional data fields. How do you handle this in a timely manner?
What a strong answer covers

Analyses current component structure and API responses; retrieves additional fields from the backend; ensures backward compatibility for existing users; implements lazy loading for new data; tests to confirm no degradation in performance.

The follow-up you would get

The new data fields change frequently. How would you ensure the component remains adaptable to future changes?

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 Authentication 3 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?
ownership A migration challenge 4 of 6
Tell me about a time you had to migrate a service or database. What challenges did you encounter?
What a strong answer covers

Identifies the service or database migrated and reasons for the migration; discusses specific technical challenges faced, such as downtime or data integrity; describes how the migration was tested and validated; mentions lessons learned and improvements made post-migration; avoids blaming external factors for issues encountered.

The follow-up you would get

What would you do differently in future migrations?

Could you have answered that?
technical REST APIs 5 of 6
You are tasked with designing a REST API for a product inventory system. How would you structure the endpoints for products and manage versioning?
What a strong answer covers

Defines clear resource-oriented endpoints like /products, /products/{id}, using HTTP methods appropriately; includes pagination and filtering for /products; implements versioning in the URL (e.g., /v1/products) to avoid breaking changes; emphasises proper status codes for different response scenarios.

The follow-up you would get

How would you handle changes to the data structure without breaking existing clients?

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.