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
technical Authentication 1 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?
scenario Component-level design 2 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 3 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?
ownership A feature you owned 4 of 6
Describe a feature you developed from start to finish and what you learned from the experience.
What a strong answer covers

Specifies the feature's purpose and context; details the technologies used and design choices made; explains challenges faced and how they were overcome; reflects on what could be improved in future implementations; mentions team collaboration and feedback received.

The follow-up you would get

What would you change if you were to start that feature again?

Could you have answered that?
scenario Debugging production issues 5 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 REST APIs 6 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?
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.