0 day streak
Anonymous · shared experience1 Oct 2025 · 10 views

Zepto: Chess game: classes, move validation, schema and REST APIs

Interview question #Zepto Low-level design

Problem. Design a chess game across three layers: classes, database schema and APIs.

Classes. Player, Board, Piece, Move, Game and Position. King, Queen, Bishop, Knight, Rook and Pawn extend a base piece. Discussion touched on a factory for creating pieces, a strategy for validating moves, and optionally a single game manager. The interviewer cared more about why a pattern fits than about textbook definitions.

Schema. Tables for players, games, moves and match history, how they relate, and indexes that make lookups of ongoing games fast.

APIs. Start a game, make a move on a game, and fetch a game's state, including request and response bodies, status codes and validation.

Follow-ups. How it scales, how to store board state, and how to store move history efficiently.

Focus. Class structure, validating moves, extensibility and backend reasoning. The candidate said time pressure was the main challenge.

0 comments

Comments 0

No comments yet. Ask the author something, or add what happened in your own round.