Enterprise full-stack implementation for Over-Engineered Tic-Tac-Toe (Tic-Tac-Toe in Java deliberately over-engineered to apply features of Java introduced over time.)
This uses what I like to call the PERQ stack:
For performant, modern enterprise Java-based cloud native services with Remix/React for server-side rendering.
WIP: Developed both due to my daughter's complaints that she didn't want to use the command-line and as a full-stack intermission/playground to pair with the ongoing blog post: Road to JDK 25 - Over-Engineering Tic-Tac-Toe also serialized to Medium @ Road to JDK 25 - Over-Engineering Tic-Tac-Toe On Medium.
Nothing says over-engineering like a full-stack service implementation just to play tic-tac-toe! Read Over-Engineering Tic-Tac-Toe: Service Stop for more background.
- NodeJS
- Quarkus
- Basic 3x3 Tic-Tac-Toe functionality supported: Player vs Player, Player vs Bot
- Advanced: Sound effects, music, Persistent sound configuration
- Pending: Tests, Error Handling, Configurability, Administration, Timeouts, Non-standard game setups, Analytics, Cloud configuration, Network play etc.
- tictactoe-game-service: gRPC-based service for game logic and game management (Java/Quarkus)
- tictactoe-api-gateway: REST service for game api (Java/Quarkus)
- tictactoe-web-service: Web service for game UI (Typescript/Remix)
If you don't have Java 23 installed on your system you can install it first with SDKMAN (Windows Users should use WSL: https://sdkman.io/install/):
curl -s "https://get.sdkman.io" | bash
Using SDKMAN you can then easily install Java Dependencies:
sdk install java 23-tem
sdk install quarkus
sdk install gradle
If you don't have Node installed on your system you can install it using NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# Download and install Node.js:
nvm install 22
node -v
After installing the build dependencies you will need to run all services in order to develop against/use the game.
- Start tictactoe-game-service:
cd tictactoe-game-service && quarkus dev
- Start tictactoe-api-gateway:
cd tictactoe-api-gateway && quarkus dev
- Start tictactoe-web-service:
cd tictactoe-web-service && npm install & npm run dev
- Navigate to http://localhost:5173/games
- Hit "Start Game" and wait to play vs. bot. Alternatively, open another private window to http://localhost:5173/games and Hit "Start Game" again to play player vs. player, locally.