{"id":26237625,"url":"https://github.com/alkush-pipania/antichess","last_synced_at":"2025-06-15T12:39:22.095Z","repository":{"id":276015396,"uuid":"927297739","full_name":"Alkush-Pipania/AntiChess","owner":"Alkush-Pipania","description":"A real-time, online chess game built with Next.js for the frontend and WebSocket for real-time communication. The backend is designed to manage game logic, player turns, and ensure smooth gameplay.","archived":false,"fork":false,"pushed_at":"2025-02-08T12:38:54.000Z","size":623,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T05:31:52.032Z","etag":null,"topics":["chess","chessgame-backend","chessgame-frontend","real-time","websocket"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alkush-Pipania.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-04T18:19:28.000Z","updated_at":"2025-02-26T15:28:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ce544f2-903b-4375-98a2-beba15100168","html_url":"https://github.com/Alkush-Pipania/AntiChess","commit_stats":null,"previous_names":["alkush-pipania/chesslet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Alkush-Pipania/AntiChess","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alkush-Pipania%2FAntiChess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alkush-Pipania%2FAntiChess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alkush-Pipania%2FAntiChess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alkush-Pipania%2FAntiChess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alkush-Pipania","download_url":"https://codeload.github.com/Alkush-Pipania/AntiChess/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alkush-Pipania%2FAntiChess/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259977667,"owners_count":22941115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","chessgame-backend","chessgame-frontend","real-time","websocket"],"created_at":"2025-03-13T05:28:49.165Z","updated_at":"2025-06-15T12:39:22.079Z","avatar_url":"https://github.com/Alkush-Pipania.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Online Chess Game\n\nA real-time, online chess game built with **Next.js** for the frontend and **WebSocket** for real-time communication. The backend is designed to manage game logic, player turns, and ensure smooth gameplay.\n\n## Features\n\n- Real-time multiplayer chess with WebSocket integration.\n- Move validation and game state management using **chess.js**.\n- Custom pawn promotion dialog.\n- Timer for each player with automatic time updates.\n- Handles disconnection and reconnection gracefully.\n- Displays move history and game status (check, checkmate, stalemate).\n- Responsive and modern UI using **Tailwind CSS**.\n\n## Technologies Used\n\n### Frontend:\n- **Next.js** with TypeScript\n- **React Chessboard** for the chess interface\n- **Tailwind CSS** for styling\n- **WebSocket** for real-time communication\n- **chess.js** for move validation and game logic\n\n### Backend:\n- **WebSocket** server handling game state and communication\n- Manages game sessions, player turns, and time updates\n\n## Getting Started\n\n### Prerequisites\n- Node.js (v16 or higher)\n- npm or yarn\n\n### Installation\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/your-username/online-chess-game.git\n   cd online-chess-game\n   ```\n\n2. **Install dependencies:**\n   ```bash\n   npm install\n   # or\n   yarn install\n   ```\n\n3. **Run the WebSocket server:**\n   ```bash\n   node server.js\n   ```\n\n4. **Run the frontend:**\n   ```bash\n   npm run dev\n   # or\n   yarn dev\n   ```\n\n5. **Open your browser:**\n   Go to [http://localhost:3000](http://localhost:3000) to start playing.\n\n## Folder Structure\n\n```\n.\n├── _components\n│   ├── Chessboard.tsx          # Chessboard component with drag-and-drop support\n│   ├── Timer.tsx               # Timer for each player\n│   ├── PromotionDialog.tsx     # Custom pawn promotion dialog\n│   ├── GameOver.tsx            # Game over screen\n│   ├── Disconnect.tsx          # Disconnection notification\n│   └── Chess-loading.tsx       # Loading screen before the game starts\n│\n├── lib\n│   └── Message.ts              # WebSocket message types\n│\n├── pages\n│   └── index.tsx               # Main game logic and UI\n│\n├── public                     # Static assets\n│\n├── styles                     # Global styles\n│\n├── server.js                  # WebSocket server handling game sessions\n│\n└── README.md                  # Project documentation\n```\n\n## Game Features in Detail\n\n### Real-time Gameplay\n- WebSocket ensures smooth real-time communication between players.\n- The game starts automatically when two players connect.\n\n### Move Validation\n- All moves are validated using **chess.js**.\n- Illegal moves are rejected, and feedback is provided.\n\n### Pawn Promotion\n- When a pawn reaches the opposite end, a custom dialog appears allowing players to choose between Queen, Rook, Bishop, or Knight.\n- Only one promotion dialog (custom or default) is shown to avoid conflicts.\n\n### Timer Management\n- Each player starts with 10 minutes.\n- Time is updated in real-time and synced between players.\n\n### Disconnection Handling\n- If a player disconnects, a notification is shown.\n- The game pauses until the player reconnects or the game is forfeited.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falkush-pipania%2Fantichess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falkush-pipania%2Fantichess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falkush-pipania%2Fantichess/lists"}