{"id":49079146,"url":"https://github.com/batuhanbaysal/chess-platform","last_synced_at":"2026-04-20T12:01:08.207Z","repository":{"id":343496174,"uuid":"1175980571","full_name":"BatuhanBaysal/chess-platform","owner":"BatuhanBaysal","description":"A professional, real-time chess platform built with Java 17, Spring Boot 3 (DDD/Clean Architecture), and React 19 with TypeScript.","archived":false,"fork":false,"pushed_at":"2026-04-17T12:04:54.000Z","size":6351,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-17T13:36:25.712Z","etag":null,"topics":["chess-engine","clean-architecture","ddd-architecture","java-17","monorepo","react-19","spring-boot-3","typescript","websocket"],"latest_commit_sha":null,"homepage":"https://www.linkedin.com/in/batuhan-baysal/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BatuhanBaysal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-08T13:02:26.000Z","updated_at":"2026-04-17T12:02:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"d974766b-af16-4152-b6cc-d26077b6572c","html_url":"https://github.com/BatuhanBaysal/chess-platform","commit_stats":null,"previous_names":["batuhanbaysal/chess-platform"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/BatuhanBaysal/chess-platform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatuhanBaysal%2Fchess-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatuhanBaysal%2Fchess-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatuhanBaysal%2Fchess-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatuhanBaysal%2Fchess-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BatuhanBaysal","download_url":"https://codeload.github.com/BatuhanBaysal/chess-platform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatuhanBaysal%2Fchess-platform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32046393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess-engine","clean-architecture","ddd-architecture","java-17","monorepo","react-19","spring-boot-3","typescript","websocket"],"created_at":"2026-04-20T12:00:36.437Z","updated_at":"2026-04-20T12:01:08.196Z","avatar_url":"https://github.com/BatuhanBaysal.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ♟️ Chess Platform (Full-Stack Monorepo) ♔\n\n**A high-performance, real-time chess ecosystem engineered with a focus on Domain-Driven Design (DDD), Clean Architecture, and Enterprise-Grade Infrastructure.**\n\n---\n\n### 📡 Project Status: Infrastructure \u0026 Containerization Finalized\n\u003e **Operational Status:** The core chess engine is **100% operational**, strictly adhering to **FIDE rules**.\n\u003e\n\u003e **Latest Milestone:** Successfully completed **Phase 10**, migrating the entire ecosystem to a **Dockerized** environment with **Liquibase** for database versioning. The system is now production-ready with automated service orchestration and health-check verified connectivity.\n\n![Board Preview](docs/assets/screenshots/gameplay-features/chess-board.png)\n\n---\n\n### 🛠️ Technology Stack \u0026 Engineering Standards\n\n**Backend \u0026 Infrastructure:**\n![Java 21](https://img.shields.io/badge/Java-21-orange?style=flat-square\u0026logo=openjdk\u0026logoColor=white)\n![Spring Boot 3.4.6](https://img.shields.io/badge/Spring_Boot-3.4.6-green?style=flat-square\u0026logo=springboot\u0026logoColor=white)\n![Docker](https://img.shields.io/badge/Docker-2496ED?style=flat-square\u0026logo=docker\u0026logoColor=white)\n![Liquibase](https://img.shields.io/badge/Liquibase-DB_Migration-red?style=flat-square\u0026logo=liquibase\u0026logoColor=white)\n![Redis](https://img.shields.io/badge/Redis-DC382D?style=flat-square\u0026logo=redis\u0026logoColor=white)\n![PostgreSQL](https://img.shields.io/badge/PostgreSQL-4169E1?style=flat-square\u0026logo=postgresql\u0026logoColor=white)\n\n**Frontend:**\n![React 19](https://img.shields.io/badge/React-19-20232A?style=flat-square\u0026logo=react\u0026logoColor=61DAFB)\n![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=flat-square\u0026logo=typescript\u0026logoColor=white)\n![Vite](https://img.shields.io/badge/Vite-646CFF?style=flat-square\u0026logo=vite\u0026logoColor=white)\n![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-38B2AC?style=flat-square\u0026logo=tailwind-css\u0026logoColor=white)\n![WebSocket](https://img.shields.io/badge/WebSocket-STOMP-blue?style=flat-square)\n\n---\n\n## 🏛️ Project Ecosystem \u0026 Governance\nThis project is architected as a **high-cohesion monorepo**. Operational processes and architectural decisions are managed through the following modules:\n\n| Module / Document | Purpose \u0026 Brief | Location |\n|:--- | :--- | :--- |\n| **⚙️ Backend** | Core Chess Engine, API endpoints \u0026 Move validation logic | [`./chess-backend`](./chess-backend/README.md) |\n| **🎨 Frontend** | Reactive UI components \u0026 Real-time board state management | [`./chess-frontend`](./chess-frontend/README.md) |\n| **🏗️ Architecture** | High-level design choices (Hexagonal, DDD) \u0026 Tech patterns | [`./docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md) |\n| **🚀 Setup Guide** | Comprehensive local environment \u0026 Dependency installation | [`./docs/DEVELOPMENT.md`](./docs/DEVELOPMENT.md) |\n| **📝 Git Flow** | Contribution workflow, Branching strategy \u0026 Commit standards | [`./.github/GIT_GUIDE.md`](./.github/GIT_GUIDE.md) |\n| **📜 Changelog** | Daily Evolution, version tracking \u0026 project milestones | [`./docs/CHANGELOG.md`](./docs/CHANGELOG.md) |\n| **🛡️ Security** | Security policies, safety disclosure \u0026 best practices | [`./docs/SECURITY.md`](./docs/SECURITY.md) |\n| **🤝 Contributing** | Coding standards, PR guidelines \u0026 collaboration rules | [`./docs/CONTRIBUTING.md`](./docs/CONTRIBUTING.md) |\n\n---\n\n## 🧠 Engineering Challenges \u0026 Solutions\n\n### 1. Database Versioning \u0026 Schema Integrity (Liquibase)\n* **The Challenge:** Relying on Hibernate's `ddl-auto: update` in a containerized environment is risky. Schema changes must be traceable, reversible, and consistent across all environments.\n* **The Solution:** Integrated **Liquibase** to manage database migrations through versioned SQL changelogs.\n* **The Result:** Professional, auditable database evolution. Guaranteed 1:1 schema parity between local development and Dockerized production environments.\n\n### 2. Service Orchestration \u0026 Deterministic Startup\n* **The Challenge:** In Docker Compose, services starting simultaneously can lead to \"Connection Refused\" errors if the backend tries to connect before the DB or Redis is ready.\n* **The Solution:** Implemented custom **Docker Health-Checks** and `depends_on: service_healthy` conditions.\n* **The Result:** The backend initializes only after PostgreSQL and Redis are fully \"Healthy,\" ensuring a resilient, zero-fail deployment flow.\n\n### 3. Simulation \u0026 Rollback Pattern\n* **The Challenge:** Validating King safety (check detection) requires executing a move. This poses a risk of corrupting the live game state during the validation process.\n* **The Solution:** Developed a **Simulation \u0026 Rollback** mechanism using **Java Records**. The engine clones the state, simulates the move on a virtual board, and discards it after safety verification.\n* **The Result:** 100% side-effect-free move validation, ensuring total state integrity.\n\n---\n\n## 🎯 Engineering Highlights\n\n### 🧩 Domain-Driven Design (DDD) \u0026 Clean Architecture\nThe core chess logic is encapsulated in a **Pure Java** domain layer.\n* **Zero Infrastructure Leakage:** Move validation is entirely decoupled from Spring Boot, ensuring 100% unit testability.\n* **Polymorphic Validation:** Each piece (`Rook`, `Bishop`, etc.) encapsulates its own logic, eliminating high-cyclomatic complexity from `switch-case` blocks.\n\n### ⚡ Robust Rule Engine\n* **FIDE Compliance:** Full support for [Castling](docs/assets/screenshots/gameplay-features/castling.png), [En Passant](docs/assets/screenshots/gameplay-features/en-passant.png), and [Pawn Promotion](docs/assets/screenshots/gameplay-features/pawn-promotion.png).\n* **King Safety Simulation:** Dry-run execution to detect [Check](docs/assets/screenshots/gameplay-features/check.png), [Checkmate](docs/assets/screenshots/gameplay-features/checkmate.png), and Stalemate.\n* **Efficient Pathfinding:** Optimized vector-based collision detection for sliding pieces to maintain high engine throughput.\n\n### 🔄 State Synchronization \u0026 UX\n* **Modern React (v19):** Utilizing custom hooks and Tailwind CSS for a high-performance, responsive [Board UI](docs/assets/screenshots/gameplay-features/chess-board.png).\n* **Lobby \u0026 Social:** Sophisticated [Lobby System](docs/assets/screenshots/menu-page.png) and persistent [User Statistics](docs/assets/screenshots/ui-previews/checkmate-victory-screen.png) against players or the **Training Bot**.\n\n---\n\n## 🚀 Development Roadmap\n\n*Current Status: 📈 **Phase 11: Full-Stack Observability (LGTM)***\n\n- ✅ **Phase 1: Foundation** 🏗️ - Monorepo scaffolding, environment setup, and Spring Boot/React initialization.\n- ✅ **Phase 2: Domain Modeling** ♟️ - Piece-specific logic, board initialization, and DDD-based movement rules.\n- ✅ **Phase 3: Rule Engine** ⚖️ - Legal move validation (King safety, check/mate detection) and FIDE standards.\n- ✅ **Phase 4: Communication Layer** 📡 - WebSocket infrastructure using STOMP protocol and real-time event mapping.\n- ✅ **Phase 5: UI Integration \u0026 Local Play** 🖥️ - Interactive React 19 board, Pawn Promotion, and Castling UI.\n- ✅ **Phase 6: Visual Polish \u0026 UX** 🎨 - Dark/Light mode, theme support (Classic, Modern, Emerald), and Drag \u0026 Drop (`dnd-kit`).\n- ✅ **Phase 7: Identity \u0026 Persistence** 🔐 - Implemented **Spring Security + JWT**, User profiles, and PostgreSQL integration.\n- ✅ **Phase 8: Server-Side Authority** 🛡️ - Hardened backend validation for all moves and anti-cheat state management.\n- ✅ **Phase 9: Remote Multiplayer \u0026 Matchmaking** 🤝 - Global session management and real-time player pairing via WebSockets.\n- ✅ **Phase 10: Infrastructure \u0026 Containerization** 🐳 - Orchestrating services with **Docker \u0026 Docker Compose** and implementing **Liquibase** for DB versioning.\n- ⏳ **Phase 11: Full-Stack Observability (LGTM)** 📈 - Implementing **Grafana, Loki, and Prometheus** for real-time logs, metrics, and system health.\n- 📅 **Phase 12: Quality Assurance \u0026 Code Integrity** 🏆 - Expanding **JUnit 5/Mockito** coverage and integrating **SonarQube** for automated \"Zero Technical Debt\" reporting.\n- 📅 **Phase 13: Scalability \u0026 Resilience** ⚡ - Implementing **Resilience4j** (Circuit Breaker) and **Distributed Locking** with Redis.\n- 📅 **Phase 14: Advanced Analytics \u0026 AI** 🧠 - Integration of **Stockfish** via UCI protocol for move analysis and \"Hint\" system.\n\n---\n\n## 🐳 Infrastructure \u0026 Containerization\nThe entire application ecosystem is managed using **Docker Compose** to ensure absolute consistency between development and production environments.\n\n![Docker Startup Assets](./docs/assets/screenshots/docker-startup.png)\n\n\u003e **Infrastructure Note:** All services (PostgreSQL, Redis, Spring Boot, and React) include health-check protocols to ensure reliable inter-service communication and deterministic container startup sequences.\n\n---\n\n## 👨‍💻 Developed By\n**Batuhan Baysal** - *Software Engineer*\n*Scalable Software Design, Modern Java, and Backend Architectures.*\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://linkedin.com/in/batuhan-baysal) [![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/BatuhanBaysal)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatuhanbaysal%2Fchess-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbatuhanbaysal%2Fchess-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatuhanbaysal%2Fchess-platform/lists"}