Contents
Nine parts, Book 2: DSA Patterns, and the reference pages. The whole book is free to read here — 166 chapters and 734 interview questions.
Before You Start
Part 1 — Foundations
- Overview
- JavaScript Foundations
- Data Types, Variables and Built-ins
- Scope and Closures
- The
thisKeyword - Prototypes and Inheritance
- Promises, Async/Await and Errors
- The Event Loop
- TypeScript
- TypeScript Basic Types, Literals and Enums
- Interfaces and Type Aliases
- TypeScript Generics
- TypeScript Type Guards
- TypeScript Advanced and Utility Types
- TypeScript at Scale
- OOP and Design Patterns
- OOP and Composition over Inheritance
- SOLID Principles
- Design Patterns in TypeScript
Part 2 — The Browser Platform
- Overview
- HTML and CSS
- Semantic HTML
- Advanced CSS
- Container Queries and Cascade Layers
- Animation and View Transitions
- Browser APIs
- Web Storage and IndexedDB
- Cookies and SameSite
- The Observer APIs
- Web Workers and the Main Thread
- Service Workers, Caching and Offline
- Internationalisation and the Intl APIs
- Accessibility
- Why Accessibility, and the Law
- The Accessibility Tree
- ARIA, and When Not to Use It
- Keyboard and Focus Management
- Accessible Forms and Error Messaging
Part 3 — The Modern Frontend Stack
- Overview
- React
- The React Mental Model
- Hooks in Depth
- useEffect and When Not to Use It
- Component Composition Patterns
- Server Components and Client Components
- Suspense, Streaming and Error Boundaries
- Actions and Forms
- Performance, Transitions and the Compiler
- React and TypeScript at Scale
- Next.js
- App Router Mental Model
- Data Fetching and Caching
- Server Actions
- Rendering in Next.js
- Middleware, Runtimes and Deployment
- Auth Patterns
- Route Handlers and the BFF
- Svelte
- The Runes Model, Components and Snippets
- SvelteKit Routing and Loading
- SvelteKit Form Actions
- Rendering
- The Rendering Spectrum and the Cost of Hydration
- Streaming HTML
- Choosing a Rendering Strategy per Route, with SEO
- Edge Versus Origin Rendering
- Choosing a Meta-Framework
- State Management
- The Four Kinds of State
- Server State with TanStack Query
- Client State and Signals
- Form State
- URL as State
- Tooling
- Modules and Bundling
- Vite, Rust Bundlers and the Dev Loop
- Monorepos
- Type-Checking and Linting at Scale
- Styling Strategy
Part 4 — Frontend at Scale
- Overview
- Frontend Architecture
- Frontend Architecture Patterns
- Micro-Frontends
- Design Systems, Dependencies and Upgrades
- Reviewing AI-Generated Code
- Web Performance
- Core Web Vitals
- Loading, Code Splitting and Bundle Budgets
- Caching and Asset Delivery
- Measuring in Production
- Frontend Security
- XSS Prevention and Untrusted Input
- Content Security Policy and Security Headers
- Frontend Testing
- Testing Strategy
- Writing the Tests: Vitest and React Testing Library
- Frontend Integration Testing
- End-to-End, Visual and Contract Testing with Playwright
- Testing Accessibility
Part 5 — Backend for Frontend Engineers
- Overview
- Node.js
- The Node.js Event Loop, Async and Errors
- Node.js Performance, Streams and Scaling
- Express, Hono and Edge Runtimes
- API Design
- REST Best Practices and Versioning
- GraphQL, tRPC and Typed API Choices
- Rate Limiting
- Real-Time and Streaming APIs
- Testing a Node Service
- SQL and Relational Data
- SQL Fundamentals and Schema Design
- Indexes, Query Plans, ORMs and Migrations
- Transactions and Concurrency
- NoSQL and Caching
- Choosing a Non-Relational Store: Documents and Redis
- Backend Security
- Credentials, Sessions, CORS and CSRF
- OAuth, OIDC and Authorisation
- Input Validation and Injection
Part 6 — System Design
- Overview
- System Design Fundamentals
- Driving the Design Round, Backend and Frontend
- Back-of-Envelope Estimation
- Scalability, Latency and Throughput
- Reliability, Consistency and CAP
- Building Blocks
- Load Balancing
- Caching
- Content Delivery Network
- Queues, Async Work and WebSockets
- Service Boundaries and the API Gateway
- Resilience Patterns
- Data at Scale
- Choosing a Datastore and Replicating It
- Sharding and Transactions at Scale
- Frontend System Design
- Frontend Real-Time Features
- Offline-First Architecture
- Frontend Authentication
- Case Studies
- Design a URL Shortener
- Design a Collaborative Document Editor
- Design an Infinite Feed
Part 7 — AI Engineering
- Overview
- Foundations
- How LLMs Behave and How to Choose One
- Prompting as Engineering
- Context Engineering
- Integration
- Calling an LLM from TypeScript
- Streaming Responses
- Structured Output
- Tool Calling and the Tool Surface
- MCP (Model Context Protocol)
- RAG
- When RAG, When Fine-Tune, When Neither
- Ingestion and Chunking
- Embeddings, Vector Stores and Retrieval
- Agents
- What an Agent Is, and When to Use More Than One
- Memory, State and Long-Running Work
- Production
- Evals, Retrieval Metrics and Error Analysis
- Observability and Cost Engineering
- Guardrails and Safety
- Prompt Injection
- AIUX
- Latency and Generative UI
- Trust, Correctness and Failure States
- AI in Interviews
Part 8 — Ship and Operate
- Overview
- Version Control with Git
- Git Fundamentals and Recovery
- Branching, Review and Repository Strategy
- Continuous Integration and Delivery
- CI/CD Fundamentals
- Container Images: Building and Hardening
- GitHub Actions and Pipeline Security
- Observability
- Monitoring and Observability Fundamentals
- Metrics, Dashboards and Alerting
- Cloud Essentials
- Cloud Fundamentals, Storage and Delivery
- Serverless Functions
- Deployment
- Platform Deploys and Preview Environments
- Deployment Strategies, Rollback and Feature Flags
Part 9 — The Human Layer
- Overview
- Behaviour and Ways of Working
- The STAR Framework and the Story Bank
- Leadership, Influence and Saying No
- Problem Solving, Challenges and Failure
- Ways of Working and Engineering Culture
- Communication
- Explaining and Thinking Aloud
- Written Communication
- The AI-Assisted Interview
Appendix — DSA Patterns
- Overview
- Time and Space Complexity
- Prefix Sum
- Two Pointers
- Sliding Window
- Fast and Slow Pointers
- In-Place Linked List Reversal
- Monotonic Stack
- Top K Elements
- Overlapping Intervals
- Modified Binary Search
- Binary Tree Traversal
- Depth-First Search
- Breadth-First Search
- Backtracking
- Dynamic Programming
- Graph Algorithms
- DSA Question Index