Design a crypto trading web frontend
Company: Coinbase
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design the **front-end architecture** for a retail cryptocurrency trading web app (like a spot exchange).
Assume the product needs these core screens and behaviors:
- **Market page**: price chart, real-time **order book**, recent trades, and a **place order** form (limit/market).
- **Portfolio / orders**: balances, open orders, order history.
- **Auth**: login, session management, optional 2FA prompts.
- **Real-time updates**: order book/trades via WebSocket (or similar).
- Must be **responsive**, accessible, and handle poor networks gracefully.
Discuss and justify:
1) The **technology stack** (framework, language, build tool, styling, charting, state management).
2) The overall **frontend system design** (routing, page composition, state/data layers, WebSocket layer, caching, error handling).
3) The key **reusable components** you would build (design system + trading-specific components) and how you would implement them.
4) How you would ensure **performance** (rendering, large lists like order book), **testability** (unit/integration/e2e), and **security** (XSS/CSRF/token handling).
Quick Answer: This question evaluates frontend system architecture skills for real-time trading applications, covering framework and tooling choices, state and data layers, WebSocket-driven real-time updates, responsive and accessible UI design, performance optimization, testing, and security; it is in the System Design (frontend) domain.