# Full-Stack Developer roadmap

> TypeScript from browser to database: React, Next.js, Node.js, PostgreSQL, auth, testing and deployment, ending in three shipped portfolio projects.

Canonical: https://www.internhack.in/roadmaps/tracks/full-stack
Last updated: 2026-11-28

14 sections, 65 topics, about 443 hours.

A practical full-stack roadmap built around one language across the stack. Start with how the web works, HTML, CSS, JavaScript and TypeScript, then build interfaces with React and the Next.js App Router. Move to the server with Node.js, REST API design and your choice of Express, Fastify or Next.js route handlers, and store data in PostgreSQL with Prisma or Drizzle. Add secure authentication with sessions, JWTs and OAuth, role-based authorization and web security basics. Learn to test at every level, containerise with Docker, deploy to Vercel or Render, automate checks with GitHub Actions and watch production with logs and error tracking. Finish with real-world features like uploads, realtime updates, background jobs and Razorpay payments, and ship three portfolio projects that get you through campus placements and startup interviews.

## Outcomes

- Explain how a request travels from the browser to the server and database and back
- Build accessible, responsive interfaces with semantic HTML, modern CSS and React
- Write strict TypeScript shared across frontend and backend, with runtime validation at every boundary
- Build Next.js App Router apps with server components, caching, server actions and good SEO
- Design and build REST APIs with Express, Fastify or Next.js route handlers
- Model relational data in PostgreSQL and access it efficiently with Prisma or Drizzle
- Implement secure sessions, JWTs, OAuth login and role-based authorization
- Defend apps against XSS, CSRF, injection and other OWASP Top 10 risks
- Test with Vitest, React Testing Library, API integration tests and Playwright
- Deploy with Docker, Vercel or Render, managed PostgreSQL and custom domains
- Automate CI with GitHub Actions and monitor production with logs, Sentry and uptime checks
- Ship three portfolio projects and prepare for placement and startup interviews

## Prerequisites

- Basic computer literacy
- Comfort installing software and using a code editor

## Web Foundations

How the web actually moves bytes between a browser and a server, plus the terminal and Git habits every full-stack developer uses daily.

### How the Internet and the Web Work

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/how-the-internet-works

Understand what happens between typing a URL and seeing a page: DNS, IP, TCP, TLS, servers and browsers.

A full-stack developer owns both ends of a request, so you need a clear mental model of the path in between. When you open your college placement portal, your browser asks **DNS** for the server's IP address, opens a **TCP** connection, negotiates **TLS** for HTTPS, sends an HTTP request and renders the HTML, CSS and JavaScript it gets back.

#### The pieces
- **IP addresses and ports**: every server has an address; port 443 is HTTPS, 80 is HTTP, 5432 is PostgreSQL.
- **DNS**: turns names like example.com into IP addresses. Records such as A, CNAME and TXT are what you edit when you attach a domain to Vercel or Render.
- **TCP and TLS**: reliable delivery plus encryption. The padlock in the browser means TLS succeeded.
- **Clients and servers**: the browser is a client; your Node.js app, database and CDN are servers.
- **CDNs**: copies of static files kept close to users, so a student in Chennai does not wait for a server in Virginia.

#### Why it matters for you
Most "my deploy is broken" bugs are actually DNS not propagated, a wrong port, mixed HTTP and HTTPS content, or a CORS rule. Knowing the path lets you debug calmly instead of guessing.

#### Pitfalls
- Thinking "the cloud" is magic. It is someone else's computers, reached by the same protocols.
- Ignoring latency. Every round trip costs time, especially on Indian mobile networks.

You are ready to move on when you can explain, step by step, what happens after you press Enter on a URL, and point to where a slow or failed load could break.

Key concepts: IP addresses and ports, DNS and record types, TCP and TLS basics, Client-server model, Browsers and rendering, CDNs and edge networks, Latency and bandwidth.

Mini project: Use your browser's Network tab and the dig or nslookup command to trace one visit to a site you use daily. Write a one-page diagram of DNS lookup, connection, request and response with real timings.

Self-check: A site works on your laptop's Wi-Fi but not on mobile data right after you changed its DNS records. What is the most likely reason?

