Nothing Chess Analysis
A mobile-first chess analysis tool featuring the distinctive "Nothing OS" design aesthetic. Powered by Stockfish 17 via Chess-API, it provides deep game analysis, move classification, and seamless Chess.com integration.
๐ด Features
๐ง Advanced Analysis
- Full Game Review: Automatically analyzes every move of an imported game.
- Move Classification: Classifies moves as Brilliant, Great, Best, Excellent, Good, Inaccuracy, Mistake, Blunder, or Miss based on engine evaluation changes.
- Stockfish 17 Integration: Uses the latest engine for accurate centipawn evaluations and mate detection.
- Visual Evaluation Bar: Real-time bar showing the current advantage (White vs. Black) and Mate sequences.
โ๏ธ Board & Gameplay
- Interactive Board: Built with
react-chessboard, styled with a custom dark monochrome theme and Nothing Red highlights.
- Smart Navigation: Jump to any move, step forward/backward, or flip the board orientation.
- Move History:
- Desktop: Vertical, scrollable move list with detailed analysis icons.
- Mobile: Compact, horizontal scrollable timeline for easy thumb navigation.
- Legal Move Validation: Handles all chess rules including castling, en passant, and promotion.
๐ฅ Import System
- Chess.com Sync: Fetch recent games directly by username.
- Smart Load: Automatically detects and loads FEN (positions) or PGN (full games) from text input.
- Game Metadata: Displays player names, Elo ratings, and game results.
๐จ Design (Nothing OS)
- Aesthetic: Strictly monochrome (Black #000, White #fff, Gray #808080) with high-contrast Red (#D71921) accents.
- Typography: Uses
Space Mono for a raw, terminal-like feel.
- UI Elements: Dot matrix backgrounds, brutalist borders, and pixel-perfect spacing.
- Responsive: Fully optimized for mobile devices (
dvh support) while offering a rich desktop experience.
๐ ๏ธ Tech Stack
๐ Getting Started
Prerequisites
- Node.js (v18+)
- npm or yarn
Installation
Clone the repository
git clone https://github.com/your-username/nothing-chess.git
cd nothing-chess
Install dependencies
Run the development server
Open in browser
Navigate to http://localhost:3000
๐ Usage Guide
Analyzing a Game
- Click the IMPORT button (Top header on Desktop, Top-right on Mobile).
- Option A (Chess.com): Enter a username and click "FETCH". Select a game from the list.
- Option B (Paste): Switch to the "Paste" tab and insert a PGN or FEN string.
- The app will automatically start the "Processing Game" sequence, analyzing moves one by one.
Understanding the UI
- Eval Bar: The bar on the left of the board shows who is winning. White bar up = White advantage. Full bar = Mate.
- Analysis Box:
- EVAL: The engine score (e.g.,
+1.50 or M3).
- BEST: The best move suggested by Stockfish.
- Lines: The calculated continuation line.
- Move Colors:
- ๐ข Green: Best/Excellent moves.
- ๐ต Blue/Teal: Great/Brilliant moves.
- ๐ก Yellow: Inaccuracies.
- ๐ Orange: Mistakes.
- ๐ด Red: Blunders.
๐ Project Structure
App.tsx (Main Component)
โ
โโโ State Management
โ โโโ useGameState() โ gameState object
โ โโโ useAnalysisState() โ analysisState object
โ
โโโ UI Layers
โ โ
โ โโโ Overlays
โ โ โโโ ImportGame (existing)
โ โ โโโ AnalysisOverlay
โ โ
โ โโโ Left Panel (Board Area)
โ โ โโโ Mobile Header (mobile only)
โ โ โโโ Board Container
โ โ โโโ MobileHistory (mobile)
โ โ โโโ PlayerInfo (top/opponent)
โ โ โโโ BoardDisplay
โ โ โ โโโ EvalBar (existing)
โ โ โ โโโ Chessboard (react-chessboard)
โ โ โโโ PlayerInfo (bottom/player)
โ โ
โ โโโ Right Panel (Analysis & Controls)
โ โโโ Desktop Header (desktop only)
โ โโโ Analysis Section
โ โ โโโ AnalysisBox
โ โ โโโ MoveClassificationBadge
โ โ โโโ EngineContinuation
โ โโโ DesktopHistory (desktop only)
โ โโโ NavigationControls
โ โโโ NavButton (ร4)
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (`git checkout -b feature/AmazingFe