Chessl.ink is a simple yet engaging online chess game built using Next.js. With Chessl.ink, you can quickly start a game by opening the webpage and sharing the link (4 character code) with a friend. It's a convenient way to play chess together from different locations.
Playing chess with Chessl.ink is straightforward:
- Open the Website: Run project on your device.
- Share the Link: Chessl.ink will provide you with a randomly generated link. Copy this link and share it with your friend whom you want to play with.
- Wait for Your Friend: Your friend can open the shared link, and both of you will be connected to the same chessboard.
- Play Chess!: Enjoy a game of chess with your friend! Make your moves by clicking and dragging the chess pieces. The game will keep track of the moves, and you can chat with your opponent in real-time.
- Game Over: The game will continue until one of you wins by checkmate, a draw occurs, or you decide to end the game.
- State: Managed using React Context and React Reducer.
- TailwindCSS: UI
- TypeScript: Typesafety
- Next.js: Allows server-side rendering and other useful features. Upon the initial visit, the returned website already contains an unique link.
- WebSockets: Chess moves are handled in real-time, enabling players to see their opponent's moves without refreshing the page. Each player is identifiable by unique sessionId. The game state is persistent, even if player closes the WS connection.
- Redis: In this project, Redis greatly simplifies session and linkage management, rendering the use of a relational database unnecessary.
This project is still in an early stage of development
- Monorepo
- Error handling
- UX improvements
- GitHub Actions