유대선
프로젝트로
·업데이트·1

Core game built in a day — engine, backend API, web frontend

Single milestone commit shipped the product-agnostic game engine, an AI opponent with difficulty tiers, a versioned FastAPI backend, and a Next.js web frontend — plus dev-workflow slash commands.

The first real build of Ki Clash landed in one milestone commit (labeled "Phases 1-3" — the original prototype numbering, not the later May rebuild), followed by a few dev-workflow chores.

What shipped

Game engine. Core game logic lives in app/core/game_engine/ (engine.py, outcome_matrix.py, types.py), kept product-agnostic per the core-module separation rule.

AI opponent. Shipped with difficulty tiers as separate strategy implementations: app/core/ai_opponent/easy.py, medium.py, and hard.py over a shared base.py.

Backend API. A versioned FastAPI surface with auth, games, and players endpoints (app/api/v1/endpoints/), backed by SQLAlchemy models (match, player, round, turn) and an initial Alembic migration (a67ac29dd885_initial_tables.py). Domain logic was separated into services (game_service.py, player_service.py) sitting between the API layer and the models. Guest/JWT auth was included from the start (app/core/auth/jwt_handler.py, guest_auth.py).

Web frontend. A Next.js/TypeScript frontend with game UI components (GameBoard, ActionCard, KiMeter, MatchHUD, TurnReveal), a useGame hook, and an api.ts client.

Tests, deploy, and docs. Engine and AI opponent tests (tests/core/test_game_engine.py, tests/core/test_ai_opponent.py), deployment scaffolding (Dockerfile, docker-compose.yml), and product docs (spec.md, architecture.md, tasks.md) were all part of the same milestone commit.

Dev workflow

Commits