Full Stack Developer Interview Questions and Answers
Last updated 2026-11-19
A full stack interview checks whether you can carry a feature from the database to the screen. The questions cross boundaries: how a login works across browser and server, where validation belongs, how a page renders and how a change reaches production. Interviewers care about how well your layers fit together more than about expert depth in each.
This page focuses on those cross-layer questions. For single-stack depth use the React, Node.js, Express, Django or Spring Boot banks. For a hands-on round, read how to approach a take-home assignment, since many full stack processes include one.
| Focus | Integration between client, API, database and deployment |
|---|---|
| Common formats | Take-home project, pair programming, feature build, design discussion |
| Questions here | 17 |
How to structure a feature answer
When asked to design a feature, walk the layers in order: data model, API contract, server logic, client state and UI, then errors, security and deployment. Naming each layer shows you are not only a frontend or backend person, and it keeps the answer organised.
Typical pitfalls
- Validating only on the client. Always validate again on the server.
- Treating the frontend as trusted when it checks permissions.
- Ignoring loading, empty and error states in the UI.
- Describing deployment as just uploading files, with no environments or rollback plan.
Full Stack Developer Interview Questions and Answers: questions with worked answers
1 Trace a request from a button click to the database and back.
easyThe click handler calls fetch to an API endpoint. The browser resolves DNS, connects over TLS, sends the request with cookies. A load balancer routes it to an app server, where middleware handles authentication and parsing. A handler validates input, runs a query through a connection pool, builds a JSON response and returns it. The client updates state and re-renders. Mention caching and error handling at each hop.
2 Why validate on both client and server?
easyClient validation gives instant feedback and saves round trips. It is a convenience only, because anyone can bypass the browser with curl. Server validation is the real security boundary and must check types, lengths, ranges and ownership of the resource. Sharing a schema, for example with Zod in a TypeScript monorepo, keeps both sides consistent.
javascriptimport { z } from 'zod'; export const SignUp = z.object({ email: z.string().email(), password: z.string().min(10), }); // client: SignUp.safeParse(form); server: SignUp.parse(req.body)3 Explain how login works with cookies end to end.
mediumThe client posts credentials over HTTPS. The server checks a password hash made with bcrypt or Argon2, creates a session, and replies with Set-Cookie carrying an opaque session ID with HttpOnly, Secure and SameSite=Lax. The browser attaches it to later requests automatically, and middleware loads the session. Logout deletes the server session. Protect state-changing requests against CSRF with SameSite and a token. Rate limit the login route.
4 CSR, SSR, SSG or ISR: how do you choose?
mediumClient-side rendering ships a shell and builds the page in the browser, which suits logged-in dashboards. Server-side rendering builds HTML per request, giving fast first paint and good SEO for dynamic pages. Static generation builds at deploy time and is fastest for content that rarely changes. Incremental regeneration rebuilds static pages in the background on a schedule or on demand. Pick per route, based on freshness needs and whether the page is public. See Next.js interview questions.
5 Design a schema for blog posts with comments and tags.
mediumUsers have many posts and posts have many comments, both one-to-many with foreign keys. Posts and tags are many-to-many, so add a join table post_tags with a composite primary key. Index comments by post_id and created_at, and posts by author_id and slug, which should be unique. Decide delete behaviour: cascade comments with the post, restrict deleting a user who has posts.
sqlCREATE TABLE posts (id BIGSERIAL PRIMARY KEY, author_id BIGINT NOT NULL REFERENCES users(id), slug TEXT UNIQUE NOT NULL, body TEXT NOT NULL, created_at TIMESTAMPTZ DEFAULT now()); CREATE TABLE comments (id BIGSERIAL PRIMARY KEY, post_id BIGINT NOT NULL REFERENCES posts(id) ON DELETE CASCADE, body TEXT NOT NULL, created_at TIMESTAMPTZ DEFAULT now()); CREATE TABLE post_tags (post_id BIGINT REFERENCES posts(id) ON DELETE CASCADE, tag_id BIGINT REFERENCES tags(id), PRIMARY KEY (post_id, tag_id)); CREATE INDEX ON comments (post_id, created_at);6 How do you handle server state on the client?
mediumTreat data fetched from the API as a cache that can go stale, not as app state you own. Libraries like TanStack Query handle caching, deduplication, background refetching and invalidation after mutations. Keep truly local UI state, such as a modal flag, in component state. This avoids copying server data into Redux and writing your own loading and error logic for every endpoint.
7 What is optimistic UI and what must you handle?
mediumThe UI applies the change immediately and sends the request in the background, so the app feels instant. You must keep the previous value so you can roll back, show an error if the server rejects it, and reconcile with the server response, which may include generated IDs or timestamps. Use it for low-risk actions such as likes, not for payments.
8 WebSockets, Server-Sent Events or polling for live updates?
mediumPolling is the simplest but wastes requests and adds latency. Server-Sent Events give a one-way stream from server to browser over plain HTTP with automatic reconnection, ideal for notifications and live feeds. WebSockets give two-way, low-latency messaging suited to chat and collaboration, but need sticky routing or a pub/sub backplane when you run several servers. Choose the simplest that fits.
9 How do you design a REST API for a resource such as orders?
mediumUse nouns and plural paths: GET /orders, POST /orders, GET /orders/{id}, PATCH /orders/{id}. Return correct status codes, support filtering and cursor pagination, version through the path or a header, and document with OpenAPI. Keep the response shape stable, return validation errors in a consistent structure, and never expose internal IDs or fields the client should not see. Read REST API interview questions.
10 How do you store and serve user file uploads?
mediumDo not store files in the database or on an app server disk. Have the server issue a short-lived pre-signed URL so the browser uploads directly to object storage such as S3, then store only the object key and metadata. Validate size and content type on the server, scan if needed, and serve through a CDN. Serve user content from a separate domain to limit XSS risk.
11 How do you manage configuration and secrets across environments?
mediumFollow the twelve-factor approach: configuration comes from environment variables, one build runs in every environment. Keep secrets out of the repository and out of client bundles, since anything prefixed for the browser, such as NEXT_PUBLIC_ or VITE_, is public. Use the platform secret store, rotate keys, and give each environment its own credentials.
12 What does a good testing strategy look like?
mediumMany fast unit tests for logic, fewer integration tests that hit a real test database and the API, and a handful of end-to-end tests with Playwright for the key journeys such as sign up and checkout. Test behaviour, not implementation. Run them all in CI on every pull request, and keep flaky tests out of the main suite.
13 How would you set up CI/CD for a web app?
mediumOn each pull request, run lint, type check and tests, and build a preview deployment. On merge to main, build once, run migrations, deploy to staging, run smoke tests and promote to production, ideally through a blue-green or rolling release with automatic rollback on failing health checks. Keep database migrations backward compatible with the previous release.
14 How do you prevent CSRF and XSS together in a full stack app?
hardXSS is prevented by output escaping from the framework, a strict Content Security Policy and avoiding raw HTML injection. CSRF is prevented by SameSite cookies plus anti-CSRF tokens for cookie-authenticated state changes. They connect: XSS can read CSRF tokens and defeat that protection, so XSS defence comes first. HttpOnly cookies stop scripts reading the session. See web security and OWASP interview questions.
15 A page loads slowly. How do you find out whether the problem is frontend, API or database?
hardOpen the browser Network panel and check time to first byte against download and render time. If the API is slow, check server timing or traces to see time in handlers versus queries, then run EXPLAIN on the slow query. If the response is fast but the page is slow, profile JavaScript and check image sizes with Lighthouse. Measure before changing anything.
16 How do you handle two users editing the same record?
hardUse optimistic concurrency. Add a version column, send it with the update, and run UPDATE ... WHERE id = ? AND version = ?. If zero rows change, return 409 and let the client reload or merge. Pessimistic locking with SELECT FOR UPDATE suits short, high-contention operations but holds locks. For collaborative text, use operational transforms or CRDTs.
sqlUPDATE documents SET body = $1, version = version + 1 WHERE id = $2 AND version = $3; -- 0 rows affected means someone else saved first: return 40917 Monolith or microservices for a new product?
hardStart with a well-structured modular monolith. One deployable, clear module boundaries and one database keep development and debugging simple for a small team. Split out a service only when a clear reason appears: independent scaling needs, a team boundary or different release cadence. Microservices add network failures, distributed transactions and operational overhead that early products rarely need.
Frequently asked questions
What is asked in a full stack developer interview?
A mix of frontend, backend and database questions, plus how they connect: authentication, API design, rendering strategy, deployment, and often a build-a-feature or take-home task.
Which stack should I pick for interviews?
Pick one you can build a complete project with, such as React with Node.js and PostgreSQL, or Next.js, or Django with a JavaScript frontend. Depth in one beats shallow breadth.
Do I need DSA for full stack roles?
Usually yes, at an easy to medium level: arrays, strings, hash maps and basic recursion. Product companies ask more than service companies.
How do I show full stack skills without work experience?
Build and deploy one real project with authentication, a database, tests and a README that explains your design decisions. Be ready to discuss every trade-off in it.
Related guides
More in Role-wise Interview Questions by Job and Tech Stack
- Generative AI and LLM Interview Questions and Answers
- Google Cloud (GCP) Interview Questions and Answers
- GraphQL Interview Questions and Answers
- Hibernate and JPA Interview Questions and Answers
- HTML and CSS Interview Questions and Answers
- iOS and Swift Interview Questions and Answers
- Jenkins and CI/CD Interview Questions and Answers
- Kubernetes Interview Questions and Answers
- Machine Learning Interview Questions and Answers
- Manual Testing Interview Questions and Answers
- MERN Stack Interview Questions and Answers
- Next.js Interview Questions and Answers (Next.js 15)