Full Stack Engineer · interview questions
Full Stack Engineer interview questions
From the role's core and recommended topics, most asked first. Filter by the kind of answer the question wants.
React Developer Core 108
- Most asked Explain React concept: JSX.
- Most asked Explain React concept: props.
- Most asked Explain React concept: state.
- Most asked Explain React concept: unidirectional data flow.
- Most asked Explain React concept: keys in lists.
- Most asked Explain React concept: controlled vs uncontrolled inputs.
- Most asked Explain React concept: lifting state up.
- Most asked What does `useState` do and when should you use it?
- Most asked What does `useEffect` do and when should you use it?
- Most asked What does `useContext` do and when should you use it?
- Most asked What does `useRef` do and when should you use it?
- Most asked What does `custom hooks` do and when should you use it?
- Most asked What does `rules of hooks` do and when should you use it?
- Most asked What are the most important changes in React 19?
- Most asked A React page with a long list becomes slow when typing in a search box. How do you find and fix the problem?
- Most asked Write a custom React hook that debounces a value, and use it to search an API without race conditions.
- Most asked Explain React concept: reconciliation.
- Most asked What does `useMemo` do and when should you use it?
- Most asked What does `useCallback` do and when should you use it?
- Most asked React performance: React.memo?
- Most asked What is concurrent rendering in React?
- Most asked What are the pitfalls of fetching data in `useEffect`, and how do you avoid race conditions?
- Most asked Why must React state be updated immutably, and how do you update nested state?
- Most asked When do you NOT need `useEffect`?
- Explain React concept: components.
- What does `effect dependency mistakes` do and when should you use it?
- What does `cleanup in effects` do and when should you use it?
- Discuss testing-library in React applications.
- Discuss accessibility (a11y) in React applications.
- How do Actions and `useActionState` work in React 19?
- Explain React concept: React elements vs components.
- Explain React concept: composition vs inheritance.
- Explain React concept: derived state anti-pattern.
- Explain React concept: pure components.
- Explain React concept: error boundaries.
- Explain React concept: Suspense.
- Explain React concept: lazy / code splitting.
- What does `useReducer` do and when should you use it?
- What does `useTransition` do and when should you use it?
- React performance: virtualization?
- React performance: profiling?
- Discuss React Router in React applications.
- Discuss Redux vs Context in React applications.
- Discuss TanStack Query in React applications.
- Discuss Vitest/Jest in React applications.
- Discuss Next.js in React applications.
- Discuss forms in React applications.
- Discuss auth patterns in React applications.
- What is `useFormStatus` and where must it be used?
- How does `useOptimistic` implement optimistic UI?
- What does the `use()` API do?
- How did refs change in React 19?
- What is the React Compiler and how does it affect `useMemo`/`useCallback`?
- How do you choose between Context, Zustand, Redux Toolkit and server-state libraries?
- Why can React Context cause performance problems, and how do you mitigate them?
- How does TanStack Query manage server state?
- What is the compound components pattern?
- What makes a well-designed custom hook?
- How do you build robust forms in React?
- What are stale closures in React hooks and how do you fix them?
- How do server-side rendering and hydration work in React?
- Which accessibility practices matter most in React apps?
- How should React components be tested?
- What happens in the browser from navigation until a React page shows its data, and how do you avoid request waterfalls?
- Design a component library that several product teams will share.
- Users report that a React app's memory keeps growing the longer they keep it open. How do you investigate?
- Explain React concept: fragments.
- Explain React concept: portals.
- Explain React concept: Strict Mode.
- Explain React concept: Server Components (RSC).
- What does `useLayoutEffect` do and when should you use it?
- What does `useId` do and when should you use it?
- What does `useDeferredValue` do and when should you use it?
- React performance: avoid inline object props?
- React performance: key remounting?
- React performance: batching?
- React performance: concurrent features?
- React performance: bundle analysis?
- Discuss CSS modules / Tailwind in React applications.
- How does React 19 handle `<title>`, `<meta>` and stylesheets rendered in components?
- What resource preloading APIs does React DOM provide?
- What is the `<Activity>` component (React 19.2)?
- What problem does `useEffectEvent` (React 19.2) solve?
- What is `useSyncExternalStore` for?
- How do render props and higher-order components compare with custom hooks?
- How can you use the `key` prop to reset a component's state?
- How does React's event system work?
- How do you build an accessible modal dialog in React?
- How do XSS risks show up in React apps?
- Why did the React ecosystem move from Create React App to Vite and frameworks?
- How do error boundaries interact with async errors and event handlers?
- When would you use `useImperativeHandle`?
- How do you render very large lists efficiently?
- How do you find performance problems in a React app?
- How do you code-split a React app?
- What are the trade-offs between Tailwind, CSS Modules and CSS-in-JS in React?
- How do you build and maintain a React design system?
- How do you internationalize a React app?
- How should a React SPA handle authentication tokens securely?
- How do you add performant animations in React?
- What are micro-frontends and what are their trade-offs in React?
- How do class component lifecycle methods map to hooks?
- What breaking changes should you check when upgrading to React 19?
- In an RSC app, how do you decide what should be a Client Component?
- What is `useInsertionEffect` for?
- How does automatic batching work in React 18+?
- What is the difference between state and props in React?
- How does useEffect work in functional React components?
TypeScript Developer Core 101
- Most asked What is TypeScript and what problems does it solve?
- Most asked Explain `any`, `unknown` and `never`.
- Most asked What are the differences between `interface` and `type` aliases?
- Most asked What is structural typing in TypeScript?
- Most asked What is type narrowing and what techniques does TypeScript support?
- Most asked What are discriminated unions and why are they powerful?
- Most asked What are generics and how do constraints work?
- Most asked Which built-in utility types do you use most, and what do they do?
- Most asked What are mapped types? Show how `Partial` or `Readonly` could be implemented.
- Most asked Explain conditional types and the `infer` keyword.
- Most asked What does the `satisfies` operator do and how does it differ from a type annotation?
- Most asked What does `as const` do?
- Most asked Should you use enums or union types in TypeScript?
- Most asked Which `tsconfig` strictness options matter and what do they catch?
- Most asked How do function overloads work in TypeScript and when are they better than unions?
- Most asked Why do you still need runtime validation in TypeScript, and how do libraries like Zod help?
- Most asked Explain `keyof`, `typeof` (in type position) and indexed access types.
- Most asked What are type assertions (`as`) and the non-null assertion (`!`), and why should you use them sparingly?
- Most asked What are intersection types and how do they differ from interface extension?
- Most asked What are union types and how do you work with them safely?
- How do you type React component props, children and events in TypeScript?
- What are template literal types?
- What are covariance and contravariance in TypeScript function types?
- What are declaration files (`.d.ts`) and how do you type a JavaScript library without types?
- How do you type hooks like `useState`, `useReducer`, `useRef` and context?
- How do you write a generic React component (e.g., a typed List or Select)?
- How do module systems (ESM vs CommonJS) interact with TypeScript settings?
- What are `import type`, `isolatedModules` and `verbatimModuleSyntax`?
- How do `tsc`, esbuild, SWC and Babel differ for TypeScript builds?
- How would you migrate a large JavaScript codebase to TypeScript?
- How does type inference work in TypeScript, and when should you annotate explicitly?
- What's the difference between an optional property (`x?: T`) and `x: T | undefined`?
- How do optional chaining (`?.`) and nullish coalescing (`??`) work with types?
- Explain `void` as a return type and why a callback typed `() => void` can return a value.
- Write a TypeScript function that safely parses unknown JSON into a typed object.
- How do you model immutability in TypeScript?
- How do TypeScript access modifiers compare with JavaScript private fields?
- When would you use an abstract class versus an interface in TypeScript?
- What are index signatures and how do they relate to `Record`?
- How are tuples typed in TypeScript, including labeled and variadic tuples?
- Can Node.js run TypeScript directly?
- How do path aliases (`@/components`) work, and what's the common pitfall?
- What are project references and when do you use them?
- What are excess property checks and when do they apply?
- Why does `Object.keys(obj)` return `string[]` instead of `(keyof T)[]`?
- What's the difference between `// @ts-ignore` and `// @ts-expect-error`?
- What changed with decorators in TypeScript 5.0?
- What are `using` declarations (TypeScript 5.2)?
- What are `const` type parameters (TS 5.0) and `NoInfer` (TS 5.4)?
- How do you type JSON values or recursive structures?
- How should you handle errors in `catch` blocks in TypeScript?
- Why does `Omit` behave unexpectedly on union types, and how do you fix it?
- How do you test types themselves?
- How do you type an Express/Node API in TypeScript?
- How can you share types between frontend and backend?
- How does TypeScript type `this`?
- How do you keep TypeScript type-checking fast in large projects?
- What's the difference between `object`, `Object` and `{}` types?
- Why should you avoid the `Function` type?
- What is `strictPropertyInitialization` and the definite assignment assertion (`!:`)?
- What do `Parameters`, `ConstructorParameters`, `InstanceType` and `ReturnType` give you?
- Explain `Exclude`, `Extract` and `NonNullable`.
- How would you implement a `DeepPartial<T>` type?
- How do you type async functions and promises?
- How are generators and iterators typed?
- Should you use namespaces in modern TypeScript?
- How do you type environment variables safely?
- How do you publish a TypeScript library with correct types for ESM and CommonJS consumers?
- Can you get TypeScript checking in plain JavaScript files?
- What does typescript-eslint add beyond the compiler?
- Why are classes with private members compared nominally?
- Can you pass a `readonly string[]` to a function expecting `string[]`?
- How would you type an event emitter so event names and payloads are checked?
- How do you write a type-safe fetch wrapper?
- What is the Result pattern in TypeScript and when is it preferable to exceptions?
- How do you implement mixins in TypeScript?
- How can generics make a builder pattern type-safe (e.g., tracking which fields are set)?
- What is a `unique symbol` type?
- What do the `target` and `lib` compiler options control?
- What are generic defaults and when are they useful?
- What are phantom types and how do they relate to branding?
- How can `Record<Union, T>` catch bugs when a union grows?
- How are getters, setters and the `accessor` keyword typed?
- How do you add types to globals like `window`?
- What is contextual typing?
- What is literal type widening?
- What's the difference between `const`, `readonly` and `as const`?
- How do you type Maps, Sets and WeakMaps?
- Why combine `as const` with `satisfies`?
- How does the `in` operator narrow union types?
- How would you type a generic repository class?
- How do you safely use data from `JSON.parse` without a schema library?
- What's the difference between `string[]`, `Array<string>` and `[string]`?
- When should a function accept a union parameter versus using overloads?
- What is the native TypeScript compiler port (TypeScript 7 / tsgo)?
- Why can a function with fewer parameters be assigned to a function type with more parameters?
- How do you make a class implement an interface, and what does `implements` actually check?
- What do you do when TypeScript infers a generic type parameter too broadly or as `unknown`?
- How do you safely work with DOM elements in TypeScript?
- What should teams expect from TypeScript 6.0?
- What TypeScript practices do you look for in code reviews?
HTML & CSS Core 45
- Most asked What is HTML?
- Most asked What is HTML5, and how is it different from HTML 4?
- Most asked What is semantic HTML, and why does it matter?
- Most asked What is the alt attribute for, and what makes good alt text?
- Most asked What input types and validation attributes did HTML5 add?
- Most asked What is the difference between script, script async and script defer?
- Most asked Compare localStorage, sessionStorage and cookies.
- Most asked What is ARIA, and what is the first rule of ARIA?
- Most asked What does <!DOCTYPE html> do?
- Why must every form field have a label, and how do you associate one?
- Why isn't client-side validation enough?
- Which head tags matter for SEO and social sharing?
- How do responsive images work with srcset, sizes and picture?
- Why set width and height on images, and when should you use loading="lazy"?
- Why use button and a instead of a clickable div?
- How do you safely display user-generated content in HTML?
- Your page's Cumulative Layout Shift (CLS) score is poor. How do you find and fix the shifts?
- What is the difference between a tag, an element and an attribute?
- What goes in the head of an HTML document, and what goes in the body?
- What is the difference between block and inline elements?
- When should you use id and when class?
- What is the difference between article, section and div?
- How should headings be structured on a page?
- What is the difference between absolute and relative URLs?
- How do you make an HTML table accessible, and when shouldn't you use a table?
- What is the difference between GET and POST in an HTML form?
- What do the autocomplete and inputmode attributes do?
- What does the viewport meta tag do?
- What is structured data (JSON-LD), and why add it?
- What is the DOM, and how does the browser build it from HTML?
- What are data-* attributes for?
- What is the difference between canvas and SVG?
- How do you add video with captions in HTML5?
- What do the dialog element and the popover attribute provide?
- What does the sandbox attribute on an iframe do?
- What are resource hints such as preload and preconnect?
- What is the difference between strong and b, and between em and i?
- When do you use ul, ol and dl?
- Why should you declare the character encoding, and how?
- What are HTML entities and when do you need them?
- What is the details element used for?
- What is the template element?
- Is target="_blank" on links a security risk?
- Who maintains HTML today, and what is the Living Standard?
- What are web components?
API Design Core 33
- Most asked What makes an API RESTful, and what are good REST design practices?
- Most asked Which HTTP methods are safe and idempotent, and why does it matter?
- Most asked Which HTTP status codes should an API use, and when?
- Most asked Compare offset pagination and cursor (keyset) pagination.
- Most asked How should you version an API?
- Most asked How do idempotency keys work for POST requests?
- Most asked Write an Express or FastAPI endpoint that creates an order idempotently.
- Most asked Write a SQL query that returns each customer's three most recent orders.
- Most asked When would you choose GraphQL over REST, or gRPC over both?
- An API endpoint that was fast is now taking seconds under load. Walk through your investigation.
- How should APIs format error responses?
- How do you design reliable webhooks?
- How should APIs support filtering, sorting and field selection?
- Why use OpenAPI (and contract-first design)?
- What counts as a breaking change in an API?
- How should an API communicate rate limits to clients?
- How do you design APIs for long-running operations?
- How do APIs prevent lost updates from concurrent edits?
- What is HATEOAS and is it used in practice?
- How do you design bulk or batch endpoints?
- What naming conventions make APIs easier to use?
- What security practices apply to API design?
- What does an API gateway do, and when do you need one?
- How should APIs represent dates, times and money?
- What makes a great developer experience for a public API?
- PUT vs PATCH: how do you implement updates?
- How do you design event-driven APIs (events between services)?
- How should APIs handle large file uploads and downloads?
- What should a health or status endpoint return?
- How can APIs leverage HTTP caching?
- How do you deprecate an API endpoint responsibly?
- What consistency guarantees should an API document?
- How do APIs handle localization?
Databases & Transactions Core 30
- Most asked What does ACID mean?
- Most asked Explain transaction isolation levels and the anomalies they prevent.
- Most asked How do database indexes work and when do they help or hurt?
- Most asked What is the N+1 query problem and how do you fix it?
- Most asked How do you choose between SQL and NoSQL databases?
- Most asked What is connection pooling and how do you size a pool?
- Most asked How do you run schema migrations without downtime?
- Most asked How do you keep data consistent across services without distributed transactions?
- What is normalization, and when should you denormalize?
- Compare optimistic and pessimistic locking.
- What causes deadlocks and how do you handle them?
- How does database replication work, and what is replication lag?
- What are partitioning and sharding, and what are their trade-offs?
- How do you read a query plan and optimize a slow query?
- What is the transactional outbox pattern?
- What are the pros and cons of using an ORM?
- What are the trade-offs of soft deletes?
- Should primary keys be auto-increment integers or UUIDs?
- Why should data integrity be enforced in the database, not only in application code?
- What is MVCC and how does it affect performance?
- How should you back up and restore databases?
- How do you scale a relational database?
- When do you need a dedicated search engine instead of SQL LIKE queries?
- When is storing JSON in a relational database appropriate?
- Why shouldn't analytics queries run on the production OLTP database?
- What is read-your-writes consistency and how do you provide it?
- How do you perform large data updates or backfills safely?
- How does the CAP theorem apply to databases?
- What are key database security practices?
- How should you test database code?
SQL & Databases Core 42
- Most asked SQL interview: explain INNER JOIN.
- Most asked SQL interview: explain LEFT JOIN.
- Most asked SQL interview: explain GROUP BY.
- Most asked SQL interview: explain HAVING.
- Most asked SQL interview: explain window functions.
- Most asked SQL interview: explain ACID.
- Most asked SQL interview: explain isolation levels.
- Most asked Data modeling: normalization 1NF/2NF/3NF?
- Most asked Indexing/performance: B-tree index?
- Most asked Indexing/performance: EXPLAIN / EXPLAIN ANALYZE?
- SQL interview: explain SELECT filtering.
- SQL interview: explain NULL semantics.
- SQL interview: explain transactions.
- Data modeling: primary key?
- Data modeling: foreign key?
- Data modeling: many-to-many?
- Indexing/performance: composite index?
- Indexing/performance: index write overhead?
- SQL interview: explain RIGHT / FULL JOIN.
- SQL interview: explain ORDER BY / LIMIT.
- SQL interview: explain subqueries.
- SQL interview: explain CTEs (WITH).
- SQL interview: explain UNION vs UNION ALL.
- SQL interview: explain EXISTS vs IN.
- SQL interview: explain CASE expressions.
- SQL interview: explain dirty/nonrepeatable/phantom reads.
- Data modeling: denormalization?
- Data modeling: surrogate vs natural keys?
- Data modeling: OLTP vs OLAP?
- Data modeling: constraints?
- Indexing/performance: covering index?
- Indexing/performance: sequential vs index scan?
- Indexing/performance: cardinality?
- Indexing/performance: vacuum / analyze (Postgres)?
- SQL interview: explain CROSS JOIN.
- SQL interview: explain DISTINCT.
- Data modeling: star schema?
- Data modeling: 1:1 relationships?
- Indexing/performance: hash index?
- Indexing/performance: partial index?
- What are the different types of JOINs in SQL?
- Why are indexes important in a database?
Authentication Core 34
- Most asked What is the difference between authentication and authorization?
- Most asked Compare session-based authentication with token-based (JWT) authentication.
- Most asked What are the most common JWT security pitfalls?
- Most asked What are OAuth 2.0 and OpenID Connect, and how do they differ?
- Most asked Explain the OAuth 2.0 Authorization Code flow with PKCE.
- Most asked How do refresh tokens work, and how do you secure them?
- Most asked How should passwords be stored?
- Most asked What is multi-factor authentication, and which factors are strongest?
- Most asked How do you secure session cookies?
- Most asked How do you protect login endpoints from brute force and credential stuffing?
- How do services authenticate to each other?
- What are passkeys (WebAuthn) and why are they phishing-resistant?
- What is session fixation and how do you prevent it?
- Why do cookie-based sessions need CSRF protection, and how do you implement it?
- What is user enumeration and how do you avoid it?
- How do you design a secure password reset flow?
- What is Single Sign-On, and how do SAML and OIDC compare?
- What is the Backend-for-Frontend (BFF) pattern for authentication in SPAs?
- When are API keys appropriate, and how do you manage them safely?
- How do you implement logout correctly across sessions and tokens?
- What are OAuth scopes, and are they enough for authorization?
- How should mobile apps handle authentication?
- What signals and controls help detect account takeover?
- How does JWKS-based key rotation work for JWTs?
- What are sender-constrained tokens (DPoP, mTLS-bound tokens)?
- How would you implement admin impersonation safely?
- What are the security considerations of passwordless magic links?
- What does zero trust mean for authentication?
- Should you build authentication yourself or use an identity provider?
- How do you authenticate WebSocket connections?
- How does authentication change in multi-tenant B2B applications?
- Why use constant-time comparison for secrets?
- What is HTTP Basic authentication and when is it acceptable?
- How do you safely link social logins to existing accounts?
Next.js Developer Recommended 103
- Most asked What is Next.js and what problems does it solve on top of React?
- Most asked What are the differences between the App Router and the Pages Router?
- Most asked What is the difference between Server Components and Client Components?
- Most asked Explain the App Router file conventions: page, layout, loading, error, not-found, template and route.
- Most asked How does data fetching work in the App Router?
- Most asked How did caching defaults change in Next.js 15?
- Most asked Explain SSR, SSG, ISR and CSR in Next.js.
- Most asked What are Server Actions and how do you use them for mutations?
- Most asked What happens, step by step, when a request reaches a Next.js App Router application?
- Most asked How do dynamic routes, catch-all and optional catch-all segments work?
- Most asked How does streaming with Suspense work in Next.js?
- Most asked What are Route Handlers and when should you use them instead of Server Actions?
- Most asked What is Next.js middleware (renamed `proxy` in Next.js 16) and what should it be used for?
- Most asked How do `revalidatePath` and `revalidateTag` work?
- Most asked How do you manage metadata and SEO in the App Router?
- Most asked What does `next/image` do?
- Most asked How do environment variables work in Next.js, and what is exposed to the browser?
- Most asked How do you implement authentication in a Next.js App Router app?
- Most asked What causes hydration mismatch errors and how do you fix them?
- Most asked How do you optimize Core Web Vitals in a Next.js app?
- Most asked How do `getServerSideProps`, `getStaticProps` and `getStaticPaths` work in the Pages Router?
- How can a Client Component render Server Component content?
- What are route groups, parallel routes and intercepting routes?
- Describe the caching layers in the Next.js App Router.
- How does navigation work with `<Link>` and `useRouter` in the App Router?
- What are `usePathname`, `useSearchParams` and `useParams`, and what's the Suspense caveat?
- How does error handling work in the App Router?
- What are the options for deploying a Next.js application?
- How do you build forms with Server Actions, validation and pending states?
- What is a Data Access Layer (DAL) and why is it recommended in Next.js?
- What security considerations apply specifically to Server Actions and Server Components?
- What is the RSC payload?
- Which props can be passed from a Server Component to a Client Component?
- A Next.js page shows a hydration mismatch error. What causes it, and how do you fix it?
- Design the caching strategy for a Next.js e-commerce site with product pages, a cart and personalised recommendations.
- What does `next/font` provide?
- What's the difference between the Node.js and Edge runtimes in Next.js?
- How do you load third-party scripts efficiently in Next.js?
- How does `next/dynamic` work and when do you use it?
- What is `useOptimistic` and how does it work with Server Actions?
- How do you design good loading states in the App Router?
- Why don't layouts re-render on navigation, and what are the implications?
- How do you implement internationalization in the App Router?
- How do you test a Next.js application?
- What is Turbopack?
- How do redirects, rewrites and headers work in `next.config`?
- How do you add a Content Security Policy to a Next.js app?
- What is Partial Prerendering (PPR) / Cache Components?
- What does the `'use cache'` directive do?
- What's the difference between React's `cache()` and Next.js's `unstable_cache`?
- What is the `after()` API in Next.js 15?
- How do you add observability to a Next.js app?
- How do you access a database from Next.js safely and efficiently?
- How does state management change with Server Components?
- What styling options work with the App Router and Server Components?
- How do API Routes in the Pages Router differ from Route Handlers?
- How would you migrate a large Next.js app from the Pages Router to the App Router?
- How does React 19's `use()` hook help with data in Next.js?
- How are static assets served in Next.js?
- What does `generateStaticParams` do and what is `dynamicParams`?
- What are route segment config options?
- How do you read and set cookies and headers in the App Router?
- How do `redirect()`, `permanentRedirect()` and `notFound()` work?
- Why does `next/image` require `remotePatterns` for external images?
- When does `<Link>` prefetch, and how can you control it?
- How do you avoid request waterfalls in Server Components?
- How do you add real-time features to a Next.js app?
- When would you use a custom Node server with Next.js, and what do you lose?
- How do you structure a Next.js app in a monorepo?
- How does Next.js support TypeScript?
- What does Next.js do for accessibility, and what remains your job?
- How should errors in Server Actions be handled for good UX?
- What is `output: 'export'` and what are its limitations?
- How do you find and reduce large client bundles in Next.js?
- What is the `next/form` component?
- How would you build a multi-tenant SaaS on Next.js with custom domains or subdomains?
- What do the `server-only` and `client-only` packages do?
- What breaking changes should you expect when upgrading to Next.js 15?
- What are notable changes in Next.js 16?
- How does Next.js compare with Remix/React Router v7 and Astro?
- What is Draft Mode and how is it used with a headless CMS?
- How do you generate dynamic Open Graph images in Next.js?
- What is required in the root layout of an App Router app?
- When would you use `template.tsx` instead of `layout.tsx`?
- How do you colocate non-route files inside the `app` directory?
- How do you read query parameters in a Server Component page?
- How would you implement pagination and filters in the App Router?
- How do you implement a URL-addressable modal in the App Router?
- How do you make a Route Handler's GET response static or cached?
- How do you stream a response (e.g., AI tokens) from a Route Handler?
- Compare Auth.js, Clerk and rolling your own authentication in Next.js.
- How should you handle third-party webhooks in Next.js?
- How does image optimization work when self-hosting Next.js?
- How can you preload critical resources in the App Router?
- How do you call a Server Action from an event handler instead of a form?
- How do you rate limit Server Actions or Route Handlers in Next.js?
- What is the React Compiler and how does it relate to Next.js?
- How do you debug unexpected stale data in a Next.js App Router app?
- What do the symbols in `next build` output (○, ●, ƒ) mean?
- How do you handle runtime configuration that changes per environment without rebuilding?
- How does Next.js protect against XSS and where can you still introduce it?
- How do you investigate a production-only error that shows 'An error occurred in the Server Components render'?
- What should you consider for focus management during client-side navigation in Next.js?
Node.js Developer Recommended 102
- Most asked What is Node.js and why is it well suited to I/O-heavy servers?
- Most asked Explain the phases of the Node.js event loop.
- Most asked What is the difference between `process.nextTick`, Promise microtasks, `setImmediate` and `setTimeout(fn, 0)`?
- Most asked How has asynchronous code evolved in Node.js: callbacks, Promises and async/await?
- Most asked Why is CPU-bound work a problem in Node.js and how do you handle it?
- Most asked What are streams in Node.js and what is backpressure?
- Most asked What are the differences between CommonJS and ES modules in Node.js?
- Most asked How does middleware work in Express?
- Most asked How do you implement graceful shutdown in a Node.js server?
- Most asked How do you work with relational databases efficiently in Node.js?
- Most asked Walk through how an Express app handles a request, including errors from async handlers.
- Most asked What does libuv's thread pool do, and which operations use it?
- Most asked When do you use `Promise.all`, `Promise.allSettled`, `Promise.race` and `Promise.any`?
- Most asked Compare `worker_threads`, `cluster` and `child_process`.
- Most asked How should errors be handled in a Node.js application?
- Most asked What causes memory leaks in Node.js and how do you diagnose them?
- Most asked What are key security practices for Node.js web applications?
- Most asked How would you implement authentication in a Node.js API?
- Most asked What makes a well-designed REST API in Node.js?
- Most asked How do you implement rate limiting in a Node.js API?
- Most asked How do you scale a Node.js application?
- What is a `Buffer` in Node.js?
- What is the `EventEmitter` and where is it used?
- Compare Express, Fastify, NestJS and Hono.
- How do you profile CPU performance in a Node.js app?
- What is prototype pollution and how do you prevent it?
- How should configuration and secrets be managed in Node.js?
- How do you create an HTTP server with Node's core `http` module, and why use a framework instead?
- How do you make HTTP requests in modern Node.js?
- How do `AbortController` and `AbortSignal` work in Node?
- How should you log in a production Node.js service?
- What is `AsyncLocalStorage` and how is it used?
- How do you test Node.js applications?
- Compare npm, pnpm and Yarn, and explain lockfiles.
- Explain semantic versioning ranges like `^1.2.3` and `~1.2.3`.
- How do you reduce npm supply-chain risk?
- How does Node.js's release schedule work, and which versions should production use?
- How do Prisma, Drizzle and Kysely differ?
- How do you use Redis with Node.js for caching and coordination?
- How do you run background jobs in Node.js?
- How do you validate request input in Node.js APIs?
- How do you handle large file uploads in Node.js?
- How do you build real-time features with WebSockets in Node.js?
- How does V8's garbage collector work, and how does it affect Node apps?
- What's the difference between `exec`, `execFile` and `spawn`, and what's the security concern?
- How do you prevent path traversal when serving files in Node.js?
- Which `node:crypto` APIs should you use for common tasks?
- What are best practices for running Node.js in Docker?
- How do Node.js microservices communicate reliably?
- How do you add observability to a Node.js service?
- What is NoSQL injection in Node/MongoDB apps and how do you prevent it?
- What happens to other requests when one request blocks the Node.js event loop?
- Which modern built-in Node.js features reduce the need for third-party tools?
- What is Node.js's permission model?
- How do Bun and Deno compare with Node.js?
- When would you use Server-Sent Events instead of WebSockets?
- How would you build a GraphQL API in Node.js and what pitfalls should you watch for?
- How do you schedule recurring jobs in a Node.js system?
- What are hidden classes and inline caches in V8, and why do they matter for performance?
- How do you size Node.js memory in containers?
- Should Node.js terminate TLS itself?
- What do `timer.unref()` and `ref()` do?
- How should a Node.js process exit, and why prefer `process.exitCode` over `process.exit()`?
- How do you debug a Node.js application?
- How does Node resolve packages, and what does the `exports` field do?
- What are dependencies, devDependencies and peerDependencies?
- What is PM2 and is it still needed with containers?
- What is a circuit breaker and how would you use one in Node.js?
- How do you design liveness and readiness checks for a Node service?
- Should a Node.js server compress responses itself?
- How can large JSON payloads hurt Node.js performance, and what are alternatives?
- Which Web-standard APIs are available globally in modern Node.js?
- How would you structure a medium-to-large Node.js backend codebase?
- How do you do dependency injection in Node.js without a framework?
- How do you make a Node.js payment or order endpoint idempotent?
- Which `node:util` functions are most useful?
- How do you build a CLI tool with Node.js?
- What are best practices for using the `fs` module?
- How does module caching work in Node.js?
- How do you handle dates and timezones correctly in Node.js?
- What does the Twelve-Factor App methodology recommend for Node services?
- What are Node.js Single Executable Applications (SEA)?
- What is `node:diagnostics_channel` used for?
- What is `node:sqlite`?
- How do you detect and fix N+1 queries in Node ORMs?
- What is the Backend-for-Frontend (BFF) pattern and why is Node popular for it?
- How do you format numbers, currencies and plurals for different locales in Node?
- How do you use MongoDB effectively from Node.js?
- How does Fastify's plugin system and encapsulation work?
- Describe NestJS's core building blocks.
- How do you organize routes in a larger Express app?
- How do sessions work with `express-session`, and what store should you use?
- Why does HTTP keep-alive matter for outbound requests in Node?
- Does Node.js support HTTP/2 and when would you use it directly?
- How do you consume Kafka events reliably in Node.js?
- How do you achieve zero-downtime deployments for Node services?
- How are feature flags used in Node.js services?
- What are the options for running TypeScript in a Node.js backend?
- How does the `cluster` module distribute connections, and why might you need sticky sessions?
- How do you implement HTTP caching in Node.js APIs?
- What tooling keeps a Node.js codebase healthy?
- How do you process a large log file line by line in Node.js?
Python Developer Recommended 104
- Most asked Explain mutable vs immutable in Python.
- Most asked Explain is vs == in Python.
- Most asked Explain generators in Python.
- Most asked Explain decorators in Python.
- Most asked Explain context managers in Python.
- Most asked Explain GIL in Python.
- Most asked Explain threading vs multiprocessing vs asyncio in Python.
- Most asked Backend Python interview: explain N+1 queries.
- Most asked Backend Python interview: explain authN vs authZ.
- Most asked Backend Python interview: explain SQL injection prevention.
- Most asked What is the late-binding closure gotcha in Python?
- Most asked Explain LEGB scoping in Python.
- Most asked Explain *args and **kwargs in Python.
- Most asked Explain list/dict/set comprehensions in Python.
- Most asked Explain dataclasses in Python.
- Most asked Explain dunder methods in Python.
- Most asked Explain deepcopy vs copy in Python.
- Most asked Explain structural pattern matching (`match`/`case`).
- Most asked What do EAFP and LBYL mean, and which is more Pythonic?
- Most asked Walk through the request/response lifecycle in Django, and explain why middleware order matters.
- Most asked Explain MRO / C3 in Python.
- Explain __name__ == '__main__' in Python.
- When do you use the `asyncio` module/package?
- When do you use the `logging` module/package?
- When do you use the `unittest / pytest` module/package?
- When do you use the `venv` module/package?
- Python packaging: virtualenv why?
- Backend Python interview: explain REST API design.
- Backend Python interview: explain migrations.
- How does asyncio work internally: event loop, coroutines, tasks and futures?
- Which pytest features do you use most?
- Explain typing / type hints in Python.
- Explain exceptions hierarchy in Python.
- When do you use the `pathlib` module/package?
- When do you use the `collections` module/package?
- When do you use the `itertools` module/package?
- When do you use the `functools` module/package?
- When do you use the `json` module/package?
- When do you use the `concurrent.futures` module/package?
- When do you use the `secrets` module/package?
- Python packaging: requirements.txt vs pyproject.toml?
- Python packaging: dependency pinning?
- Backend Python interview: explain FastAPI / Starlette.
- Backend Python interview: explain Django ORM vs SQLAlchemy.
- Backend Python interview: explain connection pooling.
- Backend Python interview: explain caching strategies.
- Backend Python interview: explain JWT pitfalls.
- Backend Python interview: explain idempotent APIs.
- Backend Python interview: explain background jobs.
- Backend Python interview: explain observability.
- Backend Python interview: explain 12-factor config.
- What is free-threaded Python (PEP 703) and how does it change the GIL story?
- How do cancellation and timeouts work in asyncio?
- What are exception groups and `except*` (Python 3.11)?
- What does the Python 3.12 generic syntax (PEP 695) look like, and how do `TypeVar`, `ParamSpec` and `Self` fit in?
- When do you use `TypedDict`, `Literal`, `Protocol` and `@overload`?
- Compare dataclasses, attrs and Pydantic models.
- Explain the iterator protocol and the difference between iterables and iterators.
- What are metaclasses, and when is `__init_subclass__` a simpler alternative?
- What's the difference between `__new__` and `__init__`?
- How does CPython manage memory?
- How do you profile and optimize Python code?
- What does a modern Python toolchain look like?
- What's the difference between `str` and `bytes`, and how do you handle encodings?
- Why is `pickle` dangerous, and what should you use instead?
- What is the walrus operator (`:=`) and when is it useful?
- What is the difference between WSGI and ASGI, and how does it affect how a Python web app handles concurrent requests?
- Explain slots in Python.
- Explain ABC / Protocol in Python.
- Explain property / descriptor in Python.
- When do you use the `argparse` module/package?
- When do you use the `dataclasses.asdict` module/package?
- When do you use the `enum` module/package?
- When do you use the `hashlib` module/package?
- Python packaging: semantic versioning?
- Python packaging: wheels vs sdist?
- Python packaging: editable installs?
- Python packaging: entry points / scripts?
- Backend Python interview: explain rate limiting.
- How do you mock correctly in Python tests?
- How do you handle dates and time zones correctly in Python?
- Why can floating-point math surprise you, and when should you use `Decimal` or `Fraction`?
- How do `functools.cache`, `lru_cache` and `cached_property` work, and what are the pitfalls?
- How do you run external commands safely with `subprocess`?
- What notable improvements came in Python 3.11 through 3.14?
- What are template strings (t-strings) in Python 3.14?
- How did annotation evaluation change in Python 3.14?
- How do sorting, `heapq` and `bisect` help with common algorithmic tasks?
- What are weak references in Python and when do you use them?
- Which `contextlib` utilities are worth knowing?
- How do classic design patterns look in idiomatic Python?
- What are the pitfalls of `multiprocessing`?
- How do descriptors power properties, methods and ORMs?
- How do you implement structured logging in Python services?
- What are common security pitfalls in Python applications?
- What do `send()`, `throw()`, `close()` and `yield from` do with generators?
- Compare f-strings, `str.format` and `%` formatting.
- Which built-ins make Python loops cleaner?
- What goes into a modern `pyproject.toml`?
- How do Django, Flask and FastAPI compare for a new backend project?
- What are subinterpreters in Python 3.14?
- Python packaging: namespace packages?
- What is the difference between a list and a tuple in Python?
- How does Python's garbage collection work?
System Design Problems Recommended 31
- Most asked Design a URL shortener (like bit.ly).
- Most asked Design a distributed rate limiter.
- Most asked Design a chat application (like WhatsApp or Slack).
- Most asked Design a social media news feed (like Twitter/X or Instagram).
- Most asked Design a notification system (email, SMS, push).
- Most asked Design a payment system.
- Most asked Design a ticket booking system (like Ticketmaster).
- Most asked Design a distributed unique ID generator.
- Most asked Design a rate limiter for a public API.
- Most asked Design a webhook delivery system.
- Most asked Design an authentication service with SSO for multiple apps.
- Design a file storage and sharing service (like Dropbox or Google Drive).
- Design search autocomplete (typeahead).
- Design a distributed job scheduler / task queue.
- Design a video streaming platform (like YouTube).
- Design a web crawler.
- Design a real-time leaderboard for a game.
- Design a ride-sharing service (like Uber).
- Design the checkout and inventory system for an e-commerce site.
- Design a distributed cache (like Memcached/Redis Cluster).
- Design a collaborative document editor (like Google Docs).
- Design a metrics monitoring and alerting system (like Prometheus/Datadog).
- Design a centralized logging pipeline.
- Design an API gateway.
- Design a distributed key-value store (like DynamoDB/Cassandra).
- Design Pastebin.
- Design a 'find nearby places' service (like Yelp).
- Design a feature flag service.
- Design a stock exchange order matching engine.
- Design a full-text search service for a product catalog.
- Design a system to count likes/views at large scale.
Docker Recommended 39
- Most asked What is a container, and how does it differ from a virtual machine?
- Most asked What is the difference between an image and a container, and how do image layers work?
- Most asked How does Docker build caching work, and how do you order a Dockerfile to use it well?
- Most asked What are multi-stage builds, and why use them?
- Most asked CMD or ENTRYPOINT: what is the difference, and what are exec and shell forms?
- Most asked What are Dockerfile best practices for production images?
- Most asked ARG or ENV: what is the difference, and how do you pass secrets into a build safely?
- Most asked How do you secure Docker containers and images?
- Most asked Write a production Dockerfile for a Python web app: small, non-root and cache-friendly.
- Most asked Why does PID 1 matter in containers, and what problems can it cause?
- Most asked How do you make Docker images smaller?
- Most asked Volumes, bind mounts and tmpfs: when do you use each?
- Most asked How does Docker networking work? Explain bridge, host and user-defined networks.
- Most asked What is Docker Compose used for, and how do you handle service start-up order?
- Most asked How do you limit a container's CPU and memory, and what happens when it exceeds them?
- Most asked How should you tag Docker images, and why is 'latest' a problem?
- Most asked How do you debug a container that exits immediately or behaves differently in production?
- Most asked How do you run Docker builds in CI pipelines efficiently and safely?
- Most asked What is a software supply chain attack on containers, and how do you defend against it?
- Why is mounting the Docker socket into a container dangerous?
- What is BuildKit, and what does docker buildx add?
- COPY or ADD: what is the difference?
- What does HEALTHCHECK do in a Dockerfile, and do orchestrators use it?
- How do container logs work in Docker, and how do you stop them filling the disk?
- What is the OCI, and how do Docker, containerd, runc and Podman relate?
- What should you consider when choosing a base image?
- How do you handle configuration for containers across environments?
- What is the Docker build context, and why does it matter?
- Why might a container work on your laptop but fail on a server or in CI?
- How do you run a database in Docker for local development, and should you do it in production?
- How do you speed up a slow Docker build?
- Explain what happens when you run docker run nginx.
- What is Docker Swarm, and why do most teams use Kubernetes or managed services instead?
- What are rootless Docker and user namespaces?
- How do you clean up disk space used by Docker?
- How do you run multiple processes in one container, and should you?
- What changed with Docker Desktop licensing, and what are the alternatives?
- How do you handle time zones, locales and certificates in minimal images?
- Docker Compose in production: is it appropriate?
Testing Recommended 43
- Most asked What is the test pyramid, and is it still relevant?
- Most asked What makes a good unit test?
- Most asked What's the difference between mocks, stubs, fakes and spies?
- Most asked How do you write reliable integration tests that use a database?
- Most asked What causes flaky tests and how do you fix them?
- Most asked How would you design a test strategy for a new web application?
- Most asked Your end-to-end test suite is flaky and takes an hour. How do you fix it?
- Most asked Write a Playwright test that logs in and checks the dashboard, and explain how you keep it stable.
- Most asked Is 100% code coverage a good goal?
- What should end-to-end tests cover, and how do you keep them stable?
- What is test-driven development (TDD) and when is it useful?
- What is contract testing?
- How do you test code that depends on the current time or randomness?
- How do you test code that calls external HTTP services?
- How should you test frontend components?
- What is contract testing, and when would you use it?
- How do you test an API, and what would you automate?
- What is the test pyramid, and when does it not fit?
- How do you approach performance and load testing?
- A critical bug reached production even though all tests passed. What do you do?
- How do you manage test data for automated tests?
- What should block a release, and how do you report quality to stakeholders?
- What is mutation testing, and what does it tell you that code coverage doesn't?
- How do you test a feature behind a feature flag?
- How do you integrate automated tests into a CI/CD pipeline?
- What is exploratory testing, and how do you do it well?
- Tell me about a time you improved a team's test automation.
- How should you manage test data?
- How do you test asynchronous code?
- What is property-based testing?
- What are snapshot tests, and what are their risks?
- How do you prevent regressions when fixing bugs?
- Where do performance tests fit in a test strategy?
- How do you include security testing in development?
- What are ephemeral (preview) environments and why use them?
- What is chaos engineering?
- How do you keep a large test suite fast?
- How do you add tests to legacy code that wasn't designed for testing?
- What should API tests verify?
- How do you test code behind feature flags?
- What are smoke tests?
- What is mutation testing?
- How do you test accessibility?
Caching Recommended 46
- Most asked Explain the main caching patterns: cache-aside, read-through, write-through and write-behind.
- Most asked Why is cache invalidation hard, and what strategies help?
- Most asked What is a cache stampede (thundering herd) and how do you prevent it?
- Most asked How does HTTP caching work (Cache-Control, ETag, CDNs)?
- Most asked Explain the difference between cache penetration, cache breakdown and cache avalanche.
- Most asked In cache-aside, why can a value be stale even though you delete the key on every write?
- Most asked How can a CDN leak one user's data to another, and how do you prevent it?
- Most asked How do you design good cache keys?
- Most asked What are the risks of caching personalized or authorized data?
- Most asked In a system design interview, how do you decide what and where to cache?
- Most asked Should you invalidate the cache before or after the database commit?
- Most asked How does stale-while-revalidate work, and when is it inappropriate?
- Redis vs Memcached: when would you choose each?
- What are cache eviction policies (LRU, LFU, TTL) and how do you choose?
- What are the different layers where you can cache in a web system?
- When should you use an in-process (local) cache vs a distributed cache?
- How do you handle hot keys in a distributed cache?
- How do you keep cache and database consistent on writes?
- How does Redis scale and stay available?
- When would you use materialized views or denormalization instead of a cache?
- What happens if the cache goes down, and how do you design for it?
- Your Redis cluster has one shard at 100% CPU while others idle. What's likely and how do you fix it?
- How do you keep in-process L1 caches on many pods consistent?
- What are the risks of write-behind caching?
- What must a cache key include for an API response in a multi-tenant app?
- Why can a Redis failover bring back deleted (stale) cache entries?
- How do you invalidate caches when many services and scripts write to the same tables?
- After adding a Redis cache, users sometimes see stale or wrong data. How do you investigate and fix it?
- What is negative caching and why is it useful?
- How do you choose a TTL?
- What is cache warming and when is it needed?
- What should you consider when serializing objects into a cache?
- Which metrics show whether a cache is working well?
- How do you invalidate content on a CDN?
- How would you cache high-frequency counters (views, likes) efficiently?
- Why are database query caches often disabled or removed?
- What's the difference between memoization and caching?
- How do you implement a distributed lock with Redis, and what are the caveats?
- How do you cache GraphQL or highly dynamic API responses?
- How do frontend applications cache server data?
- How does a Bloom filter help in caching systems?
- Is it OK to store sessions in Redis?
- How do you invalidate thousands of related cache keys (e.g. all pages of a category) efficiently?
- Why add jitter to cache TTLs?
- Which Redis maxmemory-policy should a pure cache use, and what if sessions share the instance?
- What metrics tell you a cache is healthy?
Web Security & WAF Recommended 32
- Most asked What is the OWASP Top 10 and which risks does it currently highlight?
- Most asked What is Cross-Site Scripting (XSS) and how do you prevent it?
- Most asked What is SQL injection and how do you prevent it?
- Most asked What is CSRF and how do you defend against it?
- Most asked What is a Web Application Firewall (WAF), and what can and can't it do?
- Most asked How do rate-limiting algorithms work (fixed window, sliding window, token bucket)?
- Most asked What is SSRF (Server-Side Request Forgery) and how do you prevent it?
- How do you protect a web application from DDoS and abusive traffic?
- What is Content-Security-Policy and how do you roll it out?
- Which HTTP security headers should every web app send?
- What is CORS, and what are common CORS misconfigurations?
- How do you manage vulnerable and outdated dependencies?
- What are common security misconfigurations in web deployments?
- How do you handle file uploads securely?
- How should applications manage secrets?
- What are insecure deserialization vulnerabilities?
- What is clickjacking and how do you prevent it?
- What are best practices for TLS/HTTPS?
- How do you protect sign-up, login and checkout flows from bots?
- What is threat modeling and how do you run one?
- What is an open redirect vulnerability?
- What is command injection and how do you prevent it?
- What is path traversal and how do you prevent it?
- Why are security logging and monitoring failures in the OWASP Top 10?
- What are software and data integrity failures?
- What are common cryptographic failures?
- What new security risks do LLM-powered features introduce?
- What does the OWASP API Security Top 10 add beyond the web Top 10?
- How do cookie prefixes like __Host- and __Secure- improve security?
- How do you build security into the development lifecycle?
- What is XXE (XML External Entity) injection?
- What is subdomain takeover?
Behavioral & STAR Recommended 41
- Most asked Tell me about a time you worked with a difficult teammate.
- Most asked Describe a disagreement you had with a coworker and how you resolved it.
- Most asked Tell me about a time you disagreed with your manager's decision.
- Most asked Tell me about a time you failed at something important.
- Most asked Describe a mistake that had a significant impact and how you handled it.
- Most asked Tell me about a time you had to work with unclear or changing requirements.
- Most asked Tell me about a time you missed a deadline.
- Most asked Tell me about a time you received critical feedback and how you responded.
- Most asked Describe a project you owned from start to finish.
- Most asked Tell me about a time you had to juggle multiple competing deadlines.
- Tell me about a time you led a project without formal authority.
- Tell me about a time you took responsibility for a team failure.
- Describe a time you had to collaborate with someone whose working style was very different from yours.
- Tell me about a successful project you completed as part of a team.
- Tell me about a time you helped a struggling teammate.
- Describe a time you had to push back on a stakeholder's request.
- Describe a time you had to deliver unwelcome feedback to a peer.
- Describe a time you had to motivate a team through a difficult period.
- Tell me about a decision you made that was unpopular with your team.
- Tell me about a time you had to make a decision with incomplete information as a leader.
- Tell me about a project that didn't go as planned.
- Tell me about a time you went above and beyond your job description.
- Describe a time you identified a problem no one had asked you to solve.
- Describe a situation where you had to make a decision without all the information you wanted.
- Tell me about a time priorities shifted midway through a project.
- Describe how you decide what to work on when everything feels urgent.
- Tell me about a time you helped a colleague grow their skills.
- Tell me about a time you received feedback that was hard to hear.
- Describe a time you had to rely on a team member you didn't fully trust yet.
- Tell me about a conflict between two people on your team and how you handled it.
- Describe a time you delegated an important task.
- Tell me about a time you had to say no to your manager.
- Describe how you handle working on something without a clear owner.
- Tell me about a time you had to say no to a request to protect a deadline.
- Describe a time you had to deprioritize something important.
- Describe your approach to onboarding a new team member.
- Tell me about a time you gave someone feedback that changed their behavior.
- Describe a time you learned something valuable from someone more junior than you.
- Describe how you typically respond to criticism.
- Tell me about a time you gave feedback that was poorly received.
- Describe a time feedback from a peer changed how you approached your work.