Full Stack Developer Interview Questions and Answers: 60 Questions from Easy to Hard
This guide is for full stack developers in India preparing for interviews at IT services firms, product companies, fintech and SaaS startups and global capability centres, whatever the stack: Java with Spring Boot, Python with Django, Node or .NET on the back end, and React or Angular on the front end. It has 60 questions with model answers in three levels: web basics and one feature end to end for freshers, then auth, schema design, caching, testing and CI for one to three years, then architecture, incidents, code review and trade-offs for senior roles. Every snippet and query was run. For a MERN-only role, see our MERN Stack guide; for depth on one layer, see our JavaScript, React, Node.js, SQL and HTML and CSS guides.
- 60 questions, 3 levels
- Updated
- CoreHRx Jobs
- 420 open Full Stack Development jobs
What full stack developer interviews cover
- Web basics: what happens between a click and a database row, HTTP methods and status codes, cookies, CORS and reading the browser's Network tab.
- One back-end framework in depth (Spring Boot, Django, ASP.NET Core or Express), REST API design, SQL and schema design, and how an ORM turns your code into queries.
- One front-end framework, usually React or Angular: components, state, forms, rendering choices and how the UI talks to the API.
- Auth and security: sessions versus tokens, sign-in with OAuth, access control, and the OWASP Top 10 risks that full stack code most often introduces.
- Many companies add a machine coding round, where you build a small feature from form to API to database in limited time, and a design or project discussion for experienced roles.
How freshers should prepare
- Build one complete project you can explain line by line, such as a leave tracker or a small shop: login, a form with validation, an API, a relational database, tests and a live deployment.
- Learn HTTP by watching it: keep the DevTools Network tab open while you use your own app and read each request, status code and header.
- Write SQL by hand for your project (joins, GROUP BY, an index) even if you use an ORM, and read the SQL the ORM generates.
- Practise explaining one feature end to end in two minutes, layer by layer, because some version of that question opens many interviews.
How experienced candidates should prepare
- Prepare two or three stories from real work as problem, options, decision and result, including one incident and one trade-off you agreed with product.
- Revise production topics: caching layers, connection pools, schema changes without downtime, observability, and debugging across front end, API and database.
- Be ready to draw the architecture of your current system and explain what you would change and why, including what you would not split into services.
- Expect code review and mentoring questions: how you give feedback, set standards and keep quality up without slowing the team.
Your project and the machine coding round
- Put a live link and the repository on your resume only if both work, because interviewers often open them during the call.
- In a machine coding round, agree the scope first, build the thinnest working path from UI to database, then add validation, error handling and tests as time allows.
- Commit in small steps with clear messages; some interviewers read your Git history to see how you work.
- Keep secrets out of the repository, and be ready to explain every library you added and why you chose it.
Common mistakes to avoid
- Trusting the front end: checking prices, roles or limits only in the browser, or treating a hidden button as access control.
- Naming tools instead of reasons. Saying you used Redis or microservices means little unless you can explain the problem it solved and what it cost.
- Answering a debugging question with a guessed fix. Say how you would measure first: logs, traces, the Network tab, EXPLAIN.
- Claiming equal depth in every layer. Be honest about your stronger side and show how quickly you pick up the other.
Full Stack Development interview questions: Easy questions (freshers)
20 questions1. Each employee's email must be unique, and leave cannot exceed the balance. Where do you enforce each rule: in the browser, the API or the database?
Use all three layers, each for a different job. The browser checks early for a quick message, such as you have 4 days left, but anyone can skip it. The API is where the rules are enforced: it reads the current balance, rejects a request for 6 days with a clear error, and checks that the caller may apply. The database is the last line for rules that must hold even with a bug or two requests at the same moment: a UNIQUE index on email, NOT NULL and foreign keys, and a conditional update inside a transaction so two requests cannot both use the last 4 days. Interviewers want to hear why one layer is not enough.
2. What is MVC? Explain it with one request in Spring MVC, Django or ASP.NET Core.
MVC splits an app into the model (data and business rules), the view (what the user sees) and the controller (which takes the request, calls the model and picks the response). In Spring MVC, a request for /employees/42 reaches the DispatcherServlet, which calls a @GetMapping method in a controller; that method asks a service for the employee and returns a template name or, in a REST API, JSON. Django calls it MTV: its URLconf routes the request (Django's FAQ calls the framework itself the controller), the view function picks the data, and the template renders it. Strong answers add that controllers should stay thin, with business logic in services that can be tested without HTTP.
3. A form submit fails and nothing shows on screen. What do you check in the browser's Network tab?
First, find the request: was it sent at all, to the right URL and with the right method? If nothing appears, the bug is in the front end, such as a JavaScript error in the Console or a button that never calls the handler. If it was sent, check the status code (400, 401, 403, 500 or a CORS failure), the request payload (the field names and types the API expects), the response body for the error message, and headers such as Content-Type and the cookie or Authorization header. Copy as cURL lets you replay it outside the browser. This order splits front-end faults from back-end faults within minutes.
4. After a user places an order, refreshing the confirmation page asks to resubmit the form. Why, and how do you fix it?
The confirmation page was the direct response to a POST, so a refresh repeats that POST, and the browser warns because it could place the order twice. The fix is the Post/Redirect/Get pattern: the server handles the POST, saves the order, then answers 303 See Other with a Location such as /orders/5521/confirmation. The browser follows it with a GET, so a refresh or a bookmark only reloads that page. RFC 9110 describes 303 for exactly this use after a POST. Single-page apps face the same risk through double clicks, so disable the button while the request runs and let the server reject a duplicate order.
5. The site moved to HTTPS, and now some API calls and fonts fail while images still load. What is happening?
This is mixed content: an HTTPS page asking for resources over plain HTTP. Browsers block the risky kinds, such as scripts, stylesheets, fetch and XHR calls, iframes and web fonts, because an attacker on the network could change them. Images, audio and video loaded through a simple src attribute are upgraded to HTTPS automatically, which is why those still appear. The fix is to make every URL HTTPS or relative: check API base URLs in config, CDN links, and image URLs saved in the database with http. The Console names each blocked URL. The upgrade-insecure-requests CSP directive helps during the move, but the real fix is correct URLs and an HTTPS server behind each one.
6. A partner company's server must call your API every night to send attendance data. How do you give it access, and how is that different from a user login?
A user login proves a person; here a machine calls with no one at a keyboard, so give the partner its own credential. The simplest is an API key: a long random value created by your server, shown once, stored only as a hash, and sent in a header such as Authorization or X-Api-Key, never in the URL, where logs would keep it. Tie the key to that partner and to only the endpoints it needs, limit its request rate, and support rotation, with old and new keys valid for a short overlap. Larger setups use the OAuth 2.0 client credentials grant for short-lived tokens. Log every call against the partner, not a shared admin account.
7. When should the front end send JSON to the API, and when multipart/form-data?
Send JSON with Content-Type: application/json for structured data such as a profile or an order; it supports nested objects and arrays and is easy to validate against a schema. Use multipart/form-data when the request carries files, such as a resume PDF or a profile photo, because it sends binary parts as they are, while base64 inside JSON makes a file about a third bigger. With fetch, pass a FormData object and do not set the Content-Type header yourself; the browser adds the boundary. On the server, check the file's size and real type, not only its name. For large files, many teams upload straight to object storage instead.
8. Client-side or server-side rendering: which suits a public product page, and which an internal admin dashboard?
With client-side rendering the server sends a mostly empty HTML page, and JavaScript fetches data and builds the screen. With server-side rendering the server sends ready HTML, and JavaScript then makes it interactive. A public product page should be server-rendered or pre-built: search engines and link previews get real content, and a shopper on a budget Android phone sees the price sooner. An admin dashboard behind a login gains nothing from SEO, so a client-rendered single-page app is simpler. Most frameworks now let you mix both per route. Interviewers want the choice tied to SEO, first-load speed, device power and server cost.
9. Your single-page app works when you click through it, but refreshing /orders/12 gives a 404. Why?
Clicking links in a single-page app changes the URL through the History API, and the router in the browser draws the page, so the server is never asked for /orders/12. On refresh, the browser requests that path from the server, which has no such file and returns 404. The fix is a fallback: serve index.html for any unknown path that is not an API or asset route. In Nginx that is try_files $uri /index.html inside the front-end location; Spring Boot or ASP.NET Core can forward unknown routes to index.html. Keep API routes outside the fallback, so a wrong API URL still returns a real 404.
10. An orders table with eight columns is unusable on a phone. How would you redesign it?
First, ask which few fields users need on the move: say order number, customer, amount and status. On narrow screens, a media query can turn each row into a card with those fields large and the rest behind a tap, or the table can sit inside a horizontally scrolling container with the first column kept visible using position: sticky. Use readable font sizes, large tap targets and short values such as Rs 1,250 instead of long text. Keep the markup a real table where you can, so screen readers announce rows and columns. Test at narrow widths such as 360 pixels, a common Android size, not just in a shrunk desktop window.
11. The API rejects a form with errors on two fields. How do you show them to the user?
Have the API return errors per field, such as {"field": "pincode", "message": "Enter a 6-digit PIN code"}, not one generic string. The front end maps each error to its input, shows the message right below it, sets aria-invalid="true" on the input and links the message with aria-describedby so screen readers read it out. Keep what the user typed, move focus to the first invalid field, and for long forms add a short summary at the top. Errors that belong to no field, such as an expired session, go in a banner. A common mistake is clearing the whole form after a 422, which makes the user start again.
12. What does TypeScript give a full stack team, and what does it not protect you from?
TypeScript checks types while you write and build, so renaming a field, passing a string where a number is expected or forgetting a null case shows up in the editor instead of in production. Shared types for API requests and responses, generated from an OpenAPI file, keep the front end in step with a Java, C# or Node back end. But types are erased when the code runs. A JSON response that breaks the contract, or a user who sends a negative quantity, passes straight through. So data entering the system still needs runtime validation, with a library such as Zod on the front end and Bean Validation or its equivalent on the server.
13. An e-commerce app needs orders and payments, a product catalogue whose attributes differ by category, and product search. Which kind of database fits each?
Orders and payments belong in a relational database such as MySQL or PostgreSQL: they need transactions, foreign keys and exact reports for finance and GST filings. The catalogue can stay relational too, with a JSON column for category-specific attributes like fabric for kurtas or RAM for phones, or move to a document database such as MongoDB if attributes vary a lot. Search with typo tolerance, filters and relevance ranking usually needs a search engine such as Elasticsearch or OpenSearch, fed from the main database. Start with one relational database and add others only when a real need appears, because every extra store must be synced, backed up and run.
14. What is an ORM such as Hibernate, the Django ORM or Entity Framework, and when would you write plain SQL instead?
An ORM maps tables to classes, so you load and save objects instead of writing every INSERT and SELECT by hand. It speeds up routine create, read, update and delete work, builds parameterised queries, and in frameworks like Django and EF Core also manages migrations. Write plain SQL, still parameterised, for reports with window functions, bulk updates of lakhs of rows, or a hot query the ORM writes badly. The classic trap is lazy loading: listing 50 orders and touching each order's customer can fire 51 queries. Interviewers want you to check the SQL the ORM generates, through logs or a debug toolbar, instead of trusting it blindly.
15. What is the difference between authentication and authorization? Explain it with a payslip feature.
Authentication answers who you are; authorization answers what you may do. When an employee logs in, the server checks the password hash or OTP, creates a session and returns a cookie marked HttpOnly, Secure and SameSite. On each later request the cookie identifies the user, so the user is authenticated. Authorization then runs on every action: the employee may download only their own payslip, while a payroll administrator may see every payslip in the company. That check must happen on the server for each request and each record, because a hidden button stops no one who calls the API directly with a changed payslip id.
16. What is inside a JWT, and can the browser read what it contains?
A JWT has three base64url parts joined by dots: a header naming the algorithm, a payload of claims such as sub (the user id), role and exp (expiry), and a signature. Anyone who holds the token can decode the payload without a key, as the first output shows, so never put a password, PAN or salary in it. The signature only proves the token was not changed: changing the role to admin breaks the check, so the second line prints false. The server must verify the signature with a fixed algorithm, reject alg none, and check exp, issuer and audience before trusting any claim. A JWT is signed, not encrypted.
const crypto = require('crypto');
const b64 = (obj) => Buffer.from(JSON.stringify(obj)).toString('base64url');
const sign = (data) => crypto.createHmac('sha256', 'server-secret').update(data).digest('base64url');
const head = b64({ alg: 'HS256', typ: 'JWT' });
const body = b64({ sub: '1042', role: 'employee' });
const token = head + '.' + body + '.' + sign(head + '.' + body);
// anyone can read the payload, no key needed
console.log(JSON.parse(Buffer.from(token.split('.')[1], 'base64url')));
// { sub: '1042', role: 'employee' }
const forged = b64({ sub: '1042', role: 'admin' });
console.log(sign(head + '.' + forged) === token.split('.')[2]); // false17. The checkout page sends the item price to the server along with the product id. What is wrong with that?
Anything the browser sends can be changed. A user can open DevTools or a proxy tool, change a Rs 2,499 price to Rs 1, and if the server trusts it, the order goes through at that price. The server should receive only the product id, quantity and coupon code, then read the current price from its own database, apply the discount rules and compute the total and GST itself. The same rule applies to hidden form fields, disabled buttons and limits checked only in JavaScript. Front-end validation exists for user experience. Every rule that protects money, stock or access must be enforced again on the server.
18. For a login feature, give one example each of a unit test, an integration test and an end-to-end test.
A unit test checks one piece alone, fast and without a database: for example, the function that locks an account after five wrong attempts returns locked on the fifth. An integration test runs the real API with a test database: POST /api/login with the right password returns 200 and sets a session cookie, while a wrong password returns 401 and sets none. An end-to-end test drives a real browser with Playwright or Cypress: type the email and password, click Login and see the dashboard. Keep many unit tests, fewer integration tests and a handful of end-to-end tests for the main journeys, because the higher layers are slower and break more easily.
19. You pick up a ticket to add an Export to CSV button on the orders page. Walk through your Git steps from branch to merge.
Pull the latest main, then create a branch named after the ticket, such as feature/ORD-214-csv-export. Commit in small, working steps with clear messages, for example add orders CSV export endpoint, then add export button to orders page, and push the branch early. Open a pull request that explains what changed and how to test it, with a screenshot of the button and a link to the ticket. CI runs the tests and lint; reviewers comment, and you answer with new commits instead of force-pushing over their review. Before merging, update from main and fix conflicts, merge the way the team agrees, then delete the branch.
20. What are dev, staging and production environments, and how do environment variables let one codebase run in all three?
Dev is your laptop or a shared dev server, staging is a copy of production used for final testing, and production serves real users. The same build should run in each, with only configuration changing: the database URL, payment gateway keys, log level and allowed CORS origins. That configuration comes from environment variables or a secrets manager, read when the app starts, such as SPRING_DATASOURCE_URL or DATABASE_URL. Secrets never go into Git: commit a .env.example file with placeholder values and keep real values on the server. Staging should use test payment keys and masked data, never a raw copy of production customers.
Full Stack Development interview questions: Medium questions (1-3 years)
20 questions21. An HR app must log users out after 15 minutes without activity, and after 8 hours in any case. How do you build that across the front end and the server?
The server must enforce both limits, because a browser timer can be changed. Store the last activity, updated on each real request, and the login time with each session; once either limit passes, reject the request with 401 and delete the session. OWASP's Session Management Cheat Sheet treats idle and absolute timeouts separately and suggests 4 to 8 hours for office apps. In the front end, warn a minute before the idle limit, with a Stay signed in button that calls the server. Share the last activity time across tabs through a BroadcastChannel, or ask the server for the time left, so an idle tab does not log out a user busy in another. Background polling is not activity.
22. A user's phone is stolen. How do you sign them out of every device at once when your access tokens are stateless JWTs?
A stateless token cannot be recalled, so the plan rests on what the server does keep. Give each login a session record per device, holding its refresh token as a hash, and show users the list as active devices. Sign out everywhere deletes all those records, so no device can get a new access token. Tokens already issued still work until they expire, so keep them short, say 10 to 15 minutes, and for sensitive calls, such as changing the bank account or phone number, also check a session id or token version claim against the database. A password change should bump that version too. Also end the session inside the app and alert the user by email.
23. How does Sign in with Google work, and what must your back end check before logging the user in?
There are two common paths. In the redirect flow, your app sends the user to Google with a client id, redirect URI, state, nonce and a PKCE challenge; Google returns a short-lived code, and your server exchanges it for tokens, including an ID token. With the Google Identity Services button, the browser gets an ID token and posts it to your back end in a credential field, which you guard by matching the g_csrf_token cookie with the same value in the body. Either way, verify the token's signature with Google's keys, check iss, aud (your client id) and exp, check email_verified before trusting the email, and link the account by the stable sub.
24. A regular employee calls an admin-only API directly and it works, though the admin menu is hidden from them. How do you fix authorization properly?
Hiding a menu is not access control; this is broken function level authorization, which the OWASP API Security Top 10 2023 lists as API5. Fix it on the server: deny by default and give every route an explicit rule, such as hasRole('ADMIN') in Spring Security, a permission class in Django REST Framework or an Authorize policy in ASP.NET Core. Keep roles and permissions in one place, not in scattered if checks. Add tests that call each admin route as a normal user and expect 403, and run them in CI. Then look for the same mistake elsewhere, such as export and bulk-update endpoints, and log denied attempts so you notice probing.
25. A user adds "role": "admin" to the JSON of a profile update and becomes an admin. What happened, and how do you prevent it?
This is mass assignment: the API bound the whole request body onto the user entity and saved it, so any field the client sent was written, including role or salary. The OWASP API Security Top 10 2023 groups it under API3, broken object property level authorization. The fix is an allow-list: accept a request DTO with only the fields a user may change, such as name, phone and city, and copy them to the entity explicitly. In Django REST Framework, list the serializer fields and mark the rest read-only; in Spring and ASP.NET Core, never take the JPA or EF entity as the request body. Apply the same care to responses, so they never leak password hashes.
26. Design the tables for orders. Why should each order line store the price instead of reading it from the products table?
Use orders (id, customer, status, created time), order_items (order id, product id, quantity, unit price) and products. Prices change, but an order must keep showing what the customer paid. In the sample, two kurtas at Rs 899 and a dupatta at Rs 299 were billed Rs 2,097; after the kurta price rose to Rs 999, joining to products shows Rs 2,297, which no longer matches the invoice or the payment. So copy the unit price, and also the tax rate and product name, into the order line when the order is placed. Store money as integer paise or DECIMAL, never FLOAT. The primary key (order_id, product_id) already serves lookups by order; index product_id for its foreign key.
CREATE TABLE order_items (
order_id INT NOT NULL, product_id INT NOT NULL,
qty INT NOT NULL, unit_price_paise INT NOT NULL,
PRIMARY KEY (order_id, product_id));
-- after the kurta price changes from 89900 to 99900 paise
SELECT o.id,
SUM(i.qty * i.unit_price_paise) / 100 AS billed_rs,
SUM(i.qty * p.price_paise) / 100 AS from_products_rs
FROM orders o
JOIN order_items i ON i.order_id = o.id
JOIN products p ON p.id = i.product_id
GROUP BY o.id;
-- 501 | 2097.0000 | 2297.000027. Design an endpoint that lets a customer download their invoice PDF. What do you need to get right?
Use GET /api/invoices/9912/pdf and check on every request that invoice 9912 belongs to the logged-in customer or their company; a guessable id without an owner check leaks GST numbers and addresses. Return Content-Type: application/pdf, Content-Disposition: attachment; filename="INV-9912.pdf", and Cache-Control: private, no-store so no shared cache keeps a copy. Stream the file instead of loading it whole into memory. If PDFs live in object storage such as S3, check permission and then redirect to a pre-signed URL valid for a few minutes, so the app server does not carry the bytes. Generate each PDF once in a background job and store it, rather than on every click.
28. What should an API error response look like so the front end can show the right message?
Use one shape for every error, with the right status code. RFC 9457, Problem Details for HTTP APIs, defines five members, type, title, status, detail and instance, sent as application/problem+json, and you can add your own fields such as a stable error code and a list of field errors. For example, 422 with code PINCODE_INVALID and field pincode lets the front end show the message in English or Hindi next to the right input. Put the request id from the server logs in instance or an extension field, so support can trace a complaint. Never return stack traces, SQL errors or internal hostnames, and never answer 200 with an error hidden in the body.
29. After a payment, the browser's checkout callback and the gateway's webhook can both say paid, or only one arrives. Which one marks the order as paid, and how do you reconcile?
Never mark an order paid from what the browser alone sends. The checkout callback gives a fast screen, but the tab may close, so verify its signature on the server and, as Razorpay's docs say, use the order id stored on your server, not the one Checkout returns. The source of truth is the webhook, after its own signature check, or a fetch of the payment from the gateway's API. Until one arrives, show a payment processing page that polls your order status instead of a failure. Both paths call one idempotent PENDING to PAID update, as the run shows. Refund a second payment on an already paid order, and reconcile still-pending orders with the gateway daily.
UPDATE orders SET status = 'PAID', payment_id = 'pay_A1'
WHERE id = 501 AND status = 'PENDING';
SELECT ROW_COUNT() AS changed; -- 1
-- the webhook arrives after the callback: same update again
UPDATE orders SET status = 'PAID', payment_id = 'pay_A1'
WHERE id = 501 AND status = 'PENDING';
SELECT ROW_COUNT() AS changed; -- 030. Your app must support English and Hindi, and show amounts and dates the Indian way. How do you build that?
Keep every label in translation files under keys, using Angular i18n, react-i18next, Django gettext or Spring MessageSource, and never join translated pieces into a sentence, because word order differs between languages. The server should return error codes, not English text, so the front end shows the right language. Format numbers and dates with the Intl API rather than by hand: en-IN groups 12,34,567.50 in lakh style, while en-US gives 1,234,567.5, as the snippet shows. Store each user's language choice, set the lang attribute on the page, load a font that covers Devanagari, and check that longer translations do not break buttons. Keep stored data language-neutral: amounts as numbers and dates in ISO format.
const amount = 1234567.5;
console.log(new Intl.NumberFormat('en-IN', { style: 'currency', currency: 'INR' }).format(amount));
// ₹12,34,567.50
console.log(new Intl.NumberFormat('en-US').format(amount)); // 1,234,567.5
const d = new Date(Date.UTC(2026, 10, 19, 6, 0));
console.log(new Intl.DateTimeFormat('hi-IN', { dateStyle: 'medium', timeZone: 'Asia/Kolkata' }).format(d));
// 19 नव॰ 202631. A page is slow. How do you tell quickly whether the server or the browser is the bottleneck?
Start with time to first byte. In the DevTools Network tab or a Lighthouse report, if the HTML or the main API call waits 2 seconds before its first byte, the problem is the back end or the network: slow queries, a missing cache, or a server far from users, such as US hosting for Indian traffic. web.dev treats a TTFB of 0.8 seconds or less as good. If the first byte is fast but the page still appears late, look at the browser: large images, render-blocking CSS and JavaScript, or a client-rendered page that waits for its bundle and then a chain of API calls. A Performance trace shows long tasks and that waterfall.
32. What Cache-Control headers would you set for index.html, the hashed JavaScript bundles and the API responses of a single-page app?
Hashed files such as main.3f9a1c.js never change at that URL, so give them Cache-Control: public, max-age=31536000, immutable; a new build gets new file names. index.html must stay fresh because it points to the current bundles, so send Cache-Control: no-cache with an ETag: the browser revalidates every time and usually gets a cheap 304 Not Modified. For API responses with personal data, such as a payslip or a cart, use private with no-cache, or no-store, so no shared cache keeps them. Public, rarely changing lists, such as a list of cities, can use a short max-age. The common mistake is caching index.html for a day, which keeps users on an old release.
33. A Diwali sale is expected to bring three times last year's peak traffic. How would you load test the app before it?
Set the target from data: if last year peaked at 1,200 requests per second, test for 3,600 plus headroom, at a p95 latency the business accepts, such as under 500 ms, with errors below 1%. Script realistic journeys in a tool such as k6, JMeter or Gatling: mostly browsing and search, fewer cart and checkout calls, with logged-in users and varied products so caches are not unrealistically warm. Run against a production-like environment, stub the payment gateway or use its sandbox, and ramp up in steps while watching database CPU, connection pool waits, slow queries and the cache hit rate. Fix the first bottleneck, run again, and finally check that the app fails gracefully beyond the limit.
34. Your end-to-end tests pass locally but fail randomly in CI. How do you make them reliable?
Find the pattern first: rerun the failing test 20 times and read its trace, screenshot and video. Common causes are fixed sleeps, tests that share data or depend on each other's order, animations, slower CI machines and real calls to payment or SMS services. Replace sleeps with waits on conditions: Playwright auto-waits before actions, and its web-first assertions such as toBeVisible retry until they pass. Give each test its own data, created through the API before it starts, and stub third-party services. Allow one retry only if retried passes are reported and fixed. Quarantine a flaky test with a named owner, because a suite people ignore protects nothing.
35. The main branch has failed in CI for two days, and people keep merging on top of it. What do you do?
Stop the line first. A red main hides new failures, so every later merge is effectively untested. Find the commit that broke it from the CI history, and revert it unless the author can fix it within the hour; a revert is cheap, and the change can come back with its fix. If the cause is a flaky test, quarantine it with an owner and a ticket instead of letting everyone ignore failures. Then stop it from recurring: protect main so a pull request merges only when its checks pass against the latest main, and alert the team channel whenever main goes red. Interviewers look for ownership without blame and for a process fix.
36. A small client wants their Spring Boot or Django app on one cloud VM. What do you set up besides copying the code?
Run the app as a service under a non-root user, with systemd or a container, so it restarts after a crash or a reboot. Put Nginx in front for HTTPS with an automatically renewed certificate, compression and static files. Open only ports 22, 80 and 443 in the firewall, allow SSH by key only, and never expose the database port to the internet. Schedule daily database backups to another location, such as object storage in a different region, and test a restore, because an untested backup is only a hope. Add log rotation so logs cannot fill the disk, an uptime check that alerts someone, and automatic security updates. Then write it all down for the next person.
37. A date of birth entered as 10 May 2000 shows as 9 May on the profile page. What went wrong?
The date was handled as a moment in time instead of a calendar date. The form built a JavaScript Date at midnight India time, which is 18:30 on the previous day in UTC, and the API kept only the UTC date, so 10 May became 9 May. The second part of the snippet shows another trap: a date-only string is parsed as UTC midnight, so a user in New York sees 9 May while a user in India sees 10 May. The fix is to send and store a date of birth as a plain date (2000-05-10 in a DATE column, LocalDate in Java, DateOnly in .NET) and keep real timestamps in UTC, converting to IST only for display.
// the form sends midnight India time, the API keeps only the UTC date
const dob = new Date('2000-05-10T00:00:00+05:30');
console.log(dob.toISOString()); // 2000-05-09T18:30:00.000Z
console.log(dob.toISOString().slice(0, 10)); // 2000-05-09
// a date-only string is parsed as UTC midnight
const d = new Date('2000-05-10');
console.log(d.toLocaleDateString('en-IN', { timeZone: 'America/New_York' })); // 9/5/2000
console.log(d.toLocaleDateString('en-IN', { timeZone: 'Asia/Kolkata' })); // 10/5/200038. Order IDs from a Java back end change their last digits in the browser. Why, and how do you fix it?
JavaScript numbers are 64-bit floating point, so integers are exact only up to Number.MAX_SAFE_INTEGER, 9,007,199,254,740,991. A Java long or a Snowflake-style ID above that loses its last digits when JSON.parse reads it, as the snippet shows, and the front end then asks for an order that does not exist. The number is changed during parsing, so no later code can recover it. The usual fix is to send such IDs as strings in JSON, which Jackson can do per field with a serializer annotation, and type them as strings in TypeScript. BigInt handles big integer maths, but plain JSON.parse never produces one, so strings are simpler for IDs.
const body = '{"orderId": 1859327412345678913, "amount": 1499}';
console.log(JSON.parse(body).orderId); // 1859327412345678800
console.log(Number.MAX_SAFE_INTEGER); // 9007199254740991
// fix: the API sends the id as a string
const fixed = JSON.parse('{"orderId": "1859327412345678913", "amount": 1499}');
console.log(fixed.orderId); // 185932741234567891339. For live order status on a food delivery tracking page, would you use polling, server-sent events or WebSockets?
Status changes come only from the server, a few times per order, so server-sent events fit well: one long HTTP response with Content-Type text/event-stream, and the browser's EventSource reconnects by itself. WebSockets suit frequent two-way traffic, such as chat or a live rider map where the client also sends data; they start with an HTTP Upgrade handshake answered by 101 Switching Protocols. Polling every 10 to 15 seconds is the simplest option and fine at small scale. Watch the limits: over HTTP/1.1 a browser allows about six SSE connections per domain across all tabs, and Nginx closes a proxied connection that sends nothing for 60 seconds unless you send heartbeats.
40. How do you check that your pages work across phones and browsers before a release?
Start from who uses the product: analytics shows the real device mix, which for many Indian consumer apps leans towards mid-range Android phones on Chrome, with some iPhones on Safari. Use DevTools device mode and network throttling while building, but test on at least one real low-cost Android phone and one iPhone, because touch, fonts, the on-screen keyboard and Safari quirks differ. Cloud device labs such as BrowserStack cover the rest. Automate the main flows in Playwright across Chromium, Firefox and WebKit, and run Lighthouse in CI for performance and accessibility. Also check landscape mode, a 360-pixel-wide screen and large system font sizes.
Full Stack Development interview questions: Hard questions (experienced)
20 questions41. Your web app and Android app call 15 microservices directly. When would you add a backend for frontend, and what does it cost?
A backend for frontend is a thin server per client type that shapes data for that client. It helps here because each screen makes many calls and stitches the results over a slow mobile network, every client must know 15 service addresses, and access tokens sit in the browser. A web BFF can turn six calls into one response shaped for the screen, hide internal services, and keep OAuth tokens on the server behind an HttpOnly session cookie. The costs: one more service to deploy and monitor, an extra network hop, and the risk of business logic creeping in, so keep it to aggregation, auth and formatting, owned by the client team.
42. HR wants to upload a CSV file of 50,000 employees. Design the feature end to end.
The browser uploads the file to object storage, and the API creates an import job row with status queued and returns its id at once, never processing 50,000 rows in the request. A background worker reads the file in batches of 1,000, so 50 batches, validates each row (PAN format, duplicate employee codes, valid department) and commits each batch in its own transaction, so invalid rows are logged and skipped, not failing the whole file. The worker updates progress on the job, which the page polls or receives through server-sent events, and writes rejected rows with reasons to an error CSV the user can fix and upload again. Upsert on employee code, so a retried batch creates no duplicates.
43. Your notification feature uses WebSockets on one server. How do you run it on four servers behind a load balancer?
Each user's socket lives on one server, but the event meant for them, such as leave approved, may happen on another. So publish events to a shared channel, such as Redis pub/sub, Kafka or a managed service, and let every server push them to its own connected users. Sticky sessions matter only if your library falls back to long polling. Authenticate during the handshake with the session cookie and check the Origin header, because the browser WebSocket API cannot set custom headers. Send heartbeats more often than the load balancer's idle timeout, 60 seconds by default on an AWS Application Load Balancer. On reconnect, the client fetches missed notifications through a normal API call.
44. HR wants to see who changed an employee's salary, when, and from what to what. How would you design the audit trail?
Write to an append-only audit table: entity type, entity id, field, old value, new value, actor id, time in UTC and the request id, inserted in the same transaction as the change so the two can never disagree. Doing it in the application layer captures who acted; database triggers also catch direct SQL fixes, but they do not know the logged-in user unless the app passes it in a session variable. At larger scale, change data capture tools such as Debezium stream changes from the database log. Restrict who can read salary history, allow no updates or deletes on it, and agree how long to keep it, since salaries are personal data.
45. The database is mostly idle, yet API requests wait 30 seconds for a connection and then fail. Why, and how do you fix it?
The pool is exhausted, not the database. Requests queue for a connection, and 30 seconds is HikariCP's default connectionTimeout, after which it throws an SQLException. Usual causes: a transaction that calls an SMS or payment API and holds its connection for seconds, an error path that never returns its connection, or slow queries sharing HikariCP's default pool of 10. Set leakDetectionThreshold to log where connections are held too long, and watch the pool's active, idle and waiting counts. Then move external calls outside transactions, release connections with try-with-resources or the framework's managed transactions, add query timeouts, and size the pool from measured hold time, keeping pods times pool size below the database's max_connections.
46. Product search with LIKE '%shirt%' on 20 lakh rows is slow. When would you move to a search engine, and how do you keep it in sync?
A leading wildcard cannot use a normal B-tree index, so every search scans the table. Try the full-text index built into MySQL or PostgreSQL first. Move to Elasticsearch or OpenSearch when you need typo tolerance, Hindi and English synonyms, relevance ranking, facets such as size and brand, or search traffic that would load the main database. Keep the database as the source of truth. Sync by writing change events into an outbox table in the same transaction as the product update, which a worker indexes, or by change data capture, plus a nightly full reindex to fix drift. Expect the index to lag by seconds, so show live price and stock from the database.
47. A dashboard fires 40 API calls on load and takes 6 seconds on a 4G phone. How do you make it fast?
First, read the waterfall in DevTools: are the calls chained, each waiting for the previous one, or parallel but slow? Chains, where the page loads the user, then the team, then each widget, cost one round trip per step, and on mobile networks round trips dominate. Fixes, in order: fetch independent data in parallel, add one endpoint that returns what the first screen needs, and load below-the-fold widgets only when they scroll into view. Over HTTP/1.1 a browser opens only about six connections per host, so serve the API over HTTP/2. Cache stable data, such as the user profile, for the session. Then measure again on a throttled profile, not office Wi-Fi.
48. Which OWASP Top 10 2025 risks do you check when reviewing a full stack pull request?
I check the ones a code change can introduce. A01 Broken Access Control, still first and now including SSRF: does every new endpoint check that this user may act on this record, and does any server-side fetch take a URL from user input? A05 Injection: parameterised queries only, and no raw HTML rendering of user text. A02 Security Misconfiguration: debug mode, open CORS, verbose errors. A03 Software Supply Chain Failures, which widens the old outdated-components item: new dependencies, pinned versions and an updated lockfile. A07 Authentication Failures: rate limits on login and OTP. A10 Mishandling of Exceptional Conditions, new in this edition: errors must fail closed, never skipping a permission check.
49. How would you roll out a Content Security Policy on an existing app that has many inline scripts?
Start in report-only mode. Send Content-Security-Policy-Report-Only with a strict target policy, such as scripts allowed only with a per-request nonce, plus a reporting endpoint, so browsers report violations without blocking anything. Sort a week or two of reports into your own inline code, third-party tags such as analytics and payment widgets, and browser-extension noise. Add the nonce to inline script tags, and rewrite onclick attributes as addEventListener calls, because a nonce does not cover event handlers. Add strict-dynamic so a nonced loader can pull in the analytics or payment scripts it needs. Then switch to the enforcing Content-Security-Policy header, keep reporting on, and test that the header stays. CSP limits XSS damage; it never replaces output escaping.
50. Two days before a release, the dependency scanner reports 3 critical and 25 moderate vulnerabilities. What blocks the release?
Severity alone does not decide it; reachability and exposure do. For each critical, I check whether the package ships to production or is only a build or test tool, whether our code reaches the vulnerable function, and whether the flaw is being exploited, using sources such as CISA's Known Exploited Vulnerabilities catalog. A critical in a production dependency we actually call, such as a parser on a public endpoint, blocks the release until patched or worked around. A critical inside a dev-only linter does not block, but gets a ticket with an owner and a date. The 25 moderates go into the next sprint. I record each decision, since OWASP now ranks supply chain failures third.
51. Your web app uses session cookies, and a mobile app is coming. How do you design authentication for both?
Keep one identity service and user table, and let each client use what suits it. The web app keeps HttpOnly session cookies with CSRF protection. The mobile app uses the authorization code flow with PKCE, or your own OTP flow, and receives a short-lived access token plus a rotating refresh token stored in the Android Keystore or iOS Keychain. The API accepts either a session or a bearer token, and both resolve to the same user, so one set of permission checks serves both. Run its OAuth login in the system browser or a Custom Tab, never an embedded WebView: RFC 8252 says native apps MUST NOT use embedded user-agents, since the app could copy credentials. Rate-limit OTP too.
52. After a deploy, some users get a blank page and the console shows that a JavaScript chunk failed to load. Why, and how do you fix it for good?
Users who had the app open still run the old index.html and bundle. When they open a lazy-loaded route, the old code asks for an old hashed chunk that the deploy deleted, so the request returns 404, or the SPA fallback returns index.html as if it were JavaScript. Fixes: keep the previous releases' assets for a few days instead of deleting them on deploy; serve index.html with Cache-Control: no-cache, as Vite's docs advise; exclude asset paths from the index.html fallback so a missing file is a real 404; and catch the load error, for example through Vite's vite:preloadError event, to reload the page once and pick up the new version.
53. One API call is slow only in production. How do you find which layer is slow?
Measure before guessing. Distributed tracing with OpenTelemetry shows one request as spans: the load balancer, the API handler, each database query and each outbound call, linked by the W3C traceparent header, so the slow span stands out. Without tracing, compare timings: browser DevTools shows the total, a Server-Timing header can expose the app's own measurements, and the database slow query log catches heavy queries. Production differs from staging in data size, so a query that is fine on 1,000 rows may scan 50 lakh without an index; run EXPLAIN on a replica. Also check waits for a pool connection, a slow third-party API such as an SMS gateway, and cold caches after a deploy.
54. Only one customer can reproduce a bug, and the data involved is personal. How do you debug it without copying their data?
Start from what you already have: their request ids, error logs and traces around the time they reported it. Logs should hold ids and error codes, never PAN numbers or addresses. If that is not enough, switch on extra debug logging for that one account through a feature flag for a few hours, with masking, then switch it off. Reproduce with synthetic data of the same shape: the same number of addresses, a name with special characters, an old app version. Do not copy their records to a laptop: India's DPDP Act 2023, being phased in under Rules notified in November 2025, limits personal data to its purpose and demands safeguards. If access is unavoidable, get approval and log it.
55. Your team has 85% code coverage, but bugs still reach production every sprint. What would you change?
Coverage shows which lines ran, not whether the tests would notice a wrong result. I would list the last 20 escaped bugs and ask, for each, which test should have caught it. They usually cluster: gaps between the front end and the API, missing edge cases such as empty lists or dates around midnight IST, configuration that differs in production, or tests that mock the database away. Then add tests where the bugs are, such as API tests against a real database in a container and contract checks on the API schema. Mutation testing with PIT for Java or Stryker for JavaScript exposes weak assertions. I would track escaped defects, not coverage, as the team's measure.
56. A feature needs a back-end change and a front-end change, and the two deploy separately. How do you release it without breaking users?
Make every step backward compatible, so the deploy order never hurts users. Ship the back end first, with the new field or endpoint added alongside the old behaviour; the current front end ignores what it does not know. Then deploy the front end that uses it, ideally behind a feature flag, so you can switch it on for staff, then 10% of users, then everyone, and switch it off without a rollback. Only after old front ends are gone, including long-open tabs and old mobile versions, remove the old field in a later release. Database changes follow the same expand-then-contract rhythm. The mistake is a big-bang release that needs both sides live in the same minute.
57. React or Angular for a large enterprise app with 25 developers: how would you decide?
I would decide on the team and the long-term cost, not on popularity. Angular is a full framework: routing, forms, an HTTP client, dependency injection and a test setup come built in, with one TypeScript-first way of doing things, which helps 25 developers write similar code and suits teams coming from Java or .NET. React is a UI library: you choose routing, data fetching and state tools, which is flexible but needs written team conventions. I would check the team's current skills, hiring in our city, each project's published release and support schedule, the component library the designers need, and build one small pilot screen in each before committing.
58. A junior developer's pull request works, but it builds SQL by joining strings and has no tests. How do you review it?
I separate must-fix items from nice-to-haves and explain why. The string-built query is a blocker: I show how a search term like ' OR '1'='1 changes its meaning, and point to a parameterised query or the ORM method we already use. Missing tests are also a blocker for business logic, so I suggest the two or three cases that matter rather than a coverage number. Style points are optional or left to the linter. I start with what is good in the change, keep comments about the code, not the person, and offer a short pairing call if the fix is new to them. Afterwards I ask whether a lint rule or checklist would have caught it.
59. Product wants a feature in one week that you estimate at three. What do you do?
I would neither just say no nor quietly work weekends. First I ask what the date protects, for example a Diwali sale campaign already announced to customers. Then I break my estimate into parts so the gap is visible: the checkout change, admin screens, reports, tests and rollout. Usually a smaller first version fits, such as a fixed discount with reports built later from logs, and the admin screen replaced by a config entry for now. I present two or three options with what each drops and its risk, let the product manager choose, and write down the agreed scope. If nothing fits, I raise it early, while the date can still move.
60. You must mentor a fresher who knows React well but has never written SQL or an API. How do you plan their first month?
I would grow their skills through real work in small steps, not a reading list. In week one, they set up the project and pair with me on a bug that crosses the stack, so they watch a request reach the database. In week two, they add one field end to end, such as an alternate phone number: the migration, API validation, the form and tests, with me reviewing each step. In weeks three and four, they own a small feature, with a short design chat first and reviews that explain the reasons. I set one SQL exercise a week on our real schema, check in for 15 minutes a day, and judge progress by what they ship.
Ready to apply?
There are 420 open jobs asking for Full Stack Development on CoreHRx right now. Create a free profile once and apply with it.