Capstone: Production-Grade React Application
Apply the entire course to a realistic application: architecture, routing, forms, server state, optimistic updates, accessibility, performance, testing, and deployment.
Define Requirements & User Flows
Start by defining users, resources, permissions, primary workflows, and failure states before writing components. A production application should have explicit requirements for loading, empty, error, and permission-denied states.
Write the main user journeys as a sequence of screens and actions. This prevents architecture from becoming a collection of components without a coherent product model.
- Design behavior before component trees.
- List failure and permission states up front.
- User journeys are stronger architecture inputs than screenshots alone.
Design the Feature Architecture
Split the capstone into feature boundaries and shared primitives. Identify server state, client state, URL state, and ephemeral component state separately.
Define public APIs between features. Decide which data-fetching mechanism owns caching and invalidation. Establish an error boundary strategy before implementing individual pages.
- Separate state categories.
- Create stable feature boundaries.
- Choose data ownership before building screens.
Implement Core Workflows
Build one complete vertical slice first: route → UI → form → API → loading/error/success → tests. Once the pattern is stable, expand to additional features.
Avoid creating dozens of generic abstractions before you have repeated use cases. Let duplication reveal the correct abstraction boundary.
- Build vertical slices.
- Extract abstractions after repetition becomes clear.
- Keep user-visible behavior testable at each step.
Profile & Optimize
After the application works, profile realistic workflows. Measure initial load, route navigation, large lists, typing into expensive screens, and mutation feedback.
Optimize only the measured bottlenecks. Typical improvements include route-level code splitting, reducing state propagation, memoizing expensive calculations, virtualizing large lists, and eliminating request waterfalls.
- Correctness comes before optimization.
- Profile realistic workflows.
- Optimize architecture and network behavior before micro-tuning.
Production Readiness Checklist
Before release, verify keyboard navigation, screen-reader labels, responsive layouts, loading states, error recovery, authorization, network failures, empty data, slow devices, and browser console errors.
Run the full test suite and production build. Verify source maps and error reporting are configured appropriately without exposing secrets.
A feature is not production-ready when the happy path works; it is ready when failure, accessibility, performance, security, and recovery behavior are also intentional.
- Test failure paths, not only happy paths.
- Validate accessibility and responsive behavior.
- Verify production build and observability before release.