Frontend Engineering
How does user intent become interactive, accessible, performant pixels in a browser — and how do frontend architecture, browser internals, state, networking, rendering and delivery all interact? Not a React tutorial and not a CSS reference.
Your path through Frontend Engineering
Start with these 5 lessons
Then follow the stages in order
Each stage builds on the ones before it. Labs and simulators sit right after the lessons they exercise. Open a stage to see its lessons. Full roadmap with goals →
Structure, style and the object model0 of 30 lessons done
- The Browser Is a RuntimeFoundation≈ 15 min
- What Happens When You Open a WebsiteFoundation≈ 15 min
- The Multi-Process BrowserFoundation≈ 10 min
- The Frontend Reasoning LoopFoundation≈ 10 min
- Origins and the SandboxFoundation≈ 10 min
- Semantics Are BehaviourFoundation≈ 15 min
- Document Structure and Reading OrderFoundation≈ 15 min
- What Native Elements Already DoFoundation≈ 20 min
- The Head: Metadata That Changes RenderingFoundation≈ 15 min
- Div Soup: How It Happens and What It CostsFoundation≈ 15 min
- The DOM Is Not Your HTMLFoundation≈ 15 min
- What a Mutation CostsFoundation≈ 15 min
- Queries, Live Collections and Stale ReferencesFoundation≈ 15 min
- Node Identity Across UpdatesFoundation≈ 15 min
- The CSSOMFoundation≈ 15 min
- The CascadeFoundation≈ 20 min
- SpecificityFoundation≈ 15 min
- Inheritance and Computed StyleFoundation≈ 15 min
- Custom PropertiesFoundation≈ 15 min
- The Box ModelFoundation≈ 15 min
- What the Frontend Is Responsible ForFoundation≈ 5 min
- Images, Video and the Elements That Own Their LayoutFoundation≈ 20 min
- Shadow DOM and the Composed TreeFoundation≈ 15 min
- Detached Nodes and What Keeps Them AliveFoundation≈ 15 min
- Selector Matching CostFoundation≈ 15 min
- Normal Flow, Overflow and Margin CollapsingFoundation≈ 15 min
- Flexbox: One Axis at a TimeFoundation≈ 15 min
- Grid: Two Dimensions at OnceFoundation≈ 15 min
- Positioning and Stacking ContextsFoundation≈ 15 min
- Intrinsic Sizing and the Automatic MinimumFoundation≈ 15 min
Events, forms, accessibility and adapting to the viewport0 of 25 lessons done
- How an Event Is DispatchedFoundation≈ 15 min
- Event DelegationFoundation≈ 10 min
- preventDefault vs stopPropagationFoundation≈ 15 min
- Pointer EventsFoundation≈ 15 min
- Keyboard EventsFoundation≈ 15 min
- Native Forms FirstFoundation≈ 15 min
- Input Types, Inputmode and AutocompleteFoundation≈ 15 min
- Native Validation and Its LimitsFoundation≈ 15 min
- Submission: Method, Encoding and Doing It OnceFoundation≈ 15 min
- Errors People Can Actually PerceiveFoundation≈ 15 min
- The Accessibility TreeFoundation≈ 20 min
- Semantics Before ARIAFoundation≈ 15 min
- Keyboard OperabilityFoundation≈ 15 min
- Focus ManagementFoundation≈ 15 min
- The Rules of ARIAFoundation≈ 15 min
- Live Regions and AnnouncementFoundation≈ 15 min
- Fluid Layout FirstFoundation≈ 15 min
- Media Queries Beyond WidthFoundation≈ 15 min
- Container QueriesFoundation≈ 15 min
- Responsive ImagesFoundation≈ 15 min
- Passive ListenersFoundation≈ 15 min
- Contrast, Colour and MotionFoundation≈ 15 min
- Accessible Component PatternsFoundation≈ 25 min
- The Viewport and Device PixelsFoundation≈ 15 min
- Responsive TypographyFoundation≈ 15 min
State, components, routing and talking to a server0 of 29 lessons done
- The Seven Kinds of StateFoundation≈ 15 min
- Who Owns This State?Foundation≈ 15 min
- The URL Is Application StateFoundation≈ 15 min
- Derived StateFoundation≈ 15 min
- Form State Is a DraftFoundation≈ 15 min
- Controlled vs Uncontrolled InputsFoundation≈ 15 min
- Drawing Component BoundariesFoundation≈ 15 min
- What a Component Owes Its CallerFoundation≈ 15 min
- Composition and SlotsFoundation≈ 15 min
- Prop Drilling, Context and Global StateFoundation≈ 15 min
- Over-ComponentizationFoundation≈ 15 min
- Reactivity ModelsFoundation≈ 20 min
- Reconciliation and KeysFoundation≈ 15 min
- Client-Side RoutingFoundation≈ 15 min
- Route MatchingFoundation≈ 15 min
- URL ParametersFoundation≈ 15 min
- History and NavigationFoundation≈ 15 min
- The Life of a FetchFoundation≈ 15 min
- Loading, Error, Empty — The States You Did Not RenderFoundation≈ 20 min
- Server State Is Not Your StateFoundation≈ 15 min
- What a Component Costs to RenderFoundation≈ 15 min
- The React Mental ModelFoundation≈ 10 min
- The Vue Mental ModelFoundation≈ 10 min
- The Svelte Mental ModelFoundation≈ 10 min
- The Solid Mental ModelFoundation≈ 10 min
- The Angular Mental ModelFoundation≈ 10 min
- Choosing a FrameworkFoundation≈ 15 min
- Scroll RestorationFoundation≈ 15 min
- Pagination From the Interface BackwardsFoundation≈ 20 min
The rendering pipeline, the event loop and the one main thread0 of 26 lessons done
- The Rendering PipelineIntermediate≈ 20 min
- Style CalculationIntermediate≈ 15 min
- Style InvalidationIntermediate≈ 15 min
- The Cost of a ChangeIntermediate≈ 20 min
- Layout ThrashingIntermediate≈ 20 min
- Paint CommandsIntermediate≈ 15 min
- Compositing LayersIntermediate≈ 15 min
- Cheap and Expensive AnimationIntermediate≈ 15 min
- The Frame BudgetIntermediate≈ 15 min
- Scroll and Input LatencyIntermediate≈ 15 min
- The Event Loop, PreciselyIntermediate≈ 15 min
- Tasks: The Unit That Cannot Be InterruptedIntermediate≈ 15 min
- The Microtask CheckpointIntermediate≈ 15 min
- The Rendering OpportunityIntermediate≈ 15 min
- Long TasksIntermediate≈ 15 min
- What the Main Thread OwnsIntermediate≈ 15 min
- Yielding and SchedulingIntermediate≈ 15 min
- Web Workers and the DOM BoundaryIntermediate≈ 15 min
- When a Worker Is Actually the AnswerIntermediate≈ 20 min
- Streaming HTMLIntermediate≈ 20 min
- CSS ContainmentIntermediate≈ 15 min
- content-visibilityIntermediate≈ 15 min
- Layer ExplosionIntermediate≈ 15 min
- Talking to a WorkerIntermediate≈ 15 min
- Structured Clone and TransferablesIntermediate≈ 15 min
- Shared Memory and Cross-Origin IsolationIntermediate≈ 20 min
Client caches, optimistic updates and live data0 of 22 lessons done
- The Client Cache ModelIntermediate≈ 15 min
- Query Keys and InvalidationIntermediate≈ 20 min
- Stale-While-RevalidateIntermediate≈ 20 min
- Optimistic UIIntermediate≈ 20 min
- Rollback and ReconciliationIntermediate≈ 20 min
- Out-of-Order ResponsesIntermediate≈ 20 min
- Cancelling a Request Nobody Is Waiting ForIntermediate≈ 15 min
- Five Components, One RequestIntermediate≈ 15 min
- Retries, and the Duplicate OrderIntermediate≈ 20 min
- Choosing a Real-Time TransportIntermediate≈ 15 min
- Server-Sent EventsIntermediate≈ 15 min
- WebSockets in the UIIntermediate≈ 15 min
- Reconnect and BackoffIntermediate≈ 15 min
- Ordering and Duplicate DeliveryIntermediate≈ 15 min
- Resynchronisation After a GapIntermediate≈ 15 min
- State SynchronizationIntermediate≈ 15 min
- Persistent Client StateIntermediate≈ 15 min
- Choosing Browser StorageIntermediate≈ 20 min
- CookiesIntermediate≈ 15 min
- localStorage and sessionStorageIntermediate≈ 15 min
- IndexedDBIntermediate≈ 20 min
- Cache StorageIntermediate≈ 15 min
What the browser enforces, what you can prove, and what real users emit0 of 26 lessons done
- The Browser Security ModelIntermediate≈ 15 min
- The Same-Origin PolicyIntermediate≈ 10 min
- Cross-Site ScriptingIntermediate≈ 15 min
- Sanitization and Trusted HTMLIntermediate≈ 15 min
- Cross-Site Request ForgeryIntermediate≈ 15 min
- CORSIntermediate≈ 15 min
- Content Security PolicyIntermediate≈ 15 min
- Clickjacking and FramingIntermediate≈ 15 min
- Third-Party Scripts and the Supply ChainIntermediate≈ 10 min
- What the Frontend Is Responsible For in AuthIntermediate≈ 15 min
- Cookies vs Script-Readable TokensIntermediate≈ 15 min
- Storage Security and DurabilityIntermediate≈ 20 min
- Choosing the Test LevelIntermediate≈ 15 min
- Testing Pure LogicIntermediate≈ 15 min
- Component TestingIntermediate≈ 15 min
- End-to-End TestingIntermediate≈ 15 min
- Accessibility TestingIntermediate≈ 15 min
- Frontend Error TrackingIntermediate≈ 20 min
- Real User MonitoringIntermediate≈ 20 min
- Vitals in the FieldIntermediate≈ 20 min
- Session Expiry and the Refresh RaceIntermediate≈ 20 min
- Authorization-Aware UIIntermediate≈ 15 min
- Auth Across TabsIntermediate≈ 15 min
- Login Redirects and the Open-Redirect TrapIntermediate≈ 20 min
- Visual Regression TestingIntermediate≈ 15 min
- Network Failures Only the Client Can SeeIntermediate≈ 20 min
Performance, the critical path and what your users download0 of 21 lessons done
- Measure Before OptimisingAdvanced≈ 20 min
- Loading: Why Content Arrives LateAdvanced≈ 15 min
- Interaction ResponsivenessAdvanced≈ 15 min
- Visual StabilityAdvanced≈ 15 min
- The Real Cost of JavaScriptAdvanced≈ 15 min
- Images and FontsAdvanced≈ 20 min
- List VirtualizationAdvanced≈ 15 min
- MemoizationAdvanced≈ 10 min
- Memory LeaksAdvanced≈ 10 min
- The Critical Rendering PathAdvanced≈ 15 min
- Reading a Network WaterfallAdvanced≈ 15 min
- Render-Blocking ResourcesAdvanced≈ 15 min
- Resource HintsAdvanced≈ 15 min
- Browser HTTP CachingAdvanced≈ 15 min
- Content-Hashed AssetsAdvanced≈ 15 min
- The Module GraphAdvanced≈ 15 min
- Code SplittingAdvanced≈ 15 min
- Lazy LoadingAdvanced≈ 15 min
- Tree ShakingAdvanced≈ 15 min
- Minification Is Not CompressionAdvanced≈ 15 min
- Bundlers ComparedAdvanced≈ 15 min
Where the HTML comes from: CSR, SSR, SSG, streaming and islands0 of 21 lessons done
- Client-Side RenderingAdvanced≈ 15 min
- Server-Side RenderingAdvanced≈ 15 min
- Static Site GenerationAdvanced≈ 15 min
- HydrationAdvanced≈ 15 min
- Hydration MismatchAdvanced≈ 15 min
- Islands and Partial HydrationAdvanced≈ 15 min
- Streaming Server RenderingAdvanced≈ 15 min
- Server ComponentsAdvanced≈ 15 min
- Choosing a Rendering StrategyAdvanced≈ 15 min
- Route Loading BoundariesAdvanced≈ 15 min
- `defer`, `async` and `type="module"`Advanced≈ 20 min
- The Preload ScannerAdvanced≈ 20 min
- CDN DeliveryAdvanced≈ 15 min
- ESM vs CommonJSAdvanced≈ 15 min
- Polyfills vs TranspilationAdvanced≈ 10 min
- TypeScript in the BuildAdvanced≈ 10 min
- Bundle AnalysisAdvanced≈ 15 min
- Source MapsAdvanced≈ 10 min
- The HTML TokenizerAdvanced≈ 20 min
- Tree ConstructionAdvanced≈ 15 min
- Why a Script Tag Stops the ParserAdvanced≈ 15 min
Frontend architecture and running it in browsers you do not control0 of 34 lessons done
- Choosing a Frontend ArchitectureAdvanced≈ 15 min
- MPA vs SPAAdvanced≈ 15 min
- Micro FrontendsAdvanced≈ 15 min
- Design SystemsAdvanced≈ 15 min
- Design TokensAdvanced≈ 15 min
- InternationalizationAdvanced≈ 10 min
- Timezones and Locale FormattingAdvanced≈ 10 min
- Deploying a FrontendAdvanced≈ 20 min
- Long-Lived Clients and Version SkewAdvanced≈ 20 min
- Feature Flags in the ClientAdvanced≈ 25 min
- Analytics Events That Answer a QuestionAdvanced≈ 20 min
- File Upload UXAdvanced≈ 25 min
- How API Shape Drives UI ComplexityAdvanced≈ 25 min
- Backend for FrontendAdvanced≈ 20 min
- Release HealthAdvanced≈ 20 min
- Session Replay and the Privacy It CostsAdvanced≈ 20 min
- A Method for Frontend BugsAdvanced≈ 20 min
- The Service Worker LifecycleAdvanced≈ 20 min
- The Offline Mutation QueueAdvanced≈ 20 min
- What the Frontend Owns in an Agent ProductAdvanced≈ 15 min
- Intercepting FetchAdvanced≈ 15 min
- Caching StrategiesAdvanced≈ 15 min
- Offline UXAdvanced≈ 20 min
- Manifest and InstallabilityAdvanced≈ 15 min
- A Mental Model of the DevtoolsAdvanced≈ 20 min
- Debugging the NetworkAdvanced≈ 20 min
- Debugging Rendering and JankAdvanced≈ 20 min
- Debugging StateAdvanced≈ 20 min
- Debugging MemoryAdvanced≈ 20 min
- Streaming a Response Without Melting the DeviceAdvanced≈ 15 min
- Showing What the System Is DoingAdvanced≈ 10 min
- Citations and Answers With Holes InAdvanced≈ 10 min
- Stopping It, and Trying Again SafelyAdvanced≈ 10 min
- A Suggestion Is Not an AuthorizationAdvanced≈ 15 min
How does user intent become interactive, accessible, performant pixels?
The final objective is small and specific. A learner should be able to look at <button>Save</button> and see semantic HTML, the DOM, the accessibility tree, a browser event, application logic, state, a network request, a UI update, style, layout, paint, composite, pixels — and instinctively ask which of those this particular change actually costs.
The order is the argument. What the person intended decides what state must change; what state changes decides what reaches the DOM; what reaches the DOM decides how much of the rendering pipeline runs again before anyone sees anything. Skip a step and you get an interface that is locally reasonable and, on a mid-range phone, unusable.
This is the browser-executed application domain
Frontend Engineering does not own every layer it touches. It owns the application running on someone else's device, and the interaction they actually feel.
API Design decides the contract and Backend Engineering implements the service behind it. The shape of that contract decides how complicated the UI has to be — which is a thing this domain is allowed to have an opinion about, and not a thing it gets to enforce.
The browser-executed application: what runs on the user's device, what it renders, how it responds, what it ships, and what it does when the network, the server or the device lets it down. Accessibility is here in full — no other domain can supply it.
Networking, Security, Performance, Concurrency, Cloud and Agentic Engineering each own a layer in full. Lessons here teach the browser-side mechanism and hand the rest off by name.
Flagship experiences
The parts of this domain that are not reading.
URL, DNS, connection, TLS, request, HTML, parsing, DOM, CSSOM, style, layout, paint, composite, pixels. Every stage is clickable and every stage can be the one you are waiting on.
A person clicks Save. Follow it through dispatch, the handler, a state change, validation, a request, the server, the response, the cache, reconciliation, a DOM mutation — and find out whether it cost layout, paint, both or neither.
One line of JavaScript becomes a DNS lookup, a connection, bytes, a parse and a render. Along the way: what runs on the main thread, what can be cancelled, and what can come back out of order.
Real-shaped evidence and no label. The two signals a user actually feels are raised by almost every fault, so neither one can tell you the cause — the exercise is finding the evidence that can.
The same application under five rendering strategies, on one comparable timeline: when HTML arrives, when content is visible, when JavaScript lands, and when the thing finally responds to a click.
Pick a change and see which pipeline stages it invalidates. The answer is often "it depends what else is on the page", and that is a real answer rather than a hedge.
A modal, a dropdown, tabs, an accordion, a form. Each one has to satisfy keyboard, focus, semantics, screen reader and error messaging before it counts as built.
A decision tree whose every leaf names why, what it costs the browser, what it costs the network, and what you would do instead.
A global multi-tenant SaaS frontend, then nine injected regressions — a 4 MB bundle, out-of-order responses, a duplicated realtime event, a hydration mismatch, a screen reader that cannot navigate it.
Situations with the cause unlabelled. Each one carries the trap: the fix that looks right, passes the obvious test, and leaves the real problem in place.
What each question is really testing, what a strong answer sounds like, and the red flags that separate a remembered rule from a working model.
Learning modules
Thirty-five modules, from what the browser actually is to keeping a frontend working in production for browsers you do not control.
The browser is a runtime, not a document viewer: networking, parsers, a JavaScript engine, a layout engine, a paint system, a compositor, storage and a security sandbox, split across processes that fail independently.
Structured content with behaviour attached. What a `button` gives you that a clickable `div` silently takes away — keyboard, focus, defaults, assistive technology, tooling.
Bytes to tokens to a tree, streaming as it arrives — and what `script`, `defer`, `async` and `type=module` actually do to that stream.
The browser's live object model of the document: nodes, attributes, listeners, computed style, layout boxes and the accessibility semantics derived from all of it.
Cascade, specificity, inheritance and computed style as a resolution algorithm you can reason about, rather than a fight you win with `!important`.
DOM plus CSSOM to style to layout to paint to composite — and the invalidation rules that decide which of those stages a given change actually costs you.
Geometry: the box model, normal flow, flexbox, grid, positioning, intrinsic sizing, overflow — and the read-write-read pattern that forces the browser to compute it all again.
Paint commands, layers, the compositor thread and the frame budget. Why `transform` and `opacity` are often cheaper to animate, stated as a mechanism rather than a slogan.
Call stack, task, microtask checkpoint, rendering opportunity. The scheduling model that explains why a synchronous loop freezes the page and a promise chain does not yield a frame.
Moving CPU work off the thread that owns the DOM: message passing, structured clone, transferables, and the isolation requirements the sharper primitives carry.
Dispatch, capture, target, bubble. Delegation, default actions, pointer and keyboard input, and why cancelling the wrong thing breaks scrolling or accessibility.
The platform's oldest interactive component: input types, native validation, submission, focus order, labels — and what you inherit for free before any framework state exists.
DOM plus semantics plus ARIA becomes an accessibility tree that assistive technology reads. Keyboard operation, focus management and announcement are engineering requirements, not a later pass.
Adapting to available space and user conditions: fluid layout, media and container queries, responsive images, CSS pixels versus device pixels, and typography that survives translation.
Local, form, URL, server, auth, cached and persistent state are different things with different owners. Most frontend bugs are a state-ownership answer nobody wrote down.
Boundaries drawn by responsibility, state ownership and reuse — plus the contract a component owes: inputs, events, slots, behaviour and accessibility.
React, Vue, Svelte, Solid and Angular as different answers to the same questions: how change is detected, how much work is compile-time, and what reaches the DOM.
The URL is application state — shareable, bookmarkable and restorable. Route matching, nesting, history, scroll restoration and the loading boundaries in between.
Request, loading, success or error, render — and the parts that only show up in production: cancellation, deduplication, retries, pagination and background refresh.
Query keys, freshness, staleness and revalidation; updating the interface before the server has agreed, and reconciling honestly when it does not.
Polling, long polling, SSE and WebSocket compared by what they cost — plus reconnect, ordering, duplicate delivery and the resynchronisation nobody prototypes.
Representing identity, sending credentials safely, surviving session expiry and rendering authorization-aware UI — while the backend stays the only authority.
XSS, CSRF, the same-origin policy, CORS, CSP, clickjacking, third-party scripts and supply chain — the browser-side half of a problem the server cannot solve alone.
Cookies, localStorage, sessionStorage, IndexedDB and Cache Storage: lifetime, synchronicity, capacity and exposure. Four different answers to "where does this live".
A programmable proxy between the page and the network: install, activate, fetch, update — plus offline mutation queues and the conflict resolution they imply.
Loading, interaction responsiveness and visual stability measured on real devices, with the main-thread and memory work behind each one. Measure before optimising, always.
The waterfall from HTML to first content: blocking resources, resource hints, HTTP caching, CDNs and content-hashed assets — the network half of how fast a page feels.
Modules to dependency graph to transforms to chunks. Code splitting, tree shaking, TypeScript, polyfills versus transpilation, source maps, and what your users download.
CSR, SSR, SSG, streaming SSR, islands and server components as points on a curve between where work happens and when the page becomes interactive.
Choosing the level by what it can actually prove: pure logic, component behaviour, critical user flow, visual appearance, and the accessibility checks a tool cannot finish.
Errors, failed requests, vitals and interaction latency from real users on real devices — and the privacy obligations that come attached to every one of them.
Reproduce, then work the layers: network, console, DOM and CSS, application state, performance, memory. A method, not a tour of a devtools panel.
MPA, SPA, SSR app, static site and micro frontends; design systems, internationalization, BFFs, deployment — and the fact that web clients never update atomically.
Shipping to browsers you do not control: deployment, feature flags, analytics, uploads, the API contract you consume — and the fact that a web client never updates atomically.
Streaming tokens, tool progress, citations, cancellation and partial failure — plus the rule that a model suggesting an action is never the same as the action being authorized.
Reference
For when you already know roughly what you are looking for.
Nine stages in one suggested order, each naming what it needs first and what you should be able to build before moving on.
The searchable index: what a problem sounds like, and what to think when you hear it.
Twelve pairs people genuinely confuse — minification and compression, polyfills and transpilation, server state and client state — with the confusion named.
React, Vue, Svelte, Solid and Angular across the questions that actually differ — and a column for where the comparison misleads.
Don't delegate understanding
The point of the domain, stated plainly.
Use those abstractions. All of them are worth using, and rebuilding them by hand is not the lesson. But understand how user intent becomes pixels, so that when one of them leaks — and each of them leaks in a characteristic way — you are debugging a system you have a model of rather than one you have been trusting.