Fullstack Interview Questions (with real STAR answers)

The full stack interview questions that come up most, from junior to senior - JavaScript, React, HTTP and APIs, authentication, databases, and performance. Short model answers for the technical questions, and STAR answers for the "tell me about a time" questions, built from real end-to-end features you can build yourself.

Get started - freeLive cloud workspace in your browser · nothing to install

Full stack interviews mix frontend and backend technical questions, troubleshooting scenarios, and behavioral questions. This page covers the questions that come up most, from junior to senior: behavioral questions with STAR answers built from real end-to-end features you can build yourself, then technical and scenario questions with short model answers.

Fullstack behavioral interview questions (STAR answers)

Tell me about a time you debugged a frontend issue.

Situation: A dashboard rendered completely blank for every user, even though the data existed.
Task: I had to find why nothing showed and get the list rendering.
Action: I checked the browser console and the Network tab, found the fetch request was failing and the code did not handle the error, and corrected how the response was requested and mapped into the UI.
Result: The dashboard loaded reliably, and I added loading, empty, and error states so a failed request showed a clear message instead of a blank page.

Go earn this story: Fix a Blank React Dashboard (Failed Fetch) →

Tell me about a time you improved code quality.

Situation: A growing React app was plain JavaScript, and small refactors kept causing runtime bugs.
Task: I wanted to catch those bugs earlier without a rewrite.
Action: I migrated the app to TypeScript file by file, typing the components, props, and API data so mistakes showed up at compile time.
Result: A whole class of runtime errors became compile-time errors, and changes became safer to make.

Go earn this story: Migrate a React App From JavaScript to TypeScript →

Tell me about a time you built a real-time feature.

Situation: AI chat responses appeared only after the full answer was ready, which felt slow.
Task: I needed the UI to show output as it was generated.
Action: I streamed the response from the server and read it in the browser chunk by chunk with a stream reader, appending each piece to the message as it arrived.
Result: Users saw the answer appear token by token, and the feature felt much more responsive.

Go earn this story: Fix the AI Chat That Dumps the Whole Reply at Once →

Tell me about a time the frontend and backend could not talk to each other.

Situation: After we moved the API to its own domain, every call from the React app failed with a CORS error in the browser, while the same request worked with curl.
Task: I had to let our frontend call the API without opening it to every site.
Action: I configured the API to return Access-Control-Allow-Origin for our frontend origin only, allowed the needed methods and headers, and handled the OPTIONS preflight request.
Result: The frontend could call the API again, and other origins were still blocked by the browser.

Go earn this story: Fix the CORS Error Blocking Your API Calls →

Tell me about a time you built a login flow end to end.

Situation: The app needed user accounts, and some pages had to be visible only to logged-in users.
Task: I had to build login on both the API and the React side.
Action: I added a login endpoint that checks the password hash and returns a signed JWT, sent the token with each API request, and wrapped private pages in a protected route that redirects to the login page when there is no valid token. The API checks the token on every protected endpoint too.
Result: Private pages and data were protected on the server, not only hidden in the UI, and the login flow was reused across the app.

Go earn this story: Add a JWT Login and a Protected Route in React →

Tell me about a time you made a feature faster for users.

Situation: Search used SQL LIKE '%term%', which got slow as the table grew and ranked results badly.
Task: I had to make search fast and return the most relevant results first.
Action: I switched to Postgres full-text search with a tsvector column, a GIN index, and ts_rank to order the results.
Result: Search became fast on the full table, and the best matches appeared at the top.

Go earn this story: Replace LIKE Search With Postgres Full-Text Search →

Fullstack technical and scenario interview questions

What happens when you type a URL into the browser and press Enter?

The browser resolves the domain to an IP address with DNS, opens a TCP connection, and does a TLS handshake for HTTPS. It sends an HTTP request, the server (often through a load balancer and reverse proxy) returns a response, and the browser parses the HTML, loads CSS, JavaScript, and images, builds the page, and renders it.

What is CORS?

