Seven required components
Your system must include all seven components working together seamlessly:1. Custom browser engine with HTML/CSS/JS support
1. Custom browser engine with HTML/CSS/JS support
Build a browser engine from scratch that can render complex web pages.Core features:
- HTML tokenization state machine (13 states, 67 transitions)
- Tree construction algorithm with error recovery
- Quirks mode support
- Parser-blocking scripts and async/defer handling
- Complete tokenizer and parser
- Selector matching with specificity calculation
- Cascade resolution algorithm
- Style computation and inheritance
- Media query evaluation
- Box model calculation
- Normal flow, floats, and positioning schemes
- Flexbox algorithm (main/cross axis, flex basis, grow, shrink)
- Grid algorithm (track sizing, placement, spanning)
- Line breaking and text shaping
- Layer tree construction
- Paint recording and display lists
- Rasterization strategies
- GPU compositing and texture management
2. React-like framework with Fiber and concurrent features
2. React-like framework with Fiber and concurrent features
Implement a modern rendering framework with React’s architecture.Fiber reconciler:
- Work loop and unit of work processing
- Reconciliation phases: render and commit
- Effect list construction
- Priority levels and lane model
- Hooks queue and cursor management
- useState with batched updates
- useEffect with cleanup and dependency checking
- useRef mutable container
- useCallback/useMemo memoization
- Custom hook composition support
- Time slicing and work interruption
- Suspense and lazy loading
- useTransition for non-urgent updates
- useDeferredValue for performance optimization
- Automatic batching
3. SSR framework with streaming and hydration
3. SSR framework with streaming and hydration
Build server-side rendering infrastructure for production use.Rendering modes:
renderToStringfor basic SSRrenderToPipeableStreamfor streaming- Progressive hydration for faster interactivity
- Selective hydration for prioritized components
- Build-time static site generation (SSG)
- Incremental static regeneration (ISR)
- Revalidation and stale-while-revalidate strategies
- Edge rendering support
- Node.js rendering support
- Handle the double pass problem
4. Production-optimized Next.js application
4. Production-optimized Next.js application
Create a real application demonstrating production-ready patterns.Core features:
- File-based routing implementation
- Automatic code splitting
- Module bundling optimization
- Tree shaking for minimal bundle size
getStaticPropsbuild-time execution- ISR with revalidation
- API routes and middleware
- Image optimization (formats, lazy loading, responsive images)
- Font optimization (subsetting, preloading, display strategies)
- Bundle analysis and size optimization
- Route-based and component-based code splitting
5. Full performance profiling suite
5. Full performance profiling suite
Build comprehensive tooling for measuring and optimizing performance.Profiling capabilities:
- Custom performance marks and measures
- Phase-by-phase timing (parse, style, layout, paint, composite)
- React component render profiling
- Heap snapshots and allocation timelines
- First Contentful Paint (FCP)
- Largest Contentful Paint (LCP)
- Time to Interactive (TTI)
- Cumulative Layout Shift (CLS)
- First Input Delay (FID)
- Memory leak detection
- GC pause measurement
- Layout thrashing detection
- Automated performance regression testing
6. WebAssembly acceleration for critical paths
6. WebAssembly acceleration for critical paths
Optimize performance-critical operations using WebAssembly.Implementation requirements:
- Compile C/C++/Rust to WASM
- Linear memory management
- Optimize JS ↔ WASM interop
- SIMD support for data parallelism
- Thread support where applicable
- Image processing (filters, transformations)
- Physics simulations
- Complex calculations
- Text processing or parsing
- Cryptographic operations
7. Hardware constraint testing and optimization
7. Hardware constraint testing and optimization
Test and optimize your system under extreme resource constraints.Constraint simulations:
- Memory pressure (64KB RAM simulation)
- CPU throttling (10MHz simulation)
- Network constraints (2G, 3G conditions)
- GPU bottleneck analysis
- Port mini-browser to microcontroller simulation
- Memory-constrained rendering
- CPU-constrained JavaScript execution
- Display optimization for small screens
Performance benchmarks
Your capstone project must meet these rigorous performance standards:60fps rendering
Render complex UIs at 60 frames per second consistently
10,000+ concurrent updates
Handle massive DOM updates without blocking the main thread
Sub-second page load
Initial page load must complete in under 1 second
Progressive enhancement
Graceful degradation and progressive enhancement support
Detailed performance requirements
Rendering performance
Requirement: Render complex UIs at 60fps
- Frame time must stay under 16.67ms
- No dropped frames during scrolling
- Smooth animations with no jank
- Efficient repaint and reflow batching
Concurrent DOM updates
Requirement: Handle 10,000+ concurrent DOM updates
- Use time slicing to prevent main thread blocking
- Maintain interactivity during large updates
- Proper priority handling for user interactions
- Efficient reconciliation and diffing
Initial load performance
Requirement: Sub-second initial page load
- Time to First Byte (TTFB) < 200ms
- First Contentful Paint (FCP) < 500ms
- Largest Contentful Paint (LCP) < 1000ms
- Time to Interactive (TTI) < 1500ms
Deliverables
Your capstone project submission must include:1. Complete source code
2. Performance documentation
You must document every optimization with before/after metrics. This demonstrates your understanding of performance engineering principles.
- Performance profile for each component
- Optimization decisions and trade-offs
- Benchmark results for all performance requirements
- Memory usage analysis
- Bundle size breakdown
- Critical rendering path analysis
3. Architecture documentation
System architecture:- Component interaction diagrams
- Data flow documentation
- Rendering pipeline overview
- Reconciliation algorithm explanation
- Why you chose specific algorithms
- Trade-offs you made
- Alternative approaches considered
- Lessons learned
4. Testing suite
Required tests:- Unit tests for core algorithms
- Integration tests for component interaction
- Performance regression tests
- Stress tests for edge cases
- Constraint testing results
5. Demo application
Requirements:- Real-world use case (not a todo app)
- Complex UI with multiple routes
- Data fetching and state management
- Interactive features
- Production-ready polish
Success criteria
Your capstone project is complete when:Grading rubric
Implementation
40% - All components working correctly with clean, efficient code
Performance
30% - Meeting all benchmark requirements with documented optimizations
Integration
20% - Seamless component interaction and system architecture
Documentation
10% - Clear explanations of design decisions and performance analysis
Final outcome
Upon completion, you’ll have a production-ready system demonstrating complete understanding of every layer from CPU to pixels. You’ll be able to debug and optimize at any level of the frontend stack with complete confidence.
- CPU execution and memory management
- Network protocols and servers
- Browser engines (parsing, layout, paint, composite)
- JavaScript engines (parser, interpreter, GC, event loop)
- Virtual DOM and reconciliation
- React internals and concurrent rendering
- SSR and hydration systems
- Performance profiling and optimization