Design the contract between frontend and backend: client-side data models, REST vs. GraphQL vs. BFF, pagination, real-time transports, and how the frontend helps the system scale.
In frontend system design, start the data discussion from the UI's needs, not the database. List the entities each screen shows and how they relate:
1type User = { id: UserId; name: string; avatarUrl: string };
2type Product = { id: ProductId; title: string; priceCents: number; imageUrls: string[]; sellerId: UserId };
3type Review = { id: ReviewId; productId: ProductId; authorId: UserId; rating: 1 | 2 | 3 | 4 | 5; body: string; createdAt: string };
4type Cart = { items: { productId: ProductId; qty: number }[]; updatedAt: string };Decisions that matter at this stage:
0.1 + 0.2 !== 0.3.Intl.DateTimeFormat).