Skip to content

briancorbinxyz/overengineering-tictactoe-microservices

Repository files navigation

image

Over-Engineering Tic-Tac-Toe Microservices

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.) overengineering tic-tac-toe the game

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.

Build Dependencies

  • NodeJS
  • Quarkus

Status

  • 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.

Services

  1. tictactoe-game-service: gRPC-based service for game logic and game management (Java/Quarkus)
  2. tictactoe-api-gateway: REST service for game api (Java/Quarkus)
  3. tictactoe-web-service: Web service for game UI (Typescript/Remix)

Quick Start

Dependency Installation

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

Starting services

After installing the build dependencies you will need to run all services in order to develop against/use the game.

  1. Start tictactoe-game-service: cd tictactoe-game-service && quarkus dev
  2. Start tictactoe-api-gateway: cd tictactoe-api-gateway && quarkus dev
  3. Start tictactoe-web-service: cd tictactoe-web-service && npm install & npm run dev
  4. Navigate to http://localhost:5173/games
  5. 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.

About

Full-stack over-engineered tic-tac-toe implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published