Cross-Origin Resource Sharing is a browser rule. By default, JavaScript on one origin cannot read responses from another origin. The server allows it by sending headers such as Access-Control-Allow-Origin. For non-simple requests the browser first sends an OPTIONS preflight request. CORS is enforced by the browser, so curl is not affected.

What is the difference between == and === in JavaScript?

== compares after type conversion, so 0 == '0' is true. === compares value and type without conversion, so 0 === '0' is false. Use ===. A related trap: + with a string joins text, so '5' + 1 is '51' - convert input with Number() before doing math.

How does the JavaScript event loop work?

JavaScript runs one thing at a time on a single thread. Async work such as timers and network requests is handled outside, and the callbacks wait in queues. After the current code finishes, the event loop runs all microtasks (promise callbacks) first, then the next task (such as a setTimeout callback). async/await is a cleaner way to write promise code.

What does the useEffect dependency array do?

It tells React when to run the effect again. With no array, it runs after every render. With an empty array, it runs once after the first render. With values, it runs again when any of them change. Missing dependencies cause bugs with stale values; return a cleanup function to remove listeners or cancel requests.

Why does React need a key on list items?

Keys let React match items between renders, so it updates, moves, or removes the right elements. Use a stable unique id from the data. Using the array index can mix up state and inputs when items are added, removed, or reordered.

What is the difference between controlled and uncontrolled components?

In a controlled component, React state holds the input value and onChange updates it, so React is the single source of truth. In an uncontrolled component, the DOM holds the value and you read it with a ref. Controlled inputs make validation and conditional UI easier.

What is the difference between client-side rendering, server-side rendering, and static generation?

Client-side rendering sends mostly JavaScript and builds the page in the browser. Server-side rendering builds the HTML on the server for each request, which helps the first page load and SEO. Static generation builds the HTML at build time and serves it from a CDN, which is fastest but only for content that does not change per request.

Should you store a token in localStorage or in a cookie?

Any script on the page can read localStorage, so an XSS bug can steal the token. An httpOnly, Secure, SameSite cookie cannot be read by JavaScript, which is safer, but cookies need CSRF protection for state-changing requests. For most web apps, httpOnly cookies are the better default.

What is the difference between REST and GraphQL?

REST uses many endpoints, each returning a fixed shape, and works well with HTTP caching. GraphQL uses one endpoint where the client asks for exactly the fields it needs, which avoids over-fetching and many round trips but makes caching, rate limiting, and query cost harder to control.

Where should you validate user input - frontend or backend?

Both. Frontend validation gives fast feedback to the user. Backend validation is required because anyone can call the API directly. Return a 400 with a clear message for invalid input instead of letting it crash into a 500.

How do you make a slow web page faster?

Measure first with Lighthouse and the browser's Network and Performance tabs. Common improvements: split and lazy-load JavaScript, compress and resize images, serve static files from a CDN with caching headers, paginate large lists, and speed up slow API calls with indexes or caching on the backend.

Scenario: the app works locally but shows a blank page in production. What do you check?

Open the browser console and Network tab first. Common causes are a wrong API URL or missing environment variable in the production build, a CORS error, a wrong base path for the built files, mixed HTTP and HTTPS content, or the server not returning index.html for client-side routes.

Scenario: design a file upload feature.

The frontend asks the API for an upload URL. The API checks the user and file type and size, then returns a presigned URL for object storage such as S3. The browser uploads the file directly to storage, so large files do not pass through the API, and then tells the API to save the file record in the database.

What questions are asked in a full stack interview?

Expect behavioral questions (tell me about a time you...), technical questions on JavaScript, React, HTTP, APIs, authentication, and databases, and scenario or design questions such as building a feature end to end. Many companies also give a take-home project. The questions on this page cover all of these.

How do you answer behavioral interview questions?

Use STAR: Situation, Task, Action, Result. Keep it concrete - a specific feature or incident, what you owned, what you did, and the result. The answers above are all structured this way.

More for Fullstack engineers

Fullstack projectsFullstack roadmapResume projectsCareer guide

Do real production work, free. Live cloud workspaces in your browser - every project you complete lands on your portfolio.

Get started - free
Get started - free