super-tic-tac-toe

๐Ÿง  Uber XO - Technical Documentation

Welcome to the internal technical documentation for Uber XO. This project is a modern, AI-assisted take on the classic game, built to support both local and online multiplayer with an emphasis on clean architecture, type safety, and responsive UX.


๐Ÿ“ Project Overview

A real-time multiplayer web game inspired by Uber XO (a 3x3 grid of mini 3x3 boards). Players must win mini-boards to claim macro-board victory. Built for fun and learning, this is a fully vibe-coded project using ChatGPT & Claude, deployed on Vercel.

Live URL: super-tic-tac-toe-three.vercel.app


๐Ÿ—๏ธ Tech Stack

โš™๏ธ Core Frameworks

๐Ÿง  AI Tools Used


๐Ÿงฑ Project Structure (Monorepo)

super-tic-tac-toe/
โ”œโ”€โ”€ apps/
โ”‚   โ””โ”€โ”€ web/               # Next.js frontend
โ”œโ”€โ”€ packages/
โ”‚   โ””โ”€โ”€ game-core/         # Pure game logic, fully reusable
โ”œโ”€โ”€ public/
โ”œโ”€โ”€ styles/
โ”‚   โ””โ”€โ”€ globals.css        # Includes Tailwind theme setup
โ”œโ”€โ”€ turbo.json             # Build config
โ”œโ”€โ”€ tsconfig.base.json     # Shared TS config
โ””โ”€โ”€ pnpm-workspace.yaml

๐Ÿง  Architecture Decisions

๐Ÿ“ฆ Separation of Concerns

๐Ÿงผ Type-Safety

๐Ÿ’ก React + Zustand


๐ŸŽฎ Game Flow (Local)

  1. User opens /local
  2. GameContainer renders:
    • GameInfo (current player, board wins)
    • GameBoard with 9 MiniBoards
    • GameControls (Restart, Rules)
  3. Zustand tracks:
    • gameState
    • xMiniWins, oMiniWins
  4. On move:
    • handleStateMove() is called
    • Game logic in game-core updates board state
    • UI re-renders affected MiniBoard only

๐ŸŒ Game Flow (Online - WIP)

  1. Player visits /online
  2. Can create or join a room
  3. Room creator receives a room code
  4. Second player joins via URL
  5. OnlineGameLoader shows waiting screen until both are present
  6. Suspense + API mock simulates join delay
  7. Future: Socket.io manages real-time game sync

โœจ UI/UX Features


๐Ÿงช Testing & Dev Experience


๐Ÿš€ Deployment

๐ŸŒ Deployment Notes


๐Ÿงญ Future Milestones

๐Ÿ” Multiplayer: Sync Model (Planned)

๐Ÿ” Multiplayer: Player Roles (Planned)

๐Ÿšฆ Multiplayer: Event Protocol (Planned)

โœ… State Resumption (Planned)


๐Ÿ™Œ Credits & Acknowledgements


Last updated: April 10, 2025