Resources:
- [How does the Internet work?](https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/How_does_the_Internet_work) (MDN)
- [Cloudflare Learning Center](https://www.cloudflare.com/learning/) (Cloudflare)
- [Full Stack Developer Roadmap](https://roadmap.sh/full-stack) (roadmap.sh)

### HTTP, Requests and Responses

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/http-basics

Learn the protocol your frontend and backend speak: methods, status codes, headers, cookies, caching and CORS.

Every feature you build is, in the end, an HTTP request and a response. Reading them fluently is the most useful debugging skill in full-stack work.

#### Requests
A request has a **method**, a **URL**, **headers** and an optional **body**.
- **GET** reads, **POST** creates, **PUT/PATCH** updates, **DELETE** removes.
- GET should never change data. A "delete" link that uses GET will be triggered by link previewers and crawlers.

#### Responses
- **2xx** success (200 OK, 201 Created, 204 No Content).
- **3xx** redirects (301 permanent, 302/307 temporary).
- **4xx** client mistakes (400 bad input, 401 not logged in, 403 not allowed, 404 not found, 409 conflict, 429 rate limited).
- **5xx** server faults (500, 502 bad gateway, 503 unavailable).

#### Headers that matter daily
Content-Type, Authorization, Cookie and Set-Cookie, Cache-Control, and the CORS headers such as Access-Control-Allow-Origin. **CORS** is a browser rule: a page on one origin cannot read responses from another origin unless the server allows it. It is not a security feature of your API, and it does not apply to curl or Postman.

#### Pitfalls
- Returning 200 with an error message in the body. Clients and monitoring tools rely on status codes.
- "Fixing" CORS with a wildcard on an API that uses cookies. It will not work, and it is the wrong fix.

You are ready to move on when you can open DevTools on any app, pick a request, and explain its method, status, key headers and why it succeeded or failed.

Key concepts: HTTP methods and idempotency, Status code families, Headers and content types, Cookies, CORS, Caching headers, HTTP/2 and HTTP/3, curl and Postman.

Mini project: Use curl to call a public API (for example a GitHub user endpoint) with different methods and headers. Record five responses with different status codes and write one line on what each means.

Self-check: Your React app on localhost:5173 gets a CORS error calling your API on localhost:4000, but the same request works in Postman. Why, and where is the fix?

Resources:
- [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP) (MDN)
- [What is HTTP?](https://www.cloudflare.com/learning/ddos/glossary/hypertext-transfer-protocol-http/) (Cloudflare)
- [curl documentation](https://curl.se/docs/) (curl)

### Terminal and Command Line

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/terminal-basics

Get comfortable in a shell: navigating files, running scripts, reading logs and using SSH, because every tool in this track has a CLI.

Package managers, Git, Prisma, Docker and deploy tools are all driven from the terminal. You do not need to be a Linux admin, but you must not be scared of a prompt.

#### Daily commands
- Navigate and inspect: pwd, ls, cd, cat, less, head, tail.
- Create and move: mkdir, touch, cp, mv, rm (carefully).
- Search: grep for text, find for files.
- Processes: ps, kill, and Ctrl+C to stop a running dev server.
- Networking: curl for HTTP, ssh to log into a server.

#### Environment and paths
Programs read **environment variables** such as PATH, NODE_ENV and DATABASE_URL. Knowing how to set them in your shell and in a .env file explains half the "works on my machine" problems.

#### Windows users
Use **WSL** (Windows Subsystem for Linux) or Git Bash. Most tutorials and all servers assume a Unix-like shell, and WSL saves you from path and line-ending headaches.

#### Pitfalls
- Running rm -rf without checking the path first.
- Copy-pasting sudo commands from random blogs.
- Ignoring error output. Read the first error line; it usually tells you exactly what is wrong.

You are ready to move on when you can create a project folder, run a script, follow a log with tail -f, and stop a stuck process without reaching for the mouse.

Key concepts: Navigating the filesystem, Files and permissions, grep, find and pipes, Environment variables and PATH, Processes and ports, SSH and keys, WSL on Windows.

Mini project: Write a small shell script that creates a new project folder with src, tests and a README, initialises Git, and prints the Node.js and npm versions installed.

Self-check: Your dev server says port 3000 is already in use. Which commands would you use to find and stop the process holding it?

Resources:
- [The Missing Semester of Your CS Education](https://missing.csail.mit.edu/) (MIT)
- [The Linux command line for beginners](https://ubuntu.com/tutorials/command-line-for-beginners) (Ubuntu)
- [Install WSL](https://learn.microsoft.com/en-us/windows/wsl/install) (Microsoft)

### Git and GitHub

core · beginner · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/git-and-github

Track every change with Git, collaborate through branches and pull requests on GitHub, and keep a clean public history recruiters can read.

Git is the undo button, the collaboration tool and the portfolio for a developer. Recruiters at campus placements and startups often open your GitHub before your resume.

#### Core workflow
- git init or git clone to start.
- git status, git add, git commit to save snapshots with clear messages.
- git branch and git switch to work on features without breaking main.
- git push and git pull to sync with GitHub.
- git log and git diff to see what changed and why.

#### Collaboration on GitHub
- **Pull requests**: propose a branch for review, discuss, then merge.
- **Merge vs rebase**: both integrate changes; rebase rewrites history and should not be used on shared branches.
- **Merge conflicts**: happen when two people edit the same lines. Read both sides, keep the right code, test, commit.
- **.gitignore**: keep node_modules, build output and .env files out of the repo.

#### Good habits
Small commits with messages like "add login form validation" beat one giant "final changes" commit. A README with setup steps and screenshots turns a repo into a portfolio piece.

#### Pitfalls
- Committing secrets such as database URLs or API keys. Deleting the file later does not remove it from history; rotate the key.
- Working only on main and pushing broken code.

You are ready to move on when you can create a feature branch, open a pull request, resolve a merge conflict and explain what each command did.

Key concepts: Commits, staging and history, Branches and switching, Remotes, push and pull, Pull requests and code review, Merge conflicts, Rebase vs merge, .gitignore and secrets hygiene, Conventional commit messages.

Mini project: Create a repo for your future portfolio site, make at least ten meaningful commits across two feature branches, deliberately create and resolve a merge conflict, and write a README with setup steps.

Self-check: You accidentally committed a .env file with your database password and pushed it. What are the three things you must do, in order?

Resources:
- [Pro Git](https://git-scm.com/book/en/v2) (git-scm.com)
- [GitHub Docs: Get started](https://docs.github.com/en/get-started) (GitHub)
- [Git and GitHub Roadmap](https://roadmap.sh/git-github) (roadmap.sh)

## HTML, CSS and Accessible Layout

The structure and styling layer of every web app: semantic HTML, modern CSS, responsive layouts and accessibility from day one.

### Semantic HTML

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/html

Write HTML that describes meaning, not just looks, so browsers, search engines and screen readers understand your pages.

React and Next.js still output HTML. Good HTML makes your app faster, more accessible and easier to style; bad HTML causes bugs no framework can fix.

#### Structure
- Document basics: doctype, head (title, meta viewport, description), body.
- Landmarks: header, nav, main, section, article, aside, footer.
- Headings h1 to h6 in order, one h1 per page.
- Lists, tables (for tabular data only), images with meaningful alt text.

#### Forms are where full-stack starts
Forms send data to your backend. Learn label with for, input types (email, number, date, password), required, name attributes, and how a plain form submits a POST without any JavaScript. Next.js server actions build on exactly this behaviour.

#### Semantics in practice
Use a button for actions and an anchor for navigation. A div with an onClick is not keyboard accessible and is not announced as a button.

#### Pitfalls
- Div soup: everything wrapped in div and span with no meaning.
- Missing labels on inputs, which breaks screen readers and makes click targets tiny.
- Using headings to make text bigger instead of to structure content.

You are ready to move on when you can build a placement registration form and a profile page using only semantic HTML that works with the keyboard alone.

Key concepts: Document structure and meta tags, Landmarks and headings, Links, images and alt text, Forms, labels and input types, Buttons vs links, Tables for tabular data, Open Graph meta tags.

Mini project: Build a static college fest registration page with a semantic layout and a form (name, roll number, email, event choice) that posts to a test endpoint such as httpbin.org/post.

Self-check: Why is a clickable div worse than a button element, even if both look identical after styling?

Resources:
- [HTML: HyperText Markup Language](https://developer.mozilla.org/en-US/docs/Web/HTML) (MDN)
- [Learn HTML](https://web.dev/learn/html) (web.dev)
- [freeCodeCamp Responsive Web Design](https://www.freecodecamp.org/learn) (freeCodeCamp)

### CSS Fundamentals

core · beginner · about 8 h · https://www.internhack.in/roadmaps/tracks/full-stack/css

Control how pages look with selectors, the cascade, the box model, units and custom properties.

Even if you later use Tailwind, you are still writing CSS. Utility classes only make sense once you understand what they compile to.

#### The core model
- **Selectors and specificity**: why one rule beats another. Prefer classes; avoid IDs and !important for styling.
- **The cascade and inheritance**: color and font inherit; margin and border do not.
- **Box model**: content, padding, border, margin. Set box-sizing: border-box globally.
- **Units**: px for borders, rem for type and spacing, % and viewport units for layout.

#### Modern CSS you should use
- **Custom properties** (CSS variables) for colours and spacing, which also make dark mode easy.
- **Pseudo-classes** like hover, focus-visible and disabled for interactive states.
- **Transitions** for small, purposeful motion.

#### Debugging
Use DevTools to inspect an element, see which rules apply, which are crossed out and why, and edit values live. This one habit saves hours.

#### Pitfalls
- Fighting specificity with more and more specific selectors instead of simplifying.
- Removing focus outlines without a replacement, which hides where keyboard users are.
- Hard-coding colours everywhere instead of using variables.

You are ready to move on when you can style a card component from a design screenshot and explain, using DevTools, why each rule applies.

Key concepts: Selectors and specificity, Cascade and inheritance, Box model, Units: px, rem, %, vw, Custom properties, Pseudo-classes and states, Transitions, DevTools styles panel.

Mini project: Style your fest registration page with a colour theme defined in CSS variables, clear hover and focus states, and a light and dark mode toggle driven by a single class on the body.

Self-check: Two rules set the colour of the same button and the one you expected does not win. What three things decide which rule applies?

Resources:
- [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) (MDN)
- [Learn CSS](https://web.dev/learn/css) (web.dev)
- [CSS-Tricks](https://css-tricks.com/) (CSS-Tricks)

### Flexbox, Grid and Responsive Design

core · beginner · about 8 h · https://www.internhack.in/roadmaps/tracks/full-stack/responsive-layout

Build layouts that work from a budget Android phone to a wide monitor using Flexbox, Grid and media queries.

Most Indian users reach your app on a phone, often a small screen on a slow network. Mobile-first layout is not optional.

#### Flexbox for one dimension
Rows or columns of items: navbars, button groups, card footers. Learn justify-content, align-items, gap, flex-wrap and flex: 1.

#### Grid for two dimensions
Page shells, dashboards and card galleries. grid-template-columns with repeat(auto-fit, minmax(240px, 1fr)) gives you a responsive gallery with no media queries at all.

#### Responsive techniques
- Start with the mobile layout, then add **min-width media queries** for larger screens.
- Use **fluid sizing** with clamp() for type and spacing.
- Make images responsive with max-width: 100% and the srcset attribute.
- **Container queries** let a component adapt to its own width rather than the viewport.

#### Test for real
Use DevTools device mode, but also open the app on an actual phone over your local network. Throttle the network to "Slow 4G" to feel what your users feel.

#### Pitfalls
- Fixed pixel widths that cause horizontal scrolling on phones.
- Tap targets smaller than about 44px.
- Desktop-first CSS that piles up overrides for mobile.

You are ready to move on when you can rebuild a dashboard layout (sidebar, header, card grid) that collapses cleanly to a single column on a 360px wide screen.

Key concepts: Flexbox, CSS Grid, Mobile-first media queries, Fluid type with clamp(), Responsive images, Container queries, Device testing and throttling.

Mini project: Build a responsive job listings page: filter sidebar on desktop that becomes a collapsible panel on mobile, and a card grid of internships with stipend in rupees, location and deadline.

Self-check: When would you reach for Grid instead of Flexbox? Give one layout example for each.

Resources:
- [A Complete Guide to Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) (CSS-Tricks)
- [A Complete Guide to CSS Grid](https://css-tricks.com/snippets/css/complete-guide-grid/) (CSS-Tricks)
- [Learn Responsive Design](https://web.dev/learn/design) (web.dev)

### Web Accessibility Basics

recommended · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/accessibility

Make your apps usable with a keyboard, a screen reader and low vision, which also makes them better for everyone.

Accessibility (a11y) is part of building correctly, not a polish step. Government and large company portals in India increasingly have to meet accessibility guidelines, and interviewers notice when you mention it.

#### The essentials
- **Keyboard**: every interactive element reachable with Tab, usable with Enter or Space, with a visible focus style.
- **Semantics first**: native elements (button, a, label, input) come with accessibility for free.
- **Text alternatives**: alt text for meaningful images, empty alt for decorative ones.
- **Colour contrast**: body text should meet WCAG AA contrast ratios. Never use colour alone to show errors.
- **Forms**: labels tied to inputs, errors announced in text next to the field.

#### ARIA, carefully
ARIA attributes (aria-label, aria-expanded, role) fill gaps for custom widgets like modals and tabs. The first rule of ARIA is to not use it when a native element works. Wrong ARIA is worse than none.

#### Testing
Run Lighthouse or axe DevTools, then actually tab through your page and try a screen reader (NVDA on Windows, VoiceOver on Mac or iPhone, TalkBack on Android).

#### Pitfalls
- Modals that do not trap or return focus.
- Placeholder text used instead of labels.
- Auto-playing carousels with no pause control.

You are ready to move on when you can complete your own signup flow using only the keyboard and get no serious issues in an automated audit.

Key concepts: Keyboard navigation and focus, Semantic elements first, Alt text, Colour contrast, Accessible forms and errors, ARIA roles and states, Screen reader testing, WCAG levels.

Mini project: Audit your job listings page with Lighthouse and a screen reader. Fix every issue you find and write a short before and after note in the README.

Self-check: Your form shows invalid fields with only a red border. Why is that a problem, and what should you add?

Resources:
- [Accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility) (MDN)
- [Learn Accessibility](https://web.dev/learn/accessibility) (web.dev)
- [WCAG Overview](https://www.w3.org/WAI/standards-guidelines/wcag/) (W3C WAI)

## JavaScript for the Whole Stack

The one language that runs in the browser and on the server: core syntax, the DOM, asynchronous code and the npm tooling around it.

### JavaScript Fundamentals

core · beginner · about 16 h · https://www.internhack.in/roadmaps/tracks/full-stack/javascript-basics

Learn variables, types, functions, objects, arrays, scope and closures well enough that React and Node.js feel natural.

JavaScript is the foundation of everything else in this track. Weak JavaScript shows up later as confusing React bugs, so invest here.

#### Language core
- **let and const** (avoid var), primitive types, and the difference between == and === (always use ===).
- **Functions**: declarations, arrow functions, default and rest parameters.
- **Objects and arrays**: destructuring, spread, optional chaining (?.) and nullish coalescing (??).
- **Array methods**: map, filter, reduce, find, some, every, sort. You will use map and filter in nearly every React component.

#### Scope and closures
Variables live in block, function or module scope. A **closure** is a function that remembers variables from where it was created. React hooks, event handlers and middleware all depend on closures.

#### Reference vs value
Objects and arrays are passed by reference. Mutating an array in place is the root of many "my React state did not update" bugs. Prefer creating new arrays and objects with spread or map.

#### Modules
ES modules (import and export) split code into files. Both the browser and modern Node.js support them.

#### Pitfalls
- Mutating shared objects by accident.
- Confusing this inside regular functions vs arrow functions.
- Learning a framework before you can write a plain function that groups and sums data.

You are ready to move on when you can take an array of placement offers and, without looking anything up, compute the average CTC per branch using map, filter and reduce.

Key concepts: Variables and types, Functions and arrow functions, Objects, arrays and destructuring, Array methods: map, filter, reduce, Scope and closures, Reference vs value, ES modules, Classes and prototypes, Error handling with try/catch.

Mini project: Write a Node.js script that reads a JSON file of placement offers (company, branch, CTC in lakhs) and prints per-branch averages, the top five offers and the number of companies, using only array methods.

Self-check: Explain what a closure is and give an example from event handlers or a counter function.

Resources:
- [The Modern JavaScript Tutorial](https://javascript.info/) (javascript.info)
- [JavaScript Guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide) (MDN)
- [freeCodeCamp JavaScript Algorithms and Data Structures](https://www.freecodecamp.org/learn) (freeCodeCamp)

### The DOM and Browser APIs

recommended · beginner · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/dom-and-browser-apis

Understand what React does for you by manipulating the DOM directly, handling events and using storage and URL APIs.

React hides the DOM, but it does not remove it. Knowing what happens underneath helps you debug rendering, events and performance.

#### The DOM
The browser turns HTML into a tree of nodes. JavaScript can query nodes (querySelector), change text and attributes, add and remove elements, and toggle classes.

#### Events
- addEventListener for click, input, submit and keydown.
- **Event bubbling** and **delegation**: one listener on a list instead of one per item.
- preventDefault on form submit so you can send data with fetch instead of reloading.

#### Useful browser APIs
- **localStorage and sessionStorage**: small key-value storage. Never store auth tokens or secrets here.
- **URL and URLSearchParams**: read and build query strings for filters and pagination.
- **History API**: how client-side routers change the URL without reloading.
- **IntersectionObserver**: lazy loading and infinite scroll.

#### Pitfalls
- Building large UIs with manual DOM updates. It quickly becomes unmanageable, which is exactly why React exists.
- Attaching listeners inside loops and never removing them.

You are ready to move on when you can build a small todo list in plain JavaScript that adds, completes and deletes items and persists them in localStorage.

Key concepts: Selecting and updating elements, Events and listeners, Bubbling and delegation, Form submit and preventDefault, localStorage and sessionStorage, URL and URLSearchParams, IntersectionObserver.

Mini project: Build a vanilla JavaScript expense splitter for a hostel trip: add expenses in rupees, assign who paid, show who owes whom, and save state in localStorage.

Self-check: You have a list of 500 items each needing a click handler. Why is event delegation a better choice than 500 listeners?

Resources:
- [Document Object Model (DOM)](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) (MDN)
- [Browser: Document, Events, Interfaces](https://javascript.info/ui) (javascript.info)
- [Web APIs](https://developer.mozilla.org/en-US/docs/Web/API) (MDN)

### Asynchronous JavaScript and fetch

core · beginner · about 8 h · https://www.internhack.in/roadmaps/tracks/full-stack/async-javascript

Master promises, async/await and the event loop, and call APIs with fetch while handling loading and errors properly.

Almost everything a full-stack app does is asynchronous: fetching data, querying the database, sending emails, verifying a payment.

#### The event loop
JavaScript runs on a single thread. Slow work (network, disk, timers) is handed off, and its callback is queued for later. This is why Node.js can handle many requests at once without threads, and why a long synchronous loop freezes the whole page or server.

#### Promises and async/await
- A **promise** represents a value that will arrive later, or an error.
- **async/await** lets you write asynchronous code that reads top to bottom.
- Use **try/catch** around awaited calls, and always handle rejections.
- Run independent work in parallel with **Promise.all**, and use Promise.allSettled when partial failure is acceptable.

#### fetch
fetch(url, options) returns a promise of a Response. Remember that fetch only rejects on network failure; a 404 or 500 still resolves, so check response.ok. Send JSON with a Content-Type header and JSON.stringify.

#### Pitfalls
- Awaiting inside a loop when the calls could run in parallel.
- Forgetting to show loading and error states in the UI.
- Unhandled promise rejections that crash a Node.js process.

You are ready to move on when you can fetch data from two APIs in parallel, handle a failed response gracefully, and explain why the order of console logs in an async example is what it is.

Key concepts: Event loop and call stack, Promises, async/await, Error handling in async code, Promise.all and allSettled, fetch API and response.ok, AbortController and timeouts.

Mini project: Build a page that fetches GitHub profiles for a list of usernames in parallel, shows a loading state, displays partial results if some fail, and lets the user cancel with AbortController.

Self-check: Your fetch call to an endpoint returning 500 does not reach the catch block. Why, and how do you fix it?

Resources:
- [Promises, async/await](https://javascript.info/async) (javascript.info)
- [Using the Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) (MDN)
- [The Node.js event loop](https://nodejs.org/en/learn/asynchronous-work/event-loop-timers-and-nexttick) (Node.js)

### npm, Packages and Build Tooling

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/npm-and-tooling

Manage dependencies with npm or pnpm, understand package.json and lockfiles, and use Vite, ESLint and Prettier.

Modern JavaScript is assembled from packages. Understanding the tooling turns mysterious install and build errors into routine fixes.

#### package.json
- **dependencies** ship with your app; **devDependencies** are for building and testing.
- **scripts** like dev, build, test and lint are the commands your team and CI run.
- **Semantic versioning**: ^1.4.2 allows minor and patch upgrades. Know what that means before you upgrade.

#### Lockfiles
package-lock.json or pnpm-lock.yaml pin exact versions so everyone installs the same tree. Commit it. Use npm ci in CI for clean, reproducible installs.

#### Package managers
npm comes with Node.js. **pnpm** is faster and stricter about undeclared dependencies and is popular in monorepos. Pick one per project and stick to it.

#### Build and quality tools
- **Vite**: fast dev server and bundler for React apps.
- **ESLint**: catches bugs and enforces conventions.
- **Prettier**: formats code so reviews focus on logic.

#### Pitfalls
- Installing a package for something a few lines of code can do. Every dependency is a security and maintenance cost.
- Deleting the lockfile to "fix" errors.
- Mixing npm and pnpm in one repo.

You are ready to move on when you can start a Vite project, add ESLint and Prettier, write custom scripts, and explain the difference between npm install and npm ci.

Key concepts: package.json and scripts, Dependencies vs devDependencies, Semantic versioning, Lockfiles and npm ci, pnpm, Vite, ESLint and Prettier, npm audit.

Mini project: Scaffold a Vite project, add ESLint and Prettier with a pre-commit check, write scripts for dev, build, lint and format, and document them in the README.

Self-check: Why should CI run npm ci instead of npm install, and why must the lockfile be committed?

Resources:
- [npm Docs](https://docs.npmjs.com/) (npm)
- [Vite Guide](https://vite.dev/guide/) (Vite)
- [ESLint: Getting Started](https://eslint.org/docs/latest/use/getting-started) (ESLint)

## TypeScript Across the Stack

One type system for frontend, backend and database: TypeScript fundamentals, practical patterns and runtime validation at the boundaries.

### TypeScript Fundamentals

core · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/full-stack/typescript

Add static types to JavaScript so the editor catches mistakes before your users do, in both React and Node.js.

TypeScript is the default for serious full-stack work. Sharing types between frontend and backend means a renamed field breaks the build, not production.

#### Basics
- Annotate function parameters and return types; let inference handle most variables.
- Primitive types, arrays, tuples, and literal types like "PENDING" | "PAID".
- **type** and **interface** to describe objects. Either works; be consistent.
- **Optional** properties (?) and **union** types (string | null).

#### Narrowing
TypeScript follows your checks. After if (user === null) return, it knows user is defined. Use typeof, in, and **discriminated unions** (a shared status field) to model states like loading, success and error.

#### Configuration
tsconfig.json controls strictness. Turn on **strict** from day one; adding it later is painful. Learn what target, module and paths do.

#### Using it in practice
Type your API responses, your React props and your database models. Libraries like Prisma and Zod generate types for you, so you rarely write them twice.

#### Pitfalls
- Sprinkling any to silence errors. Prefer unknown and narrow it.
- Using as type assertions to lie to the compiler.
- Thinking types exist at runtime. They are erased; incoming data still needs validation.

You are ready to move on when you can convert a small JavaScript project to strict TypeScript with no any and explain each error you fixed.

Key concepts: Type annotations and inference, Object types: type vs interface, Union and literal types, Narrowing and type guards, Discriminated unions, tsconfig and strict mode, any vs unknown, Typing third-party libraries.

Mini project: Convert your placement offers script to strict TypeScript. Model an Offer type with a status union (APPLIED, SHORTLISTED, OFFERED, REJECTED) and write typed functions to filter and summarise offers.

Self-check: If TypeScript types are erased at runtime, what still protects your API from a client sending a string where you expect a number?

Resources:
- [The TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/intro.html) (TypeScript)
- [TypeScript Roadmap](https://roadmap.sh/typescript) (roadmap.sh)
- [Total TypeScript free tutorials](https://www.totaltypescript.com/tutorials) (Total TypeScript)

### Practical TypeScript Patterns

recommended · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/typescript-patterns

Use generics, utility types and shared types to keep a full-stack codebase type-safe without fighting the compiler.

Once the basics feel normal, a handful of patterns cover most real-world code.

#### Generics
Write a function or type once and reuse it for many shapes. A typed fetch helper like apiGet<T>(url): Promise<T> or a paginated response type Page<T> are everyday examples.

#### Utility types
- **Partial** for update payloads, **Pick** and **Omit** to derive smaller shapes, **Record** for lookup tables.
- **ReturnType** and **Awaited** to reuse types from functions instead of rewriting them.
- **as const** to turn arrays of strings into literal unions.

#### Sharing types across the stack
Keep request and response types in one place (a shared folder or package in a monorepo) and import them in both frontend and backend. Better still, derive them from a single source such as your Prisma schema or Zod schemas.

#### Typing React
Type component props, event handlers (React.ChangeEvent<HTMLInputElement>), and state that can be null. Let inference handle useState when there is a clear initial value.

#### Pitfalls
- Over-engineering with deeply nested conditional types nobody else can read.
- Duplicating the same User type in five files that drift apart.
- Exporting database models directly to the client, leaking fields like passwordHash.

You are ready to move on when you can write a generic typed API client and a set of DTO types derived with Pick and Omit from one base type.

Key concepts: Generics, Partial, Pick, Omit, Record, ReturnType and Awaited, as const and literal unions, Shared types in a monorepo, Typing React props and events, Conditional and mapped types.

Mini project: Build a typed API client module with a generic request function, typed errors, and DTO types for a Student resource (create, update and public view) all derived from one base type.

Self-check: How would you type the body of a PATCH request that may update any subset of a Student's editable fields, but never its id?

Resources:
- [Utility Types](https://www.typescriptlang.org/docs/handbook/utility-types.html) (TypeScript)
- [Generics](https://www.typescriptlang.org/docs/handbook/2/generics.html) (TypeScript)
- [React TypeScript Cheatsheets](https://react-typescript-cheatsheet.netlify.app/) (React TypeScript Cheatsheets)

### Runtime Validation with Zod

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/runtime-validation

Validate untrusted data at every boundary (forms, API bodies, environment variables) and infer TypeScript types from the same schema.

TypeScript checks your code; it cannot check data coming from users, other services or environment files. **Schema validation** closes that gap.

#### Why Zod
**Zod** lets you define a schema once and get both a runtime validator and a TypeScript type from it. Alternatives like Valibot and Yup follow the same idea; the skill transfers.

#### Where to validate
- **API request bodies, params and query strings** before they reach your business logic.
- **Form input** on the client for fast feedback, and again on the server because client checks can be bypassed.
- **Environment variables** at startup, so a missing DATABASE_URL fails loudly at boot instead of at the first request.
- **Third-party API responses** you depend on.

#### Patterns
- Use safeParse to get either data or a structured error, and return a 400 with field-level messages.
- Share one schema between a React form and the API route.
- Transform and coerce carefully, for example turning "5" from a query string into the number 5.

#### Pitfalls
- Validating only on the client.
- Writing a type and a schema separately so they drift. Infer the type from the schema.
- Leaking raw validation internals to users instead of friendly messages.

You are ready to move on when the same Zod schema validates your signup form in the browser and the signup endpoint on the server, and the server rejects bad input with clear 400 errors.

Key concepts: Schemas and inferred types, parse vs safeParse, Validating request bodies, Validating environment variables, Shared client and server schemas, Coercion and transforms, Valibot or Yup.

Mini project: Write Zod schemas for a student signup (name, college email, phone with Indian format, graduation year) and an env schema for your app. Infer the types and use them in a small Node.js script that validates sample inputs.

Self-check: Your frontend already validates the email field. Why must the API validate it again?

Resources:
- [Zod documentation](https://zod.dev/) (Zod)
- [Valibot](https://valibot.dev/) (Valibot)
- [OWASP Input Validation Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html) (OWASP)

## React for Interfaces

Build interactive UIs with components, props, state and hooks, then handle forms, styling and server data the way production teams do.

### React Fundamentals

core · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/full-stack/react-fundamentals

Think in components: JSX, props, rendering lists, conditional UI and composing small pieces into full pages.

React describes the UI as a function of data. You change the data; React updates the screen. Next.js, which you will learn next, is built on these same ideas.

#### Components and JSX
A component is a function that returns JSX. JSX looks like HTML but is JavaScript: use className instead of class, wrap expressions in curly braces, and return a single root element (or a fragment).

#### Props
Props pass data down from parent to child. Treat them as read-only. Use **children** to build layout components like Card or Modal that wrap other content.

#### Rendering lists and conditions
- map over arrays to render lists, and give every item a stable **key** (an id, not the array index when items can reorder).
- Use && or a ternary for conditional UI, and early returns for loading and error states.

#### Thinking in React
Break a design into a component tree, decide which component owns each piece of data, and pass it down. Keep components small and focused; if a file is 400 lines, split it.

#### Pitfalls
- Using array index as key in lists that can be sorted or filtered.
- Copying props into state, which then goes stale.
- One giant App component that does everything.

You are ready to move on when you can turn a static mockup of an internship board into a component tree with typed props and render it from an array of data.

Key concepts: Components and JSX, Props and children, Rendering lists with keys, Conditional rendering, Component composition, Thinking in React, React DevTools.

Mini project: Build a Vite + React + TypeScript internship board from a local JSON array: a list of cards, a details panel, and empty, loading and error states, split into at least six components.

Self-check: Why does React need a key on list items, and what goes wrong if you use the array index on a sortable list?

Resources:
- [Learn React](https://react.dev/learn) (React)
- [Thinking in React](https://react.dev/learn/thinking-in-react) (React)
- [React Roadmap](https://roadmap.sh/react) (roadmap.sh)

### State, Effects and Hooks

core · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/full-stack/react-hooks-and-state

Manage local and shared state with useState, useReducer and context, and use effects only for real synchronisation with the outside world.

State is data that changes over time and should re-render the UI. Getting state right is most of what "good React" means.

#### Core hooks
- **useState** for local values. Updates are asynchronous and replace the value, so create new objects and arrays rather than mutating.
- **useReducer** when state has several related fields and named actions, like a multi-step application form.
- **useContext** to share values such as the current user or theme without passing props through every level.
- **useRef** for values that should not trigger re-renders, and for DOM references.

#### Effects
**useEffect** synchronises a component with something outside React: a subscription, a timer, a browser API. It is not the place to compute derived values or to fetch every bit of data. If a value can be computed from props or state, compute it during render.

#### Where state lives
Keep state as close as possible to where it is used, lift it up only when siblings need it, and keep server data in a dedicated tool (covered later). Global state libraries like Zustand are optional; many apps never need one.

#### Pitfalls
- Effects with missing dependencies, causing stale values, or with too many, causing infinite loops.
- Storing derived values (like a filtered list) in state.
- Reaching for context for everything, which re-renders large parts of the tree.

You are ready to move on when you can explain why a component re-rendered, and refactor an effect-heavy component so most of its logic runs during render.

Key concepts: useState and immutable updates, useReducer, useContext, useRef, useEffect and cleanup, Derived state, Custom hooks, Zustand for global state.

Mini project: Add filters (branch, stipend range, remote) and a saved-internships list to your board. Keep filters in the URL, saved items in context, and extract a reusable useDebounce custom hook for search.

Self-check: You store a filtered list in state and update it in an effect whenever filters change. What is wrong with that, and what should you do instead?

Resources:
- [Managing State](https://react.dev/learn/managing-state) (React)
- [You Might Not Need an Effect](https://react.dev/learn/you-might-not-need-an-effect) (React)
- [Hooks API Reference](https://react.dev/reference/react/hooks) (React)

### Forms and User Input

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/forms

Build forms that validate clearly, submit reliably and stay accessible, using React Hook Form with shared Zod schemas.

Forms are where users give your app data: signups, job applications, payment details. They must be fast, clear and forgiving.

#### Controlled vs uncontrolled
Controlled inputs keep every keystroke in React state; uncontrolled inputs let the DOM hold the value and read it on submit. For larger forms, **React Hook Form** uses uncontrolled inputs under the hood, which keeps re-renders low.

#### Validation that helps
- Plug your **Zod schema** into React Hook Form with a resolver, so client and server share rules.
- Show errors next to the field, in text, after the user leaves the field or submits.
- Disable the submit button while submitting, and show server errors (like "email already registered") clearly.

#### Submission
Send JSON with fetch or call a server action. Handle success (redirect or toast), validation errors (map them back to fields) and network failures (keep the user's input; never wipe the form on error).

#### Special inputs
File uploads, date pickers, phone numbers with country codes, and multi-step wizards each have quirks. Prefer native inputs where possible for accessibility and mobile keyboards.

#### Pitfalls
- Validating on every keystroke and showing red errors before the user has finished typing.
- Losing all input when a request fails.
- Double submissions creating duplicate records.

You are ready to move on when you can build a multi-step internship application form with shared validation, clear errors and safe submission.

Key concepts: Controlled vs uncontrolled inputs, React Hook Form, Zod resolver and shared schemas, Error display and timing, Submit states and double submits, File inputs, Multi-step forms.

Mini project: Build a three-step internship application (personal details, education with CGPA, resume link and cover note) with React Hook Form and Zod, a review step, and a mock submit that sometimes fails so you handle errors.

Self-check: How do you prevent a user who double-clicks Submit from creating two applications, on both the client and the server?

Resources:
- [React Hook Form](https://react-hook-form.com/) (React Hook Form)
- [Reacting to Input with State](https://react.dev/learn/reacting-to-input-with-state) (React)
- [Learn Forms](https://web.dev/learn/forms) (web.dev)

### Styling with Tailwind CSS

recommended · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/tailwind-css

Style React components quickly and consistently with utility classes, a shared design scale and component patterns.

**Tailwind CSS** is the most common styling choice in new React and Next.js projects. Instead of writing separate CSS files, you compose small utility classes directly in your markup.

#### Why teams use it
- A built-in scale for spacing, colours and type keeps designs consistent.
- No naming debates and no dead CSS; unused classes are removed at build time.
- Responsive and state variants (md:, hover:, focus-visible:, dark:) are right next to the element they affect.

#### Working well with it
- Extract **components**, not custom CSS classes, when patterns repeat: a Button component with variants beats copying 15 classes.
- Use a helper like clsx or tailwind-merge for conditional classes.
- Configure theme colours and fonts once so the whole app follows your brand.
- Component libraries such as shadcn/ui give you accessible, copy-in components built on Tailwind.

#### Pitfalls
- Learning Tailwind without CSS. You will not know which utility you need, or why a layout breaks.
- Extremely long class strings repeated across files instead of extracting components.
- Ignoring focus styles because they are not in the design.

You are ready to move on when you can rebuild your internship board UI in Tailwind with a reusable Button and Card, dark mode, and a mobile-first responsive layout.

Key concepts: Utility classes and the design scale, Responsive and state variants, Dark mode, Theme configuration, Component extraction with variants, clsx and tailwind-merge, shadcn/ui.

Mini project: Restyle your internship board with Tailwind: a themed Button with primary, secondary and danger variants, responsive card grid, accessible focus states and a dark mode toggle.

Self-check: The same 12 Tailwind classes appear on 20 buttons. What is the right way to remove the duplication?

Resources:
- [Tailwind CSS Documentation](https://tailwindcss.com/docs) (Tailwind CSS)
- [shadcn/ui](https://ui.shadcn.com/docs) (shadcn/ui)

### Styling with CSS Modules

alternative · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/css-modules

Write plain CSS scoped to each component, with no runtime cost and full access to modern CSS features.

**CSS Modules** keep styles in normal .module.css files, but class names are scoped to the component that imports them. Both Vite and Next.js support them with no setup.

#### How it works
You write .card { ... } in Card.module.css, import styles from it, and use className={styles.card}. At build time the class becomes a unique name, so two components can both have a .title class without clashing.

#### Why choose it
- You write real CSS, so everything you learned (Grid, custom properties, container queries) applies directly.
- Clear separation between markup and styles, which some teams prefer for large components.
- Zero runtime cost and good compatibility with server components.

#### Working well with it
- Put shared design tokens (colours, spacing) in global CSS custom properties and reference them in every module.
- Use composes or a shared utility module for repeated patterns.
- Keep one module per component, next to the component file.

#### Pitfalls
- Duplicating colours and spacing values in every file instead of using tokens.
- Overusing global styles, which defeats the point of scoping.
- Deep selector nesting that is hard to override.

You are ready to move on when you can style your internship board with CSS Modules and shared tokens, and explain how scoping prevents class name collisions.

Key concepts: Scoped class names, Global tokens with custom properties, composes and shared modules, Responsive styles in modules, Conditional classes, Sass with modules.

Mini project: Build a small design system for your board using CSS Modules: tokens in a global file, Button, Card and Badge modules, and a dark theme driven by a data attribute.

Self-check: Two components both define a .title class in their own modules. Why do they not conflict?

Resources:
- [CSS Modules](https://github.com/css-modules/css-modules) (CSS Modules)
- [CSS in Next.js](https://nextjs.org/docs/app/getting-started/css) (Next.js)
- [Vite: CSS Modules](https://vite.dev/guide/features.html#css-modules) (Vite)

### Server State with TanStack Query

recommended · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/server-state-tanstack-query

Fetch, cache, refetch and mutate API data in client components without hand-written loading flags and effects.

Data that lives on the server (internships, applications, notifications) is different from UI state. It can go stale, needs caching, and is shared between screens. **TanStack Query** is built for exactly this.

#### Core ideas
- **useQuery** with a query key (like ["internships", filters]) fetches and caches data, and tracks loading and error state for you.
- **Stale time** decides how long data is considered fresh before a background refetch.
- **useMutation** for creates and updates, followed by **invalidating** the affected queries so lists refresh.
- **Optimistic updates** change the UI immediately and roll back if the server fails, useful for likes or bookmarks.

#### Where it fits with Next.js
Server components can fetch data directly on the server, so you need less client-side fetching than in a pure SPA. TanStack Query still shines for highly interactive client screens: dashboards, infinite scroll, polling and live filters.

#### Pitfalls
- Copying query results into useState, which breaks caching and freshness.
- Query keys that do not include all the inputs, so changing a filter shows old data.
- Forgetting to invalidate after a mutation.

You are ready to move on when your board loads internships through useQuery, paginates with infinite scroll, and saves bookmarks with an optimistic mutation that rolls back on error.

Key concepts: Server state vs UI state, useQuery and query keys, Stale time and refetching, useMutation and invalidation, Optimistic updates, Infinite queries and pagination, SWR.

Mini project: Connect your internship board to a mock API (json-server or a free public API): list with infinite scroll, details with prefetch on hover, and an optimistic bookmark toggle.

Self-check: You add a new application with a mutation but the applications list does not update. What did you forget?

Resources:
- [TanStack Query](https://tanstack.com/query/latest) (TanStack)
- [SWR](https://swr.vercel.app/) (Vercel)

## Next.js App Router

Use Next.js to combine React UI and server code in one project: file-based routing, server components, data fetching, caching, mutations and SEO.

### Next.js Routing and Layouts

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/full-stack/nextjs-app-router

Structure an app with the App Router: folders as routes, nested layouts, dynamic segments, loading and error states.

Next.js is a React framework that adds routing, server rendering and backend code to React. The **App Router** (the app directory) is the current default.

#### Routing by folders
- app/page.tsx is the home page; app/internships/page.tsx is /internships.
- **Dynamic segments**: app/internships/[id]/page.tsx handles /internships/42.
- **Route groups** like (marketing) and (dashboard) organise files without changing URLs.
- The Link component handles client-side navigation and prefetching.

#### Special files
- **layout.tsx** wraps pages and keeps state across navigation; use it for navbars and dashboard shells.
- **loading.tsx** shows instantly while a route loads (built on Suspense).
- **error.tsx** catches errors in a segment so one broken widget does not crash the app.
- **not-found.tsx** for 404s.

#### Navigation and URLs
Read params and searchParams in pages for filters and pagination. Keep filter state in the URL so pages can be shared and bookmarked.

#### Pitfalls
- Putting everything in the root layout, which then re-renders or fetches too much.
- Mixing up the older pages directory tutorials with App Router code. Check which router a tutorial uses.
- Forgetting loading and error states, so slow data shows a blank screen.

You are ready to move on when you can scaffold a Next.js app with a public section and a dashboard section, each with its own layout, dynamic routes, and loading and error files.

Key concepts: File-based routing, Layouts and nested layouts, Dynamic segments and params, Link and navigation, loading.tsx and error.tsx, Route groups, searchParams for filters, Parallel and intercepting routes.

Mini project: Scaffold a Next.js campus placement portal: public pages (home, companies, company details by slug) and a /dashboard group with a sidebar layout, each with loading and error states.

Self-check: What is the difference between layout.tsx and page.tsx, and why does a layout not re-mount when you navigate between its child pages?

Resources:
- [Next.js Documentation](https://nextjs.org/docs) (Next.js)
- [Learn Next.js](https://nextjs.org/learn) (Next.js)
- [App Router](https://nextjs.org/docs/app) (Next.js)

### Server and Client Components

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/server-and-client-components

Know which code runs on the server and which in the browser, and draw the boundary so pages are fast and secrets stay safe.

In the App Router, components are **Server Components** by default. They run on the server, can read the database directly, and send HTML plus a compact payload to the browser with no component JavaScript.

#### Client Components
Add "use client" at the top of a file when a component needs interactivity: state, effects, event handlers or browser APIs. Everything it imports becomes part of the client bundle.

#### Drawing the boundary
- Keep pages and data-loading components on the server.
- Push "use client" down to the smallest interactive leaf: a LikeButton, a FilterBar, a Modal.
- Pass server-fetched data to client components as **serialisable props** (plain objects, not class instances or functions).
- Server components can render client components, and you can pass server components into client components as children.

#### Security implications
Server-only code can use secrets and database clients. Mark modules with the server-only package so an accidental client import fails the build. Environment variables are only exposed to the browser if prefixed with NEXT_PUBLIC_.

#### Pitfalls
- Adding "use client" to a whole page because one button needs state, shipping far more JavaScript than needed.
- Importing a database client into a client component.
- Passing entire database rows (with private fields) as props to the client.

You are ready to move on when you can take a page, mark exactly which components must be client components, and explain what each one sends to the browser.

Key concepts: Server Components by default, "use client" and the client boundary, Composition patterns, Serialisable props, server-only and secrets, NEXT_PUBLIC_ environment variables, Suspense and streaming.

Mini project: Build a company details page that loads data in a server component and includes two small client components (an Apply button with state and a tabbed view), then measure the client JavaScript before and after moving the boundary.

Self-check: Your page component is a client component because of one interactive search box. How would you restructure it?

Resources:
- [Server and Client Components](https://nextjs.org/docs/app/getting-started/server-and-client-components) (Next.js)
- [Server Components](https://react.dev/reference/rsc/server-components) (React)
- ['use client' directive](https://react.dev/reference/rsc/use-client) (React)

### Data Fetching and Caching in Next.js

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/nextjs-data-and-caching

Fetch data on the server, decide what is static or dynamic, and revalidate cached data so pages stay fast and fresh.

Next.js gives you several ways to fetch and cache data. The defaults have changed across versions, so always check the docs for your version, but the underlying questions stay the same.

#### Fetching on the server
Server components can be async: await a database query or a fetch call directly in the component. Fetch data in parallel where possible, and wrap slow parts in Suspense so the rest of the page streams first.

#### Static vs dynamic
- **Static**: rendered at build time or on first request and reused. Great for company profiles, blog posts and landing pages.
- **Dynamic**: rendered per request. Needed for anything that depends on cookies, the logged-in user or real-time data.
- Reading cookies, headers or searchParams usually makes a route dynamic.

#### Revalidation
- **Time-based**: revalidate every N seconds for data that changes slowly, like a list of companies.
- **On-demand**: call revalidatePath or revalidateTag after a mutation so the next visitor sees fresh data.

#### Pitfalls
- Assuming data is fresh when it is actually cached, or the opposite, making every page dynamic and slow.
- Request waterfalls: awaiting one fetch, then the next, when they are independent.
- Caching user-specific data in a shared cache.

You are ready to move on when you can explain, for every route in your placement portal, whether it is static or dynamic, how long its data is cached, and what triggers revalidation.

Key concepts: Async server components, Parallel fetching and waterfalls, Static vs dynamic rendering, Time-based revalidation, revalidatePath and revalidateTag, Streaming with Suspense, generateStaticParams.

Mini project: Make the companies list static with hourly revalidation, company pages pre-rendered with generateStaticParams, and the student dashboard fully dynamic. Document each choice in the README.

Self-check: An admin updates a company's package but students still see the old CTC for an hour. Which two fixes could you apply, and which is better here?

Resources:
- [Fetching Data](https://nextjs.org/docs/app/getting-started/fetching-data) (Next.js)
- [Caching and Revalidating](https://nextjs.org/docs/app/getting-started/caching-and-revalidating) (Next.js)
- [Learn Next.js](https://nextjs.org/learn) (Next.js)

### Server Actions and Mutations

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/server-actions

Handle form submissions and data changes with server actions, with validation, authorization and revalidation on every call.

**Server Actions** are async functions marked with "use server" that run on the server but can be called from forms and client components. They remove a lot of API boilerplate for mutations inside a Next.js app.

#### How they work
- Pass an action to a form's action prop; the form works even before JavaScript loads (progressive enhancement).
- Read FormData, validate with Zod, write to the database, then revalidatePath or redirect.
- Use **useActionState** to return validation errors to the form, and **useFormStatus** for pending states.

#### Treat every action as a public endpoint
An action is reachable by anyone who can send an HTTP request. On every call:
- **Authenticate**: who is calling?
- **Authorize**: may this user change this record?
- **Validate**: never trust FormData or arguments.

#### When to use a route handler instead
Use actions for mutations triggered by your own UI. Use API routes for webhooks (Razorpay, GitHub), mobile apps, third-party clients and anything that needs a stable public URL.

#### Pitfalls
- Skipping auth checks because "the button is only shown to admins".
- Returning full database objects to the client.
- Forgetting to revalidate, so the UI shows stale data after a successful change.

You are ready to move on when your application form submits through a server action that validates input, checks the user's session, writes data, revalidates the dashboard and shows field errors without a page reload.

Key concepts: "use server" functions, Forms and progressive enhancement, useActionState and useFormStatus, Validation inside actions, Auth checks in every action, Revalidate and redirect, Actions vs route handlers.

Mini project: Implement create, edit and withdraw for internship applications using server actions, with Zod validation, pending states, field-level errors and dashboard revalidation.

Self-check: Why must a server action check authorization even if the button that calls it is hidden from unauthorised users?

Resources:
- [Mutating Data](https://nextjs.org/docs/app/getting-started/mutating-data) (Next.js)
- [Server Functions](https://react.dev/reference/rsc/server-functions) (React)
- [useActionState](https://react.dev/reference/react/useActionState) (React)

### Rendering Strategies, Metadata and SEO

recommended · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/rendering-and-seo

Choose between SSR, SSG, ISR and client rendering, and make public pages discoverable with metadata, sitemaps and fast loads.

Public pages like job listings, company profiles and blog posts need to be found on Google and shared on WhatsApp and LinkedIn. Logged-in dashboards do not. Choose rendering accordingly.

#### The strategies
- **SSG**: HTML built ahead of time. Fastest, cheapest, ideal for content that rarely changes.
- **ISR**: static pages regenerated in the background after a time or on demand.
- **SSR**: HTML rendered per request. Needed for personalised or always-fresh pages.
- **CSR**: the browser renders after loading JavaScript. Fine behind a login, poor for SEO.

#### Metadata
Export metadata or generateMetadata from a page to set the title, description and **Open Graph** tags, so a shared link shows a proper preview card. Add a sitemap.ts and robots.ts so search engines can find and crawl your pages.

#### Structured data and images
JSON-LD structured data (for example JobPosting) can earn rich search results. Use next/image for responsive, lazy-loaded images, and next/font to avoid layout shifts from web fonts.

#### Pitfalls
- Rendering public content only on the client, so crawlers and link previews see an empty page.
- The same title and description on every page.
- Blocking your whole site in robots.txt by accident after launch.

You are ready to move on when your public company and internship pages have unique metadata, share previews, a sitemap and a good Lighthouse SEO score.

Key concepts: SSG, ISR, SSR and CSR, Metadata API, Open Graph previews, sitemap and robots, JSON-LD structured data, next/image and next/font.

Mini project: Add dynamic metadata, Open Graph images, a sitemap and JobPosting JSON-LD to your public internship pages, then check share previews and run a Lighthouse SEO audit.

Self-check: Which pages in a placement portal should be statically generated, and which must be rendered per request? Justify two of each.

Resources:
- [Metadata and OG images](https://nextjs.org/docs/app/getting-started/metadata-and-og-images) (Next.js)
- [SEO Starter Guide](https://developers.google.com/search/docs/fundamentals/seo-starter-guide) (Google Search Central)
- [Rendering on the Web](https://web.dev/articles/rendering-on-the-web) (web.dev)

## Node.js and API Design

Build the server side: how Node.js runs your code, how to design clean REST APIs, which framework to pick, and how to handle errors and validation.

### Node.js Runtime Essentials

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/nodejs-runtime

Run JavaScript and TypeScript on the server, use core modules, manage configuration and understand what blocks the event loop.

Node.js runs JavaScript outside the browser. It powers Express, Fastify and the server side of Next.js, so its behaviour is your backend's behaviour.

#### Essentials
- Run scripts with node, and TypeScript in development with tsx. Use the current **LTS** version.
- Core modules: fs/promises for files, path, crypto for hashing and random tokens, and the built-in fetch.
- **process.env** for configuration, loaded from .env files in development and from the platform in production.
- ES modules vs CommonJS: prefer ESM ("type": "module") for new projects, but recognise require() in older code.

#### Performance model
Node handles many concurrent requests on one thread because I/O is non-blocking. CPU-heavy work (resizing images, generating large PDFs, hashing with high cost in a loop) blocks every other request. Move such work to a background job or a worker thread.

#### Reliability
- Handle unhandledRejection and uncaughtException by logging and exiting; let the platform restart the process.
- Implement **graceful shutdown**: on SIGTERM, stop accepting requests, finish in-flight ones, close the database pool.
- Use a file watcher (node --watch or tsx watch) in development.

#### Pitfalls
- Synchronous fs calls inside request handlers.
- Reading process.env all over the codebase instead of validating it once at startup.
- Running an odd-numbered or end-of-life Node version in production.

You are ready to move on when you can write a small Node.js HTTP server with the built-in http module, read config from validated env vars, and shut it down gracefully.

Key concepts: LTS versions and nvm, Core modules: fs, path, crypto, process.env and .env files, ESM vs CommonJS, Blocking vs non-blocking work, Graceful shutdown, Running TypeScript with tsx, Worker threads.

Mini project: Build a tiny URL shortener using only Node's built-in http module and a JSON file for storage, with env-based config validated by Zod and graceful shutdown on SIGTERM.

Self-check: One endpoint generates a large PDF synchronously and the whole API becomes slow for everyone. Why, and what are two fixes?

Resources:
- [Learn Node.js](https://nodejs.org/en/learn) (Node.js)
- [Node.js API Documentation](https://nodejs.org/docs/latest/api/) (Node.js)
- [Node.js Roadmap](https://roadmap.sh/nodejs) (roadmap.sh)

### REST API Design

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/rest-api-design

Design predictable, versionable JSON APIs with clear resources, status codes, pagination and filtering that frontends and mobile apps can rely on.

A good API is boring and predictable. Frontend developers, mobile apps and future you should be able to guess an endpoint before reading the docs.

#### Resources and methods
- Nouns for resources: /students, /companies/42/openings, /applications.
- Methods for actions: GET to list or read, POST to create, PATCH to partially update, DELETE to remove.
- Return **201** with the created resource after POST, **204** after a delete, **404** for missing records, **409** for conflicts such as a duplicate application.

#### Lists at scale
- **Pagination**: offset/limit is simple; cursor-based pagination stays fast and stable on large, changing tables.
- **Filtering and sorting** with query parameters: ?branch=CSE&minStipend=20000&sort=-createdAt.
- Return a consistent envelope, for example { data, nextCursor }.

#### Consistency and evolution
- Use one error format everywhere (status, code, message, field errors).
- Version when you must break clients (/v1) and prefer additive changes.
- Make retried operations safe: idempotency keys matter for payments and order creation.
- Document with **OpenAPI** so others can generate clients and test against it.

#### Pitfalls
- Verbs in URLs like /getAllStudents or /deleteCompany.
- Returning everything in one unpaginated response.
- Different error shapes from every endpoint.

You are ready to move on when you can write an OpenAPI-style design for a placement portal API (students, companies, openings, applications) that a teammate could build a frontend against without asking questions.

Key concepts: Resource naming, Methods and status codes, Pagination: offset vs cursor, Filtering and sorting, Consistent error format, Versioning, Idempotency keys, OpenAPI documentation, GraphQL and tRPC.

Mini project: Write an OpenAPI 3 spec for the placement portal API with at least ten endpoints, cursor pagination on lists and a shared error schema, and preview it in Swagger Editor.

Self-check: Why does offset pagination give duplicate or missing rows when new records are being inserted, and how does cursor pagination avoid it?

Resources:
- [Best practices for REST API design](https://stackoverflow.blog/2020/03/02/best-practices-for-rest-api-design/) (Stack Overflow Blog)
- [OpenAPI Specification](https://swagger.io/specification/) (Swagger)
- [Microsoft REST API Guidelines](https://github.com/microsoft/api-guidelines) (Microsoft)

### Building APIs with Express

recommended · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/full-stack/express

Build a typed REST API with Express: routing, middleware, a layered structure and centralised error handling.

**Express** is the most widely used Node.js web framework. It is minimal, so learning it teaches you what every backend framework does under the hood. Express 5 handles rejected promises from async handlers, which removes a classic source of crashes.

#### Core concepts
- **Routing**: app.get, router.post and route parameters like /companies/:id.
- **Middleware**: functions that run in order for each request. Use them for JSON parsing, CORS, logging, auth and rate limiting.
- **Error middleware**: one handler with four arguments at the end of the chain turns thrown errors into consistent JSON responses.

#### Structure that scales
Split code into **routes** (HTTP only), **controllers or handlers** (parse input, call services), **services** (business logic) and **data access** (Prisma or Drizzle). Group by feature (students/, companies/) rather than by type once the app grows.

#### Must-have middleware
- express.json with a body size limit.
- cors configured for your actual frontend origin.
- helmet for security headers.
- A rate limiter on login and signup routes.

#### Pitfalls
- Business logic and SQL inside route files, making everything hard to test.
- Sending a response twice (forgetting to return after res.json).
- CORS set to allow every origin with credentials.

You are ready to move on when you have an Express + TypeScript API for students and companies with feature folders, validation middleware, central error handling and security middleware.

Key concepts: Routing and route params, Middleware chain, Error-handling middleware, Layered structure: routes, services, data, cors and helmet, Rate limiting, Express 5 async errors.

Mini project: Build an Express + TypeScript API for the placement portal with CRUD for companies and openings, Zod validation middleware, a central error handler, helmet, CORS and rate limiting on auth routes.

Self-check: Where in the middleware order should authentication run relative to body parsing and your route handlers, and why?

Resources:
- [Express](https://expressjs.com/) (Express)
- [Express Guide: Routing](https://expressjs.com/en/guide/routing.html) (Express)
- [Full Stack Open](https://fullstackopen.com/en/) (University of Helsinki)

### Building APIs with Fastify

alternative · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/full-stack/fastify

Build fast, schema-driven Node.js APIs with Fastify's plugin system, built-in validation and structured logging.

**Fastify** is a modern alternative to Express that is faster, has first-class TypeScript support and builds validation and logging into the framework.

#### What is different
- **Schemas on routes**: declare JSON schemas (or use a Zod type provider) for body, params and response. Fastify validates input and serialises output quickly, and strips fields you did not declare.
- **Plugins and encapsulation**: features register as plugins with their own routes, hooks and decorators, which keeps large apps organised.
- **Hooks** such as onRequest and preHandler replace most Express middleware.
- **Logging** with Pino is built in, producing structured JSON logs.

#### When to choose it
Pick Fastify for performance-sensitive APIs, for teams who like schema-first design, or when you want response serialisation to guarantee private fields never leak. The concepts (routing, auth, errors, layering) are the same as Express.

#### Pitfalls
- Trying to use Express middleware directly; you need the compatibility plugin or a Fastify-native equivalent.
- Ignoring encapsulation and registering decorators where other plugins cannot see them.
- Not defining response schemas, missing one of Fastify's main benefits.

You are ready to move on when you have a Fastify API with plugin-based feature modules, schema validation on every route, and response schemas that hide internal fields.

Key concepts: Routes with schemas, Plugins and encapsulation, Hooks, Zod type provider, Response serialisation, Built-in Pino logging.

Mini project: Build the placement portal API in Fastify with plugins for companies and applications, request and response schemas, an auth hook and structured logs.

Self-check: How can a Fastify response schema prevent a passwordHash field from ever reaching the client?

Resources:
- [Fastify Documentation](https://fastify.dev/docs/latest/) (Fastify)
- [Pino logger](https://getpino.io/) (Pino)

### API Routes with Next.js Route Handlers

alternative · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/next-route-handlers

Keep frontend and backend in one Next.js project by writing HTTP endpoints as route handlers, and know when a separate server is better.

**Route handlers** (route.ts files inside app) let a Next.js app expose real HTTP endpoints. For many student projects and early startups, one Next.js codebase deployed to Vercel is the simplest full-stack setup.

#### Basics
- app/api/companies/route.ts exporting GET and POST functions handles /api/companies.
- Handlers use the standard Web Request and Response objects; NextResponse.json is a convenient helper.
- Dynamic segments work like pages: app/api/companies/[id]/route.ts.

#### Good uses
- **Webhooks** from Razorpay, GitHub or email providers.
- Endpoints for a mobile app or a third-party integration.
- Public read APIs with caching headers.
For mutations from your own UI, server actions are often simpler.

#### Structure
Keep handlers thin: validate input, check auth, call a shared service module that holds business logic and database access. The same services can then be used by server components and server actions.

#### Limits to know
Serverless functions have execution time limits and cold starts, and do not suit long-lived connections like WebSockets. If you need those, long background work or a separate team owning the API, a standalone Express or Fastify server is a better fit.

#### Pitfalls
- Duplicating logic between route handlers and server actions.
- Forgetting that a handler is public and skipping auth.
- Opening a new database connection per request in serverless without pooling.

You are ready to move on when your Next.js project exposes a validated, authenticated REST endpoint and a webhook handler, both calling shared service functions.

Key concepts: route.ts and HTTP method exports, Request and Response objects, Dynamic route segments, Webhook handlers, Shared service layer, Serverless limits and cold starts, Middleware for auth redirects.

Mini project: Add /api/openings (GET with filters, POST for admins) and /api/webhooks/test (verifies a shared-secret signature) to your Next.js portal, both using one shared openings service.

Self-check: When would you move from Next.js route handlers to a separate Express or Fastify server? Name two concrete reasons.

Resources:
- [route.js file convention](https://nextjs.org/docs/app/api-reference/file-conventions/route) (Next.js)
- [Response (Web API)](https://developer.mozilla.org/en-US/docs/Web/API/Response) (MDN)

### Error Handling, Validation and API Hardening

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/api-errors-and-validation

Make APIs fail safely: validate every input, return consistent errors, never leak internals, and protect against abuse.

Production APIs spend much of their code on things that go wrong. Doing this well separates a demo from a real product.

#### Validation at the edge
Validate body, params and query with Zod before any business logic runs. Reject unknown fields where it matters, coerce query strings to numbers deliberately, and return **400** with field-level messages.

#### A single error strategy
- Define a small set of error classes (NotFound, Conflict, Forbidden, Validation) that carry a status and a code.
- Throw them from services; translate them to HTTP in one place (error middleware or a handler wrapper).
- Log the full error with a request id on the server; send the client a safe message and the request id.

#### Hardening
- **Rate limiting** on login, OTP and signup endpoints.
- **Request size limits** and timeouts.
- **Idempotency** for operations like "create payment order" so retries do not double-charge.
- Avoid exposing stack traces, SQL errors or internal ids in responses.

#### Pitfalls
- try/catch in every handler with copy-pasted responses.
- Returning 500 for user mistakes, which pollutes alerting.
- Catching errors and silently ignoring them.

You are ready to move on when every endpoint in your API returns the same error shape, bad input never reaches the database, and a forced crash returns a safe message with a request id that you can find in the logs.

Key concepts: Validating body, params and query, Custom error classes, Central error translation, Request ids, Rate limiting, Size limits and timeouts, Idempotent operations.

Mini project: Refactor your API so all routes use shared validation middleware and typed error classes, add request ids to logs and responses, and rate limit the auth endpoints. Write a short table of every error code your API can return.

Self-check: A database unique constraint fails when a student applies twice. What status code and response should the client get, and what should go in the logs?

Resources:
- [OWASP REST Security Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html) (OWASP)
- [Problem Details for HTTP APIs (RFC 9457)](https://www.rfc-editor.org/rfc/rfc9457) (IETF)
- [Express error handling](https://expressjs.com/en/guide/error-handling.html) (Express)

## PostgreSQL and Data Access

Store data reliably in PostgreSQL: SQL, relational modelling, a type-safe ORM, migrations, indexes and caching.

### SQL Fundamentals

core · beginner · about 10 h · https://www.internhack.in/roadmaps/tracks/full-stack/sql-basics

Query and change relational data with SELECT, JOIN, GROUP BY, INSERT, UPDATE and DELETE, and understand transactions.

An ORM writes SQL for you, but you still need to read and reason about SQL to model data, debug slow queries and pass technical interviews. Most placement tests include SQL questions.

#### Reading data
- SELECT with WHERE, ORDER BY, LIMIT and OFFSET.
- **JOINs**: INNER JOIN for matching rows, LEFT JOIN to keep rows with no match (students with zero applications).
- **Aggregation**: COUNT, SUM, AVG with GROUP BY and HAVING ("companies with more than 10 applicants").
- Subqueries and **CTEs** (WITH) to break complex queries into steps.

#### Changing data
INSERT, UPDATE and DELETE, always with a WHERE clause on updates and deletes. Use RETURNING in PostgreSQL to get the changed rows back.

#### Transactions
Group statements that must succeed or fail together (create an order and reduce stock) with BEGIN and COMMIT. Learn the ACID properties at a high level.

#### Practice setup
Install PostgreSQL locally or with Docker, or use a free hosted database, and connect with psql or a GUI like pgAdmin or DBeaver.

#### Pitfalls
- UPDATE without WHERE.
- Building SQL by concatenating strings with user input, which causes SQL injection. Always use parameterised queries.
- Using SELECT * everywhere in application code.

You are ready to move on when you can write a query that lists each company with its number of applicants and average applicant CGPA, including companies with zero applicants.

Key concepts: SELECT, WHERE, ORDER BY, INNER and LEFT JOIN, GROUP BY and aggregates, INSERT, UPDATE, DELETE, Subqueries and CTEs, Transactions and ACID, Parameterised queries, Window functions.

Mini project: Create a students, companies and applications schema in PostgreSQL, load 100 rows of sample data, and write 15 queries answering placement-cell questions such as top recruiters, branch-wise placement rate and average CTC.

Self-check: Why does an INNER JOIN between companies and applications drop companies with no applicants, and how do you keep them?

Resources:
- [PostgreSQL Tutorial](https://www.postgresql.org/docs/current/tutorial.html) (PostgreSQL)
- [SQLBolt interactive lessons](https://sqlbolt.com/) (SQLBolt)
- [SQL tutorial](https://www.w3schools.com/sql/) (W3Schools)

### Relational Data Modelling in PostgreSQL

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/postgres-data-modeling

Design tables, keys, relationships and constraints so the database protects your data even when application code has bugs.

A good schema makes features easy and bugs rare. A bad one haunts every query you write afterwards.

#### Tables and keys
- Every table gets a **primary key**. Choose between auto-incrementing integers and UUIDs (or cuid-style ids) based on whether ids appear in public URLs.
- **Foreign keys** link tables and stop orphaned rows. Decide what happens on delete: cascade, restrict or set null.

#### Relationships
- **One-to-many**: a company has many openings.
- **Many-to-many**: students and skills, through a join table that can also hold data (proficiency level).
- **One-to-one**: a user and a profile, when you want to split rarely used columns.

#### Constraints are your safety net
NOT NULL, UNIQUE (one application per student per opening), CHECK (cgpa between 0 and 10) and enums or lookup tables for statuses. The database enforces these even if a bug slips through validation.

#### PostgreSQL features worth knowing
Proper types: timestamptz for times, numeric or integer paise for money (never floats), jsonb for genuinely flexible data, and arrays used sparingly. Normalise first; denormalise later only for measured performance needs.

#### Pitfalls
- Storing money as a float, which causes rounding errors in rupee totals.
- Comma-separated values in one column instead of a join table.
- Skipping unique constraints and relying on application checks, which fail under concurrent requests.

You are ready to move on when you can draw an ER diagram for the placement portal with all keys and constraints, and explain how the database itself prevents duplicate applications.

Key concepts: Primary keys: integer vs UUID, Foreign keys and delete rules, One-to-many and many-to-many, Constraints: NOT NULL, UNIQUE, CHECK, Normalisation, Money and time types, jsonb, ER diagrams.

Mini project: Design and create the full placement portal schema (users, students, companies, openings, applications, skills) with constraints, then write a script that tries to insert invalid data and confirm the database rejects it.

Self-check: Why store a stipend of Rs 15,000.50 as integer paise or numeric rather than a floating-point number?

Resources:
- [PostgreSQL: Data Definition](https://www.postgresql.org/docs/current/ddl.html) (PostgreSQL)
- [PostgreSQL: Constraints](https://www.postgresql.org/docs/current/ddl-constraints.html) (PostgreSQL)
- [PostgreSQL Roadmap](https://roadmap.sh/postgresql-dba) (roadmap.sh)

### Prisma ORM and Migrations

recommended · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/full-stack/prisma

Define your schema in Prisma, generate a type-safe client, run migrations and write efficient queries from TypeScript.

**Prisma** is the most popular TypeScript ORM. You describe models in schema.prisma, and Prisma generates a fully typed client and SQL migrations from it.

#### The workflow
- Define models, relations and constraints in schema.prisma.
- Run prisma migrate dev to create and apply a migration file, and commit it.
- In production and CI, run prisma migrate deploy to apply pending migrations.
- Use Prisma Studio to browse data during development.

#### Querying
- findMany, findUnique, create, update, delete with fully typed inputs and results.
- **select** and **include** to fetch only the fields and relations you need.
- **Transactions** with prisma.$transaction for multi-step writes.
- Raw SQL with tagged templates when a query is easier to express directly.

#### Running it well
Create **one** PrismaClient instance and reuse it; in Next.js development, store it on globalThis to survive hot reloads. On serverless platforms, use a pooled connection string from your database provider.

#### Pitfalls
- **N+1 queries**: fetching a list, then querying each item's relation in a loop. Use include or a single query.
- Editing old migration files that have already run in production.
- Returning whole user records (with passwordHash) to the client instead of selecting fields.

You are ready to move on when your placement portal uses Prisma with committed migrations, a seed script, and list queries that fetch related data in one round trip.

Key concepts: schema.prisma models and relations, migrate dev and migrate deploy, CRUD with the typed client, select and include, Transactions, Seeding data, Avoiding N+1 queries, Connection pooling for serverless.

Mini project: Model the placement portal in Prisma, create migrations, write a seed script with realistic Indian company and college data, and implement a service that lists openings with company details and applicant counts in a single query.

Self-check: Your openings page makes 51 database queries for 50 openings. What is this problem called and how do you fix it with Prisma?

Resources:
- [Prisma Documentation](https://www.prisma.io/docs) (Prisma)
- [Prisma Migrate](https://www.prisma.io/docs/orm/prisma-migrate) (Prisma)

### Drizzle ORM and Migrations

alternative · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/full-stack/drizzle

Use Drizzle's SQL-like TypeScript API to define schemas, generate migrations and write type-safe queries with no heavy runtime.

**Drizzle** is a lightweight TypeScript ORM that stays close to SQL. If you like knowing exactly which query runs, Drizzle feels natural.

#### The workflow
- Define tables in TypeScript with pgTable, column helpers and relations.
- Use **drizzle-kit** to generate SQL migration files from schema changes and apply them.
- Infer row types directly from table definitions for use across your app.

#### Querying
- A SQL-like builder: db.select().from(companies).where(eq(companies.city, "Bengaluru")).
- A relational query API for nested results without manual joins.
- Transactions with db.transaction.
- The sql template tag for anything the builder does not cover.

#### Why teams pick it
Small runtime, works well on serverless and edge platforms, and queries map almost one to one to SQL, which makes performance easier to reason about. The trade-off is that you need stronger SQL knowledge than with Prisma.

#### Pitfalls
- Generating migrations but forgetting to commit or apply them in CI.
- Writing N+1 loops instead of a join or relational query.
- Mixing push-based schema sync with migrations in production.

You are ready to move on when your placement portal uses Drizzle with committed migrations, inferred types and list queries that fetch related data in one round trip.

Key concepts: Table definitions with pgTable, drizzle-kit migrations, Select builder and filters, Relational queries, Inferred types, Transactions, Serverless drivers.

Mini project: Implement the placement portal data layer in Drizzle: schema, migrations, a seed script and a service listing openings with company details and applicant counts in one query.

Self-check: What is the practical difference between generating migrations and pushing schema changes directly, and which should production use?

Resources:
- [Drizzle ORM Documentation](https://orm.drizzle.team/docs/overview) (Drizzle)
- [Drizzle Kit migrations](https://orm.drizzle.team/docs/migrations) (Drizzle)

### Indexes and Query Performance

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/indexes-and-query-performance

Find and fix slow queries with indexes, EXPLAIN ANALYZE, pagination and connection pooling before they hurt users.

Apps feel fast with 100 rows and fall over with 100,000. Placement season traffic spikes are a classic example: every student checks results at the same time.

#### Indexes
- An **index** lets PostgreSQL find rows without scanning the whole table. Primary keys and unique constraints create one automatically.
- Add indexes on columns you filter, join or sort by often: foreign keys, status, createdAt.
- **Composite indexes** follow column order: an index on (opening_id, status) helps queries filtering by both, or by opening_id alone.
- Indexes speed up reads but slow down writes and use space. Add them for real query patterns.

#### Measuring
Use **EXPLAIN ANALYZE** to see whether a query uses an index or does a sequential scan, and how long each step takes. Enable query logging in your ORM during development to spot repeated or N+1 queries.

#### Other wins
- Cursor pagination instead of large OFFSET values.
- Select only the columns you need.
- **Connection pooling** (PgBouncer or a provider pooler) so many serverless functions do not exhaust connections.

#### Pitfalls
- Adding an index on every column "just in case".
- Optimising without measuring first.
- Running heavy reports on the same database at peak time.

You are ready to move on when you can take a slow query on a seeded table of 100,000 applications, read its EXPLAIN ANALYZE output, add the right index and show the before and after timings.

Key concepts: B-tree indexes, Composite indexes and column order, EXPLAIN ANALYZE, Spotting N+1 queries, Cursor pagination, Connection pooling, Partial and expression indexes.

Mini project: Seed 100,000 fake applications, find the three slowest dashboard queries with EXPLAIN ANALYZE, add appropriate indexes through a migration, and record before and after timings in the README.

Self-check: You have an index on (status, opening_id) but your query filters only by opening_id. Will the index help, and why?

Resources:
- [Use The Index, Luke](https://use-the-index-luke.com/) (Markus Winand)
- [PostgreSQL: Using EXPLAIN](https://www.postgresql.org/docs/current/using-explain.html) (PostgreSQL)
- [PostgreSQL: Indexes](https://www.postgresql.org/docs/current/indexes.html) (PostgreSQL)

### Caching with Redis

optional · advanced · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/redis-caching

Use Redis for caching hot reads, rate limiting and short-lived data like OTPs and sessions, with clear invalidation rules.

**Redis** is an in-memory key-value store. It is fast enough to sit in front of your database for data many users read at once.

#### Common uses
- **Cache-aside**: check Redis, fall back to the database on a miss, store the result with a TTL. Good for leaderboards, public company lists and expensive aggregates.
- **Rate limiting**: count requests per user or IP with expiring keys.
- **Short-lived data**: OTP codes, password reset tokens and session data with automatic expiry.
- **Queues**: libraries like BullMQ use Redis to store background jobs.

#### Invalidation
Caching is easy; keeping it correct is hard. Choose a strategy per key: short TTLs for data that can be slightly stale, explicit deletes after writes for data that must be fresh. Include versions or ids in key names.

#### Hosting
Run Redis in Docker locally, and use a managed service (Upstash, Redis Cloud or your platform's add-on) in production.

#### Pitfalls
- Caching user-specific data under a shared key and showing one student's data to another.
- No TTL, so stale data lives forever.
- Treating Redis as your primary database without understanding persistence settings.

You are ready to move on when you can add cache-aside caching to an expensive endpoint, invalidate it on writes, and show the latency improvement.

Key concepts: Keys, TTLs and data types, Cache-aside pattern, Invalidation strategies, Rate limiting with Redis, OTPs and short-lived tokens, Managed Redis (Upstash).

Mini project: Cache the placement statistics endpoint (branch-wise placement rate and average CTC) in Redis with a 5-minute TTL, invalidate it when a new offer is recorded, and log cache hit ratio.

Self-check: What could go wrong if you cache the response of /api/me under the key 'me'?

Resources:
- [Redis Documentation](https://redis.io/docs/latest/) (Redis)
- [Upstash Redis](https://upstash.com/docs/redis/overall/getstarted) (Upstash)

## Authentication, Authorization and Security

Let users sign in safely with passwords, sessions, JWTs and OAuth, control what they can do, and defend against the common web attacks.

### Authentication Fundamentals and Password Storage

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/auth-fundamentals

Understand identity, credentials and password hashing, and implement signup, login, reset and email verification safely.

**Authentication** answers "who are you?". **Authorization** answers "what may you do?". Mixing them up causes many real breaches.

#### Passwords done right
- Never store passwords in plain text or with fast hashes like MD5 or SHA-256.
- Use a slow, salted algorithm built for passwords: **argon2id** (preferred) or **bcrypt**.
- Enforce a sensible minimum length, allow long passphrases, and check against known breached passwords if you can.

#### The flows you must build
- **Signup** with email verification (a signed, expiring link or an OTP).
- **Login** with the same generic error for wrong email or wrong password, so attackers cannot discover registered emails.
- **Password reset** with single-use, short-lived tokens stored hashed in the database.
- **Rate limiting and lockouts** on login and OTP endpoints.

#### Beyond passwords
Magic links, phone OTP (common in Indian apps), passkeys and social login reduce password risk. Multi-factor authentication matters for admin accounts.

#### Pitfalls
- Rolling your own crypto or token format.
- Reset tokens that never expire or can be reused.
- Logging request bodies that contain passwords or OTPs.

You are ready to move on when you can explain why bcrypt or argon2 beats SHA-256 for passwords and sketch secure signup, login and reset flows end to end.

Key concepts: Authentication vs authorization, Password hashing: argon2 and bcrypt, Signup and email verification, Login and generic errors, Password reset tokens, Rate limiting login and OTP, Passkeys and MFA.

Mini project: Implement email and password signup, login and password reset in your API with argon2 or bcrypt, hashed single-use reset tokens that expire in 15 minutes, and rate limiting on login.

Self-check: Why should a login form say 'invalid email or password' instead of 'no account with this email'?

Resources:
- [OWASP Password Storage Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html) (OWASP)
- [OWASP Authentication Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html) (OWASP)
- [The Copenhagen Book](https://thecopenhagenbook.com/) (The Copenhagen Book)

### Sessions, Cookies and JWTs

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/sessions-vs-jwt

Keep users logged in with server-side sessions or signed tokens, store them in secure cookies, and understand the trade-offs.

After login, the server needs to recognise the user on every request. There are two main approaches.

#### Server-side sessions
The server stores a session record (in PostgreSQL or Redis) and gives the browser a random **session id** in a cookie. Logging out or banning a user is instant: delete the record. This is the simplest secure default for web apps.

#### JWTs
A **JSON Web Token** is a signed blob containing claims like the user id and expiry. The server can verify it without a database lookup. The catch: you cannot easily revoke a JWT before it expires. Common patterns use a short-lived access token (around 15 minutes) plus a refresh token that is stored and can be revoked.

#### Cookies done right
- **HttpOnly** so JavaScript cannot read the token (limits damage from XSS).
- **Secure** so it is only sent over HTTPS.
- **SameSite=Lax** (or Strict) to reduce CSRF risk.
- A sensible expiry and rotation on login.

#### Choosing
For a browser-based app on one domain, cookie sessions are usually simpler and safer. JWTs suit mobile apps and service-to-service calls.

#### Pitfalls
- Storing JWTs in localStorage, where any XSS can steal them.
- Putting sensitive data in a JWT payload; it is only encoded, not encrypted.
- Long-lived JWTs with no way to revoke them.

You are ready to move on when you can implement cookie-based sessions with logout and "log out of all devices", and explain when you would choose JWTs instead.

Key concepts: Server-side sessions, Cookie flags: HttpOnly, Secure, SameSite, JWT structure and signing, Access and refresh tokens, Revocation and logout everywhere, Session rotation, Where not to store tokens.

Mini project: Add database-backed sessions to your API with secure cookies, a sessions table showing active devices, logout, and a 'log out of all devices' button.

Self-check: A student's account is compromised and you ban it. How quickly does the ban take effect with server sessions vs 24-hour JWTs?

Resources:
- [OWASP Session Management Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html) (OWASP)
- [Introduction to JSON Web Tokens](https://jwt.io/introduction) (jwt.io)
- [Using HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies) (MDN)

### OAuth 2.0, OpenID Connect and Social Login

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/oauth-and-social-login

Let users sign in with Google or GitHub using the authorization code flow, and understand what OAuth does and does not prove.

"Sign in with Google" is expected in most student-facing apps. It is built on **OAuth 2.0** (delegated access) and **OpenID Connect** (identity on top of OAuth).

#### The authorization code flow
1. Your app redirects the user to the provider with a client id, redirect URI, scopes, a **state** value and a **PKCE** challenge.
2. The user logs in and consents.
3. The provider redirects back with a short-lived **code**.
4. Your server exchanges the code (plus client secret and PKCE verifier) for tokens.
5. You read the verified identity (email, name) from the ID token or userinfo endpoint and create or link a local user.

#### Important details
- **state** protects against CSRF on the callback; **PKCE** protects the code exchange.
- Redirect URIs must match exactly; register both localhost and production URLs.
- Only trust emails the provider marks as verified before linking accounts.
- Keep the client secret on the server.

#### When to use a library
You should understand this flow, but in production use a well-tested library (Auth.js, Clerk or your provider's SDK) rather than writing it by hand.

#### Pitfalls
- Using the implicit flow, which is deprecated.
- Linking a social login to an existing account just because the email matches an unverified address.
- Requesting far more scopes than you need.

You are ready to move on when you can draw the authorization code flow with PKCE and explain what each step protects against.

Key concepts: OAuth 2.0 vs OpenID Connect, Authorization code flow, PKCE and state, Scopes and consent, Redirect URIs, Account linking, Google and GitHub providers.

Mini project: Register a GitHub OAuth app and implement the authorization code flow manually in a small Express or Next.js app (for learning), printing each step, then compare it with the library version.

Self-check: What attack does the state parameter prevent, and what does PKCE protect?

Resources:
- [OAuth 2.0](https://oauth.net/2/) (oauth.net)
- [OpenID Connect](https://openid.net/developers/how-connect-works/) (OpenID Foundation)
- [Authorizing OAuth apps](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps) (GitHub)

### Auth with Auth.js (NextAuth)

recommended · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/authjs

Add sessions, OAuth providers and credentials login to a Next.js app with the open-source Auth.js library and your own database.

**Auth.js** (formerly NextAuth.js) is an open-source authentication library with first-class Next.js support. Your users and sessions live in your own database, and there is no per-user pricing.

#### Setup
- Configure providers (Google, GitHub, email magic links, credentials) in one auth config file.
- Use the **Prisma or Drizzle adapter** to store users, accounts and sessions in PostgreSQL.
- Choose database sessions or JWT sessions in the config.

#### Using it in the App Router
- Call auth() in server components, route handlers and server actions to get the current session.
- Protect routes in middleware by redirecting signed-out users to the login page.
- Use signIn and signOut helpers from client or server code.

#### Extending
Add fields like role or collegeId to the session through callbacks, and keep authorization checks in your own service code.

#### Pitfalls
- Relying on middleware alone for protection; always check the session again in server actions and handlers that change data.
- Exposing sensitive user fields in the session object sent to the client.
- Misconfigured callback URLs between local and production environments.

You are ready to move on when your Next.js portal supports Google login and email magic links, stores users in PostgreSQL, protects the dashboard, and exposes the user's role in the session.

Key concepts: Providers configuration, Database adapters, auth() in server code, Middleware route protection, Session callbacks and roles, Magic link email login, Better Auth.

Mini project: Add Auth.js to your Next.js placement portal with Google login and a Prisma adapter, protect /dashboard, add a STUDENT or RECRUITER role to the session, and show role-specific navigation.

Self-check: Middleware redirects signed-out users away from /dashboard. Why do your server actions still need to call auth()?

Resources:
- [Auth.js](https://authjs.dev/) (Auth.js)
- [Better Auth](https://www.better-auth.com/docs) (Better Auth)

### Auth with a Hosted Provider (Clerk)

alternative · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/clerk

Use a hosted identity service for sign-in UI, user management and MFA, and understand the trade-offs of outsourcing auth.

Hosted providers like **Clerk** (also Auth0, Supabase Auth and Firebase Auth) handle sign-up, login, social providers, MFA and user management for you. You get polished UI components and fewer security responsibilities.

#### Integration
- Wrap your Next.js app with the provider and add prebuilt SignIn, SignUp and UserButton components.
- Use middleware to protect routes and server helpers to read the current user id.
- Store your own app data (applications, profiles) in PostgreSQL keyed by the provider's user id.
- Use **webhooks** to sync user creation and deletion into your database.

#### Trade-offs
- Faster to ship, with MFA, bot protection and session management included.
- Vendor lock-in and per-user pricing once you grow beyond the free tier.
- User data lives with a third party, which matters for data protection obligations such as India's DPDP Act.

#### Pitfalls
- Not verifying webhook signatures.
- Duplicating user profile data in two places without a clear source of truth.
- Assuming the provider does authorization for you; deciding what a user may do is still your job.

You are ready to move on when your portal uses a hosted provider for login, syncs users into PostgreSQL through a verified webhook, and enforces roles in your own code.

Key concepts: Prebuilt sign-in components, Middleware and server helpers, User sync webhooks, Organisations and roles, Pricing and lock-in, Supabase Auth or Firebase Auth.

Mini project: Integrate Clerk into a copy of your portal, sync users into PostgreSQL via a signed webhook, and write a short comparison of setup time, cost at 10,000 users and data ownership versus Auth.js.

Self-check: Your app stores applications keyed by user id, but users are managed by a hosted provider. How do you keep your database in sync when a user deletes their account?

Resources:
- [Clerk Documentation](https://clerk.com/docs) (Clerk)
- [Supabase Auth](https://supabase.com/docs/guides/auth) (Supabase)

### Authorization and Access Control

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/authorization-rbac

Decide what each user may see and do with roles, ownership checks and multi-tenant rules enforced on the server.

Most serious API vulnerabilities are authorization bugs: a logged-in user reads or changes data that belongs to someone else. Broken access control tops the OWASP Top 10.

#### Models
- **Role-based (RBAC)**: STUDENT, RECRUITER, PLACEMENT_OFFICER, ADMIN with defined permissions.
- **Ownership checks**: a student may edit only their own applications.
- **Multi-tenancy**: a recruiter sees only applicants for their own company's openings; a placement officer sees only their college.
- **Attribute-based** rules for finer control when roles are not enough.

#### Implementation
- Put checks in one place: a can(user, action, resource) helper or policy functions used by every handler and server action.
- Scope queries by the user: where: { id, studentId: user.id } instead of fetching by id and checking later.
- Return 404 rather than 403 when revealing a record's existence is itself a leak.

#### Testing it
Write tests that log in as user A and try to read and update user B's records. This is the IDOR (insecure direct object reference) test, and it catches real bugs.

#### Pitfalls
- Hiding buttons in the UI and calling it authorization.
- Trusting a role or userId sent in the request body.
- Sequential ids in URLs combined with missing ownership checks.

You are ready to move on when every mutation in your portal goes through a policy check, and an automated test proves a student cannot access another student's application.

Key concepts: Role-based access control, Ownership checks, Multi-tenant data scoping, Central policy functions, IDOR testing, Attribute-based access control, Row-level security in PostgreSQL.

Mini project: Add STUDENT, RECRUITER and PLACEMENT_OFFICER roles to your portal with a central policy module, scope every query by user or company, and write tests that attempt cross-user access.

Self-check: GET /applications/123 returns the application if the user is logged in. What is missing, and how would you fix it at the query level?

Resources:
- [OWASP Authorization Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html) (OWASP)
- [OWASP Top 10](https://owasp.org/www-project-top-ten/) (OWASP)
- [PostgreSQL Row Security Policies](https://www.postgresql.org/docs/current/ddl-rowsecurity.html) (PostgreSQL)

### Web Security Essentials

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/web-security

Defend a full-stack app against XSS, CSRF, injection, SSRF and secret leaks with sensible defaults and headers.

You do not need to be a security engineer, but you must not ship the classic bugs. Most are prevented by using frameworks correctly and a few deliberate settings.

#### The usual suspects
- **XSS**: attacker script runs in your page. React escapes output by default; danger comes from dangerouslySetInnerHTML, unsanitised markdown and URLs like javascript:. Add a **Content Security Policy**.
- **CSRF**: another site triggers actions using the user's cookies. SameSite cookies, Next.js server action origin checks and CSRF tokens for older setups protect you.
- **SQL injection**: avoided by ORMs and parameterised queries; stay careful with raw SQL.
- **SSRF**: your server fetches a URL supplied by the user and hits internal services. Validate and allowlist destinations.
- **Insecure file uploads**: check type and size, store outside your app server, and never execute uploads.

#### Defaults to set
- Security headers (helmet in Express, headers config in Next.js): CSP, HSTS, X-Content-Type-Options, frame protections.
- HTTPS everywhere.
- **Secrets** only in environment variables or a secret manager, never in the repo or the client bundle.
- Keep dependencies updated with Dependabot or Renovate and npm audit.

#### Pitfalls
- Disabling a security check because it was "annoying" during development.
- Prefixing a secret with NEXT_PUBLIC_ and shipping it to every browser.
- Logging tokens, passwords or full payment details.

You are ready to move on when you can name the OWASP Top 10 categories, show the protection for each one that applies to your portal, and get a clean result from a security headers scan.

Key concepts: XSS and Content Security Policy, CSRF and SameSite cookies, SQL injection, SSRF, Secure file uploads, Security headers, Secrets management, Dependency updates and audits.

Mini project: Run a security review of your portal against the OWASP Top 10: add a CSP and security headers, enable Dependabot, scan the client bundle for leaked secrets, and document each control in a SECURITY.md.

Self-check: React escapes output by default. Name two ways an XSS bug can still get into a React app.

Resources:
- [OWASP Top 10](https://owasp.org/www-project-top-ten/) (OWASP)
- [OWASP Cheat Sheet Series](https://cheatsheetseries.owasp.org/) (OWASP)
- [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (MDN)
- [PortSwigger Web Security Academy](https://portswigger.net/web-security) (PortSwigger)

## Testing the Whole Stack

Write fast unit tests, component tests, API integration tests against a real database and a few end-to-end tests for the flows that make money.

### Testing Fundamentals with Vitest

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/testing-basics

Learn what to test, how to structure tests, and how to write fast unit tests with Vitest for business logic.

Tests let you change code without fear. In interviews and internships, a project with meaningful tests stands out immediately.

#### The testing pyramid (or trophy)
- **Unit tests**: pure functions and services. Fast and many.
- **Integration tests**: several pieces together, like an API route with a real database.
- **End-to-end tests**: a real browser clicking through the app. Slow, so keep them for critical flows.
Many full-stack teams find integration tests give the most confidence per test.

#### Writing good tests
- Arrange, act, assert. One behaviour per test, with a name that reads like a sentence.
- Test behaviour, not implementation details, so refactors do not break tests.
- Cover edge cases: empty lists, invalid input, boundary values (CGPA exactly 7.0 for an eligibility rule).

#### Vitest
**Vitest** is fast, works with TypeScript and ESM out of the box, and has a Jest-compatible API (describe, it, expect, vi.fn). Use watch mode while coding and coverage reports to find untested branches, not as a target to game.

#### Pitfalls
- Mocking so much that the test only checks your mocks.
- Tests that depend on each other or on the current date without controlling it.
- Chasing 100 percent coverage instead of testing risky logic.

You are ready to move on when your eligibility and fee calculation logic has Vitest tests covering normal cases, edge cases and errors, all running in under a few seconds.

Key concepts: Unit, integration and E2E, Arrange, act, assert, Vitest basics, Mocks, spies and fakes, Fake timers and dates, Coverage reports, Jest.

Mini project: Write a placement eligibility module (CGPA cutoff, allowed branches, backlog limit, graduation year) and cover it with at least 15 Vitest tests, including edge cases.

Self-check: Your tests break every time you rename an internal helper even though behaviour is unchanged. What does that tell you about how they are written?

Resources:
- [Vitest Guide](https://vitest.dev/guide/) (Vitest)
- [The Testing Trophy and Testing Classifications](https://kentcdodds.com/blog/the-testing-trophy-and-testing-classifications) (Kent C. Dodds)
- [Jest](https://jestjs.io/docs/getting-started) (Jest)

### Component Testing with React Testing Library

recommended · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/component-testing

Test React components the way users use them: find elements by role and label, interact, and assert on what appears.

**React Testing Library** encourages tests that resemble real usage. Instead of checking internal state, you find a button by its accessible name, click it and check what the user sees.

#### Core ideas
- Render a component, then query with getByRole, getByLabelText and getByText. Role-based queries also nudge you toward accessible markup.
- Simulate interaction with **user-event** (typing, clicking, tabbing).
- Use findBy queries for things that appear asynchronously.
- Mock network calls at the boundary with **MSW** (Mock Service Worker) instead of mocking fetch everywhere.

#### What to test
- Forms: validation messages, disabled submit, success and error states.
- Conditional UI: empty, loading and error states.
- Interactive widgets: filters, tabs, modals.
Skip testing static markup and third-party library internals.

#### Server components
Async server components are harder to unit test; cover them with integration or end-to-end tests and keep their logic in plain functions you can unit test.

#### Pitfalls
- Querying by CSS class or test ids for everything.
- Snapshot tests of large trees that everyone updates without reading.
- Forgetting to await async UI, causing flaky tests.

You are ready to move on when your application form has tests for validation errors, a successful submit and a server error, using role-based queries and MSW.

Key concepts: render and screen queries, Role and label queries, user-event interactions, Async UI with findBy, Mocking APIs with MSW, Testing custom hooks.

Mini project: Write component tests for your internship filters and application form: filter results update, validation messages appear, submit is disabled while pending and server errors are shown, with API calls mocked by MSW.

Self-check: Why is getByRole('button', { name: 'Apply' }) usually a better query than a test id?

Resources:
- [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) (Testing Library)
- [Mock Service Worker](https://mswjs.io/docs/) (MSW)
- [Which query should I use?](https://testing-library.com/docs/queries/about/#priority) (Testing Library)

### API Integration Tests with a Real Database

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/api-integration-testing

Test HTTP endpoints end to end on the server with a real PostgreSQL test database, covering auth, validation and access control.

Integration tests send real HTTP requests to your API and let it talk to a real database. They catch the bugs unit tests miss: wrong queries, missing migrations, broken auth middleware.

#### Setup
- Run a separate **test database**, usually PostgreSQL in Docker or a Testcontainers instance.
- Apply migrations before the test run.
- Reset data between tests by truncating tables or wrapping each test in a transaction that is rolled back.
- Use **Supertest** for Express or Fastify's inject method to call routes without opening a port. For Next.js route handlers, call the exported functions with a Request object.

#### What to cover
- Happy paths for each endpoint.
- Validation errors return 400 with field messages.
- Unauthenticated requests get 401; other users' records give 403 or 404.
- Database constraints: duplicate applications return 409.

#### Test data
Use small factory functions (createStudent, createOpening) instead of giant shared fixtures, so each test sets up exactly what it needs.

#### Pitfalls
- Pointing tests at your development or, worse, production database.
- Tests that depend on run order or leftover data.
- Mocking the ORM in integration tests, which removes the point of them.

You are ready to move on when your API has integration tests for every route, including auth and cross-user access checks, running against a disposable PostgreSQL database.

Key concepts: Test database setup, Resetting state between tests, Supertest or inject, Testing auth and permissions, Factories for test data, Testcontainers.

Mini project: Add an integration test suite for your placement API with a Dockerised test database, factories, and tests for validation, auth, cross-user access and duplicate application conflicts.

Self-check: Two tests pass alone but fail when run together. What are the most likely causes?

Resources:
- [Supertest](https://github.com/ladjs/supertest) (ladjs)
- [Testcontainers for Node.js](https://node.testcontainers.org/) (Testcontainers)
- [Prisma: Integration testing](https://www.prisma.io/docs/orm/prisma-client/testing/integration-testing) (Prisma)

### End-to-End Testing with Playwright

recommended · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/e2e-playwright

Automate a real browser to test critical journeys such as signup, applying for an opening and payment, across devices.

**Playwright** drives Chromium, Firefox and WebKit to test your app as a user would: through the real UI, real API and real database.

#### What to cover
Keep E2E tests for the few journeys that must never break: signup and login, the main create flow (applying to an opening), and anything involving money. Ten solid E2E tests beat a hundred flaky ones.

#### Writing reliable tests
- Use role and label locators like page.getByRole('button', { name: 'Apply' }).
- Rely on Playwright's **auto-waiting** and web-first assertions instead of fixed sleeps.
- Log in once and reuse the saved **storage state** across tests.
- Seed known data before the run and isolate tests from each other.

#### Tooling
- Codegen records actions to bootstrap a test.
- The trace viewer shows screenshots, network and console for failed runs, which is invaluable in CI.
- Device emulation lets you test the mobile layout.

#### Pitfalls
- Using waitForTimeout to "fix" flakiness.
- Testing every edge case through the UI instead of at lower levels.
- Running E2E tests against shared environments where other people change data.

You are ready to move on when Playwright tests cover signup, login and applying to an opening on desktop and mobile viewports, and run headless in CI with traces on failure.

Key concepts: Locators and auto-waiting, Web-first assertions, Authentication state reuse, Test data seeding, Trace viewer, Mobile device emulation, Cypress.

Mini project: Write Playwright tests for signup, login, applying to an opening and withdrawing the application, running on desktop Chrome and a mobile viewport with traces captured on failure.

Self-check: A test passes locally but fails 1 in 10 times in CI. What would you check first, and what tool helps you see what happened?

Resources:
- [Playwright: Getting started](https://playwright.dev/docs/intro) (Playwright)
- [Playwright Best Practices](https://playwright.dev/docs/best-practices) (Playwright)
- [Cypress Documentation](https://docs.cypress.io/) (Cypress)

## Configuration, Containers and Deployment

Get your app onto the internet: environment configuration, Docker, choosing a hosting platform, managed PostgreSQL and custom domains.

### Environments, Config and Secrets

core · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/full-stack/environment-and-config

Run the same code in development, preview and production by keeping configuration in environment variables, validated at startup.

A deployable app reads everything that differs between environments from configuration, not from code. This is the core idea of the **Twelve-Factor App**.

#### Environments
- **Development** on your laptop with a local database.
- **Preview** deployments for each pull request, so reviewers can click through changes.
- **Production** with real users and data.
Each has its own database, secrets and URLs. Never point development at the production database.

#### Managing config
- Keep a committed .env.example listing every variable with dummy values; keep real .env files out of Git.
- Validate env vars at startup with Zod and fail fast on missing values.
- Store production secrets in the platform's environment settings or a secret manager.
- In Next.js, only NEXT_PUBLIC_ variables reach the browser, and they are baked in at build time.

#### Feature flags
Simple flags (an env variable or a database table) let you ship code turned off and enable it later, or roll out to one college first.

#### Pitfalls
- Hard-coded localhost URLs that break in production.
- Sharing one set of API keys across all environments.
- Changing an env var and forgetting to redeploy when the value is read at build time.

You are ready to move on when your app runs in development and production with different databases and keys, documented in .env.example and validated at boot.

Key concepts: Twelve-Factor config, Dev, preview and production, .env and .env.example, Validating env at startup, Build-time vs runtime variables, Secret managers, Feature flags.

Mini project: Refactor your project so every environment-specific value comes from a validated config module, add a complete .env.example, and set up separate development and production databases.

Self-check: You changed NEXT_PUBLIC_API_URL in the hosting dashboard but the site still calls the old URL. Why?

Resources:
- [The Twelve-Factor App](https://12factor.net/) (12factor.net)
- [Next.js Environment Variables](https://nextjs.org/docs/app/guides/environment-variables) (Next.js)

### Docker for Full-Stack Apps

recommended · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/full-stack/docker

Package your API and run PostgreSQL and Redis locally with Docker and Docker Compose, so every machine runs the same stack.

Docker packages your app with its runtime and dependencies into an **image** that runs the same everywhere. Even if you deploy to a platform that builds for you, Docker is the easiest way to run PostgreSQL and Redis locally.

#### Core concepts
- **Image**: a read-only template built from a Dockerfile.
- **Container**: a running instance of an image.
- **Volume**: persistent storage, so your local database survives restarts.
- **Port mapping**: expose a container port (5432) on your machine.

#### A good Node.js Dockerfile
- Start from an official slim Node LTS image.
- Copy package files first and install dependencies, so the layer is cached.
- Use a **multi-stage build**: build in one stage, copy only the output and production dependencies into a small final image.
- Run as a non-root user and add a .dockerignore (node_modules, .env, .git).

#### Docker Compose
One docker-compose.yml can start your API, PostgreSQL and Redis together with a single command, with environment variables and health checks. New teammates go from clone to running app in minutes.

#### Pitfalls
- Copying .env files or secrets into images.
- Huge images built from full base images with dev dependencies.
- Losing local data because no volume was configured.

You are ready to move on when docker compose up starts your API, PostgreSQL and Redis, and your API image is a multi-stage build under a few hundred megabytes.

Key concepts: Images, containers and volumes, Writing a Dockerfile, Layer caching, Multi-stage builds, Docker Compose, .dockerignore and non-root users, Health checks.

Mini project: Write a multi-stage Dockerfile for your API and a docker-compose.yml that runs the API, PostgreSQL and Redis with volumes and health checks, then document one-command setup in the README.

Self-check: Why copy package.json and install dependencies before copying the rest of your source code in a Dockerfile?

Resources:
- [Docker: Get started](https://docs.docker.com/get-started/) (Docker)
- [Docker Compose](https://docs.docker.com/compose/) (Docker)
- [Docker Roadmap](https://roadmap.sh/docker) (roadmap.sh)

### Deploying on Vercel

recommended · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/full-stack/vercel

Deploy a Next.js app with Git-based deploys, preview URLs per pull request, environment variables and edge caching.

**Vercel** is built by the team behind Next.js and is the fastest way to put a Next.js app online. Connect a GitHub repo and every push deploys.

#### How it works
- Pushing to main creates a **production** deployment; every pull request gets a **preview URL** you can share with reviewers.
- Pages and route handlers run as serverless or edge functions; static assets are served from a global CDN.
- Environment variables are set per environment (development, preview, production).
- **Instant rollback** to any previous deployment if something breaks.

#### Connecting a database
Use a hosted PostgreSQL (Neon, Supabase or another provider) with a **pooled** connection string, because each function instance may open its own connections. Run migrations in a build step or a CI job, not on every function start.

#### Know the limits
The free Hobby plan is for personal, non-commercial projects. Functions have execution time limits, and long-running WebSocket servers or heavy background work do not fit. Pair Vercel with a separate worker or service for those.

#### Pitfalls
- Exhausting database connections from serverless functions without pooling.
- Forgetting to set environment variables for the preview environment.
- Building commercial products on the Hobby plan.

You are ready to move on when your Next.js portal deploys from GitHub with preview URLs on pull requests, a managed PostgreSQL database and migrations applied automatically.

Key concepts: Git-based deployments, Preview deployments, Environment variables per environment, Serverless and edge functions, Database connection pooling, Rollbacks, Netlify.

Mini project: Deploy your Next.js placement portal to Vercel with a hosted PostgreSQL database, preview deployments on pull requests, and a CI step that applies migrations before production deploys.

Self-check: Your Vercel app works for a few users but starts failing with 'too many connections' during a traffic spike. What is happening and how do you fix it?

Resources:
- [Vercel Documentation](https://vercel.com/docs) (Vercel)
- [Deploying Next.js](https://nextjs.org/docs/app/getting-started/deploying) (Next.js)

### Deploying on Render or Railway

alternative · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/full-stack/render

Deploy long-running Node.js servers, background workers and PostgreSQL on a platform-as-a-service from a Git repo or Dockerfile.

Platforms like **Render** and Railway run your app as a long-lived server process rather than serverless functions. This suits Express or Fastify APIs, WebSockets and background workers.

#### What you deploy
- A **web service** from a Git repo (build and start commands) or a Dockerfile.
- A **background worker** for queues and scheduled jobs.
- A **managed PostgreSQL** and Redis instance in the same region.
- **Cron jobs** for periodic tasks like sending deadline reminders.

#### Doing it properly
- Bind to the PORT environment variable provided by the platform.
- Add a **health check** endpoint so the platform knows when your app is ready.
- Run migrations in a pre-deploy command.
- Use an infrastructure file (render.yaml) to describe services in code.

#### Trade-offs
Long-running servers have no cold-start function limits and can hold WebSocket connections. Free tiers often sleep after inactivity, so the first request is slow; paid instances stay warm. Choose a region close to your users (Singapore or Mumbai where available).

#### Pitfalls
- Hard-coding port 3000.
- Running the free sleeping tier for a demo you show to recruiters without warming it first.
- Storing uploaded files on the server's local disk, which is lost on redeploy.

You are ready to move on when your Express or Fastify API, a worker and PostgreSQL are deployed from Git with health checks, pre-deploy migrations and environment-specific config.

Key concepts: Web services from Git or Docker, Background workers, Managed PostgreSQL and Redis, Health checks, Pre-deploy migrations, Infrastructure as code (render.yaml), Railway or Fly.io.

Mini project: Deploy your Express or Fastify API with a background worker and managed PostgreSQL on Render, using a health check endpoint, pre-deploy migrations and a render.yaml blueprint.

Self-check: Why would you lose student resume uploads after a redeploy if you saved them to the server's disk, and where should they go instead?

Resources:
- [Render Documentation](https://render.com/docs) (Render)
- [Railway Docs](https://docs.railway.com/) (Railway)
- [Fly.io Docs](https://fly.io/docs/) (Fly.io)

### Managed Databases, Domains and HTTPS

core · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/full-stack/managed-postgres-and-domains

Run production PostgreSQL with backups and pooling, and put your app on a custom domain with HTTPS.

A real launch needs a database you will not lose and a domain people can remember.

#### Managed PostgreSQL
Providers like Neon, Supabase, Render and the large clouds give you PostgreSQL with backups, monitoring and connection pooling.
- Turn on **automated backups** and actually test a restore once.
- Use the **pooled** connection string for app traffic and a direct one for migrations.
- Pick a region near your app servers to cut latency.
- Use **branching** or separate databases for preview environments, never production.

#### Domains and DNS
Buy a domain from a registrar, then point it at your host: an A or CNAME record for the root or a www subdomain, as your platform instructs. Changes can take time to propagate. Set up a redirect so only one canonical URL exists.

#### HTTPS
Platforms like Vercel and Render issue and renew TLS certificates automatically through Let's Encrypt. Enable HSTS once everything works on HTTPS.

#### Email deliverability
If your app sends emails (OTP, application updates), configure SPF, DKIM and DMARC records for your domain, or your emails will land in spam.

#### Pitfalls
- No backups, or backups never tested.
- Running migrations against production from your laptop.
- Forgetting to renew the domain.

You are ready to move on when your project runs on your own domain over HTTPS, with daily database backups you have restored at least once.

Key concepts: Managed PostgreSQL providers, Backups and restore tests, Pooled vs direct connections, DNS records for custom domains, Automatic HTTPS and HSTS, SPF, DKIM and DMARC, Database branching.

Mini project: Attach a custom domain to your deployed portal with HTTPS, configure email authentication records for transactional email, and perform and document a backup restore drill.

Self-check: Why use a pooled connection string for app traffic but a direct connection for running migrations?

Resources:
- [Supabase Docs](https://supabase.com/docs) (Supabase)
- [Neon Docs](https://neon.com/docs/introduction) (Neon)
- [What is DNS?](https://www.cloudflare.com/learning/dns/what-is-dns/) (Cloudflare)

## CI, Observability and Performance

Automate checks on every push, see what your app is doing in production, and keep it fast for real users on real networks.

### CI/CD with GitHub Actions

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/ci-cd

Run lint, type checks, tests and builds on every pull request, and deploy automatically when main is green.

**Continuous integration** means every push is checked automatically. **Continuous delivery** means a green main branch can go to production without manual steps. Together they let small teams ship daily without fear.

#### A typical pipeline
1. Install dependencies with a cached npm ci.
2. Lint and type-check (tsc --noEmit).
3. Run unit and integration tests, with PostgreSQL as a **service container**.
4. Build the app.
5. On main only: apply migrations and deploy (or let Vercel or Render deploy on push once checks pass).

#### GitHub Actions basics
- Workflows live in .github/workflows as YAML files.
- **Triggers**: push, pull_request, schedule, manual dispatch.
- **Jobs** run on fresh runners; **steps** run commands or reusable actions.
- **Secrets** are stored in repository settings and injected as environment variables.
- **Branch protection** requires checks to pass before merging.

#### Keep it fast
Cache dependencies, run independent jobs in parallel, and keep slow E2E tests in a separate job. A pipeline that takes 20 minutes gets ignored.

#### Pitfalls
- Printing secrets in logs.
- Flaky tests that everyone reruns until green, which hides real failures.
- Deploying from a laptop instead of from CI.

You are ready to move on when every pull request on your project runs lint, type checks, tests against PostgreSQL and a build, and main deploys automatically only when all checks pass.

Key concepts: Workflows, jobs and steps, Triggers: push and pull_request, Dependency caching, Service containers for PostgreSQL, Secrets in CI, Branch protection, Automated deploys and migrations, Dependabot.

Mini project: Create a GitHub Actions workflow for your portal that caches dependencies, lints, type-checks, runs tests against a PostgreSQL service container, builds, and blocks merges to main unless all checks pass.

Self-check: Why run tests against a real PostgreSQL service in CI instead of mocking the database?

Resources:
- [GitHub Actions documentation](https://docs.github.com/en/actions) (GitHub)
- [Building and testing Node.js](https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-nodejs) (GitHub)
- [DevOps Roadmap](https://roadmap.sh/devops) (roadmap.sh)

### Logging, Error Tracking and Monitoring

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/logging-and-monitoring

Know when production breaks before users tell you, with structured logs, error tracking, uptime checks and basic metrics.

Once real students use your app, you cannot attach a debugger. **Observability** is how you find out what happened.

#### Structured logs
- Log JSON with a level, message, timestamp, request id and user id (never passwords or tokens). **Pino** is a fast, popular choice for Node.js.
- Log at boundaries: incoming request, outgoing response with status and duration, and errors with stack traces.
- Ship logs to a place you can search (your platform's log viewer, Better Stack, Grafana Loki).

#### Error tracking
**Sentry** (or a similar tool) captures exceptions from both browser and server with stack traces, the release version and breadcrumbs of what the user did. Upload source maps so minified frontend errors are readable.

#### Metrics and uptime
- An **uptime check** on a health endpoint, alerting you by email or Slack.
- Basic metrics: request rate, error rate, latency (p50 and p95), database connection usage.
- **OpenTelemetry** is the standard for traces and metrics when you outgrow the basics.

#### Alerting
Alert on symptoms users feel (error rate up, site down, latency high), not on every log line. Too many alerts get ignored.

#### Pitfalls
- console.log debugging left in production with no structure.
- Logging personal data such as phone numbers and Aadhaar details.
- Discovering an outage from a WhatsApp message.

You are ready to move on when a deliberate error in production shows up in your error tracker with a readable stack trace and request id, and your uptime monitor alerts you when the app goes down.

Key concepts: Structured JSON logging, Request ids and correlation, Error tracking with Sentry, Source maps, Uptime checks, Latency and error rate metrics, OpenTelemetry tracing, Alerting without noise.

Mini project: Add Pino structured logging with request ids, Sentry on client and server with source maps, and an uptime monitor with alerts to your deployed portal. Trigger a test error and trace it from alert to log line.

Self-check: A student reports 'the apply button did nothing' at 9:42 pm. Which tools and fields would you use to find out what happened?

Resources:
- [Sentry Documentation](https://docs.sentry.io/) (Sentry)
- [Pino](https://getpino.io/) (Pino)
- [OpenTelemetry Documentation](https://opentelemetry.io/docs/) (OpenTelemetry)

### Web Performance and Core Web Vitals

recommended · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/web-performance

Measure and improve load speed and responsiveness with Core Web Vitals, smaller bundles, image optimisation and caching.

Many of your users are on mid-range Android phones and patchy 4G. Performance is a feature, and Google uses Core Web Vitals in search ranking.

#### Core Web Vitals
- **LCP** (Largest Contentful Paint): how fast the main content appears. Aim for under 2.5 seconds.
- **INP** (Interaction to Next Paint): how quickly the page responds to taps and clicks.
- **CLS** (Cumulative Layout Shift): how much the layout jumps around while loading.

#### Measuring
Use **Lighthouse** and PageSpeed Insights for lab data, and real user monitoring (Vercel Analytics or the web-vitals library) for field data. Always test with mobile throttling.

#### Common fixes
- Ship less JavaScript: keep components on the server, lazy-load heavy client widgets, and check bundle size before adding libraries.
- Optimise images with next/image, modern formats and correct sizes.
- Load fonts with next/font to avoid layout shift.
- Set width and height (or aspect ratio) on media to prevent CLS.
- Cache static assets aggressively and API responses where safe.
- Fix slow backend queries; a fast frontend cannot hide a 3-second API.

#### Pitfalls
- Optimising only on a fast laptop with good Wi-Fi.
- Adding a large charting or date library for one small feature.
- Chasing a perfect Lighthouse score instead of real user metrics.

You are ready to move on when your public pages hit good Core Web Vitals on a throttled mobile profile, and you can explain the biggest improvement you made and why it worked.

Key concepts: LCP, INP and CLS, Lighthouse and PageSpeed Insights, Real user monitoring, Bundle size and code splitting, Image and font optimisation, HTTP caching, Bundle analyzer.

Mini project: Run Lighthouse on your portal with mobile throttling, fix the top three issues (images, JavaScript size, layout shift), and publish a before and after report in the README.

Self-check: Your LCP is 5 seconds on mobile. Name three likely causes and how you would confirm each.

Resources:
- [Web Vitals](https://web.dev/articles/vitals) (web.dev)
- [Learn Performance](https://web.dev/learn/performance) (web.dev)
- [Lighthouse overview](https://developer.chrome.com/docs/lighthouse/overview) (Chrome for Developers)

## Beyond CRUD: Real-World Features

Features that make projects feel like real products: file uploads, realtime updates, background jobs and payments.

### File Uploads and Object Storage

recommended · advanced · about 4 h · https://www.internhack.in/roadmaps/tracks/full-stack/file-uploads

Upload resumes and images safely using object storage, signed URLs, validation and image processing.

Resumes, profile photos and offer letters should not live on your server's disk or in your database. They belong in **object storage** such as Amazon S3, Cloudflare R2, Supabase Storage or Cloudinary for images.

#### The signed upload pattern
1. The client asks your API for permission to upload, with file name, type and size.
2. Your server checks auth and validation, then returns a short-lived **pre-signed URL**.
3. The browser uploads directly to storage, bypassing your server.
4. The client confirms, and you save the file key (not a public URL) in PostgreSQL.

#### Safety
- Validate type and size on the server, not just in the browser input.
- Keep private files (resumes) in private buckets and serve them through signed download URLs that expire.
- Generate your own random keys; never trust the user's file name.
- Scan or process images server-side (resize, strip metadata) when needed.

#### Pitfalls
- Public buckets containing personal documents.
- Uploading through serverless functions that hit body size limits.
- Storing files as base64 blobs in the database.

You are ready to move on when students can upload a PDF resume through a signed URL to a private bucket, and only the student and authorised recruiters can download it.

Key concepts: Object storage basics, Pre-signed upload URLs, Private files and signed downloads, Type and size validation, Image resizing and CDNs, Cloudinary or Supabase Storage.

Mini project: Add resume upload to your portal using pre-signed URLs to a private S3-compatible bucket (Cloudflare R2 or Supabase Storage), with server-side validation and expiring download links for recruiters.

Self-check: Why upload directly from the browser to storage using a signed URL instead of streaming the file through your API?

Resources:
- [Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) (AWS)
- [Cloudflare R2](https://developers.cloudflare.com/r2/) (Cloudflare)
- [OWASP File Upload Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html) (OWASP)

### Realtime Features with WebSockets

optional · advanced · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/realtime

Push live updates such as notifications, chat and status changes using WebSockets, Server-Sent Events or a managed service.

Some features need the server to push data: "your application was shortlisted", a live interview chat, or a contest leaderboard.

#### Options
- **Polling**: the client asks every few seconds. Simple and often good enough.
- **Server-Sent Events (SSE)**: one-way server-to-client stream over HTTP. Great for notifications and progress updates.
- **WebSockets**: full two-way connection. Needed for chat, collaborative editing and games. **Socket.IO** adds rooms, reconnection and fallbacks.
- **Managed services** (Pusher, Ably, Supabase Realtime) work well with serverless hosting where you cannot hold connections.

#### Design concerns
- **Authentication** on connect, and authorization for each room or channel.
- **Scaling**: with multiple server instances, use a pub/sub layer like Redis so a message reaches users connected to any instance.
- **Reconnection** and missed messages: store events in the database and let clients catch up.

#### Pitfalls
- Using WebSockets when polling every 30 seconds would do.
- Trying to hold WebSocket connections inside serverless functions.
- Broadcasting private data to a room without checking membership.

You are ready to move on when your portal shows live application status updates to students, authenticated per user, and still works after a page refresh or reconnect.

Key concepts: Polling vs SSE vs WebSockets, Socket.IO rooms and events, Authenticating connections, Scaling with Redis pub/sub, Reconnection and catch-up, Managed realtime services.

Mini project: Build a live notifications feature: when a recruiter changes an application status, the student sees a toast instantly via SSE or Socket.IO, with missed notifications loaded from the database on reconnect.

Self-check: You scale your WebSocket server to two instances and some users stop receiving messages. Why, and what fixes it?

Resources:
- [The WebSocket API](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) (MDN)
- [Socket.IO Documentation](https://socket.io/docs/v4/) (Socket.IO)
- [Using server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) (MDN)

### Background Jobs, Queues and Scheduled Tasks

recommended · advanced · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/background-jobs

Move slow or unreliable work like emails, PDF generation and reminders out of the request into retryable background jobs.

A request should return in well under a second. Anything slow or unreliable (sending emails, generating offer letter PDFs, calling a flaky third-party API) belongs in a **background job**.

#### The pattern
1. The request handler validates input, writes to the database and **enqueues** a job.
2. A separate **worker** process picks up the job and does the work.
3. Failed jobs are **retried** with backoff, and permanently failed ones are kept for inspection.

#### Tools
- **BullMQ** with Redis is the common choice for Node.js.
- PostgreSQL-backed queues (pg-boss, Graphile Worker) avoid adding Redis.
- Hosted options (Inngest, Trigger.dev, QStash) fit serverless apps.
- **Cron jobs** or scheduled jobs handle periodic tasks like daily deadline reminders.

#### Making jobs safe
- Jobs must be **idempotent**: running twice should not send two offer letters. Store a "sent" flag or use unique job ids.
- Pass ids, not whole objects, and re-read fresh data inside the job.
- Monitor queue length and failed jobs.

#### Pitfalls
- Sending emails inline in the request, so a slow SMTP server slows every signup.
- Fire-and-forget promises in serverless functions that get killed before finishing.
- No retry limit, so a broken job loops forever.

You are ready to move on when your portal sends application emails and a daily deadline digest through a queue with retries, and a failed job is visible and replayable.

Key concepts: Why move work off the request, Queues and workers, Retries and backoff, Idempotent jobs, BullMQ with Redis, PostgreSQL-backed queues, Scheduled and cron jobs, Transactional email providers.

Mini project: Add a job queue to your portal: send confirmation emails on application, generate a PDF summary for placement officers, and run a daily 8 am deadline reminder, all with retries and a simple failed-jobs view.

Self-check: A worker crashes after sending an email but before marking the job complete. What happens on retry, and how do you prevent a duplicate email?

Resources:
- [BullMQ Documentation](https://docs.bullmq.io/) (BullMQ)
- [pg-boss](https://github.com/timgit/pg-boss) (pg-boss)
- [Inngest Documentation](https://www.inngest.com/docs) (Inngest)

### Payments with Razorpay

optional · advanced · about 5 h · https://www.internhack.in/roadmaps/tracks/full-stack/payments-razorpay

Accept UPI, cards and netbanking with Razorpay: create orders on the server, verify signatures and handle webhooks reliably.

Payments turn a project into a product. In India, **Razorpay** is a common gateway that supports UPI, cards, netbanking and wallets. Stripe and Cashfree follow the same ideas.

#### The flow
1. Your server creates an **order** with the amount in paise and a receipt id, and saves it as PENDING.
2. The client opens Razorpay Checkout with the order id; the user pays by UPI or card.
3. The client receives a payment id and **signature**; your server **verifies the signature** with your secret before trusting it.
4. A **webhook** from Razorpay confirms the final status (captured or failed), and you update the order.

#### Rules that prevent real losses
- Never trust an amount sent from the client; compute it on the server.
- Verify webhook signatures and make handlers **idempotent**, since webhooks can arrive more than once or out of order.
- Treat the webhook as the source of truth; the user may close the tab before redirecting.
- Store amounts as integers in paise.
- Use **test mode** keys during development and keep live keys in production secrets only.

#### Pitfalls
- Marking an order paid based on the client callback alone.
- Not handling pending UPI payments that settle minutes later.
- Logging card or full payment details.

You are ready to move on when users can pay a mock Rs 99 premium fee in test mode, the order is marked paid only after signature verification, and duplicate webhooks do not double-credit.

Key concepts: Orders and amounts in paise, Checkout integration, Signature verification, Webhooks as source of truth, Idempotent webhook handlers, Test vs live mode, Stripe or Cashfree.

Mini project: Add a Rs 99 'premium profile' purchase to your portal using Razorpay test mode: server-created orders, client checkout, signature verification and an idempotent webhook handler that updates the order status.

Self-check: Why must your server verify the payment signature and rely on webhooks instead of trusting the success callback in the browser?

Resources:
- [Razorpay Docs](https://razorpay.com/docs/) (Razorpay)
- [Stripe Documentation](https://docs.stripe.com/) (Stripe)

## Portfolio Projects and Getting Hired

Ship three progressively harder full-stack projects that prove real skills, then turn them into a portfolio, resume and interview stories.

### Project 1: A Polished Full-Stack CRUD App

core · intermediate · about 30 h · https://www.internhack.in/roadmaps/tracks/full-stack/project-crud-app

Ship a complete, deployed CRUD application with auth, validation, a real database and tests, built and finished end to end.

Your first portfolio project proves you can take an idea from empty repo to a live URL. Keep the scope small and the quality high; a finished small app beats an abandoned ambitious one.

#### Suggested ideas
- A college **placement tracker**: students log applications, rounds and offers; a dashboard shows status and stats.
- A **hostel mess feedback** app with daily menus, ratings and an admin view.
- A **study group finder** for your campus with subjects, timings and join requests.

#### Minimum bar
- Next.js App Router with server components and server actions, or a React frontend with a separate API.
- PostgreSQL with Prisma or Drizzle, migrations and a seed script.
- Email or Google login, and every record scoped to its owner.
- Zod validation on every input, loading and error states in the UI.
- Unit tests for core logic and a few integration tests.
- Deployed on a public URL with a README containing screenshots, architecture notes and setup steps.

#### Pitfalls
- Following a tutorial line by line and calling it your project. Change the domain and add your own features.
- No README, no screenshots, no live link.
- Leaving test data like "asdf" visible on the deployed site.

You are ready to move on when a stranger can open your live link, sign up, use every feature without errors, and set up the repo locally from the README alone.

Key concepts: Scope a small, finishable idea, Data model and migrations, Auth and ownership checks, Validation and error states, Tests for core logic, Deployment and custom domain, README with screenshots.

Mini project: Build and deploy a placement tracker where students log applications and interview rounds, see a status dashboard with stats, and export their history as CSV.

Self-check: Can you explain every major technical decision in your project (database schema, auth approach, hosting) and one thing you would change with more time?

Resources:
- [Full Stack Open](https://fullstackopen.com/en/) (University of Helsinki)
- [The Odin Project: Full Stack JavaScript](https://www.theodinproject.com/paths/full-stack-javascript) (The Odin Project)
- [Full Stack Developer Roadmap](https://roadmap.sh/full-stack) (roadmap.sh)

### Project 2: A Multi-Role Product with Payments or Uploads

core · advanced · about 45 h · https://www.internhack.in/roadmaps/tracks/full-stack/project-auth-saas

Build a multi-role app with role-based access, file uploads or payments, background jobs, CI and monitoring, like a small real SaaS.

The second project shows you can handle the hard parts real companies care about: several user types, money or files, and production operations.

#### Suggested ideas
- A **mini placement portal**: students, recruiters and a placement officer, with resume uploads, openings, application pipelines and email notifications.
- A **college event ticketing** app: organisers create events, students buy passes via Razorpay test mode, QR codes are checked at entry.
- A **tuition or coaching manager**: teachers, students and parents, with fee tracking in rupees and attendance.

#### Minimum bar
- At least two roles with server-side policy checks and tests proving cross-user access is blocked.
- One of: signed-URL file uploads to private storage, or Razorpay payments with verified webhooks.
- A background job (emails or reminders) with retries.
- CI running lint, type checks and tests on every pull request.
- Error tracking and structured logs in production.
- A short architecture diagram in the README.

#### Pitfalls
- Building every feature halfway. Finish the core flow for each role first.
- Skipping the boring operational parts (CI, monitoring), which are exactly what makes this project stand out.
- Using real personal data in demos. Seed realistic fake data instead.

You are ready to move on when the app is live with demo accounts for each role, the core flow works end to end, and you can walk an interviewer through the architecture and one bug you debugged in production.

Key concepts: Multiple roles and policies, File uploads or payments, Background jobs and email, CI on every pull request, Error tracking in production, Demo accounts and seed data, Architecture diagram.

Mini project: Build a mini placement portal with student, recruiter and placement officer roles, resume uploads to private storage, application status emails via a queue, CI and Sentry, deployed with demo logins for each role.

Self-check: Which part of your system would fail first if 5,000 students logged in at the same time on results day, and how would you know?

Resources:
- [System Design Primer](https://github.com/donnemartin/system-design-primer) (GitHub)
- [Backend Developer Roadmap](https://roadmap.sh/backend) (roadmap.sh)
- [Razorpay Docs](https://razorpay.com/docs/) (Razorpay)

### Project 3: Realtime Feature or Open-Source Contribution

core · advanced · about 35 h · https://www.internhack.in/roadmaps/tracks/full-stack/project-realtime-or-oss

Stretch further with either a realtime collaborative app or meaningful contributions to an open-source full-stack project.

The third project shows depth or teamwork. Pick the path that fits your goals.

#### Path A: a realtime app
- A **live quiz or coding contest** platform for your college club with a realtime leaderboard.
- A **collaborative notes** or kanban board for project teams.
- An **interview practice room** with chat and a shared timer.
Show WebSockets or SSE with authentication, reconnection handling and data persisted in PostgreSQL.

#### Path B: open source
Contributing to a real codebase is what jobs look like: reading unfamiliar code, following conventions and getting reviews.
- Pick an active TypeScript or Next.js project with "good first issue" labels.
- Start with documentation, tests or small bugs, then take on a feature.
- Programmes like **GSoC**, Hacktoberfest and local initiatives give structure and visibility.
Aim for several merged pull requests in the same project, not one-line changes across twenty.

#### Pitfalls
- Spam pull requests that maintainers close, which look worse than none.
- Realtime features without auth checks on channels.
- Starting Path B without reading the contributing guide.

You are ready to move on when you have either a live realtime app with a demo video, or at least three merged, substantive pull requests you can discuss in detail.

Key concepts: Realtime app with auth, Persisting realtime events, Finding a good OSS project, Reading contributing guides, Substantive merged pull requests, GSoC and Hacktoberfest, Demo video.

Mini project: Either build a live coding-quiz platform for your college club with a realtime leaderboard, or land three merged pull requests in one active open-source TypeScript project and write a blog post about the experience.

Self-check: Can you describe a code review comment you received, what you changed, and what you learned from it?

Resources:
- [Good First Issue](https://goodfirstissue.dev/) (goodfirstissue.dev)
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) (Open Source Guides)
- [Google Summer of Code](https://summerofcode.withgoogle.com/) (Google)

### Portfolio, Resume and Full-Stack Interviews

core · advanced · about 25 h · https://www.internhack.in/roadmaps/tracks/full-stack/portfolio-and-interviews

Present your projects with a portfolio site and a one-page resume, and prepare for DSA rounds, machine coding and system design basics.

Strong projects only help if people can see and understand them. This step turns your work into interview calls.

#### Portfolio and GitHub
- A simple portfolio site (built with your own stack) showing three projects with live links, screenshots, your role and the stack.
- Pinned repositories with clean READMEs, and a GitHub profile README.
- One or two short write-ups or blog posts about a hard problem you solved.

#### Resume
One page, with projects written as impact: "Built a placement portal used by 300 students in my college; cut application tracking time with automated status emails." Include the stack, live links and GitHub. Tailor it for on-campus placements and off-campus applications.

#### Interview preparation
- **DSA rounds**: arrays, strings, hashing, two pointers, trees and graphs at a steady weekly pace.
- **Machine coding rounds**: build a small app (a todo, a typeahead, a kanban) in 60 to 90 minutes with clean components.
- **Full-stack and system design basics**: design a URL shortener or a job board API; discuss schema, indexes, caching, auth and scaling.
- **Project deep dives**: be ready to explain every decision and trade-off.

#### Pitfalls
- Listing technologies you cannot discuss.
- Ten tutorial clones instead of three solid projects.
- Applying only through job portals without referrals or reaching out to engineers.

You are ready when you can present each project in two minutes, solve medium DSA problems regularly, and complete a timed machine coding exercise with working, readable code.

Key concepts: Portfolio site, GitHub profile and READMEs, Impact-focused resume, DSA practice, Machine coding rounds, System design basics, Project deep-dive stories, Referrals and outreach.

Mini project: Build and deploy your portfolio site, rewrite your resume with impact bullets for all three projects, and complete two timed mock machine coding rounds and one mock system design discussion with a friend.

Self-check: Pick your strongest project. Can you explain its architecture, the hardest bug you fixed and how you would scale it, in under five minutes?

Resources:
- [Tech Interview Handbook](https://www.techinterviewhandbook.org/) (Tech Interview Handbook)
- [System Design Primer](https://github.com/donnemartin/system-design-primer) (GitHub)
- [NeetCode](https://neetcode.io/) (NeetCode)
- [Chai aur Code](https://www.youtube.com/@chaiaurcode) (YouTube)

## Related

- [Career roadmaps](https://www.internhack.in/roadmaps)
