Skip to content

seafoodd/ultiTTT

Repository files navigation

CI

ultiTTT is a fully custom‑built Ultimate Tic Tac Toe platform designed for head‑to‑head 1v1 play, with live matchmaking, ranked ladders, profiles and persistent match history.

ultiTTT Game Preview


Features

  • Real‑time gameplay
    • Bi‑directional updates via WebSockets (socket.io)
    • Server‑side move validation, disconnect handling, timeouts
  • Competitive ladder
    • ELO‑style ranking
    • Matchmaking queue for balanced 1v1s
  • Persistent history & accounts
    • Ongoing games in Redis (stateless server design)
    • Finished matches, player profiles, stats in MongoDB
  • Responsive, minimal UI
    • Built with Vite, React and Tailwind CSS
    • Focus on speed, clarity, mobile‑friendliness
  • Robust infrastructure
    • Containerized with Docker
    • CI/CD pipelines (GitHub Actions)
    • Automated backups for MongoDB

Tech Stack & Architecture

Layer Technology
Frontend Vite, React, Tailwind CSS
Realtime socket.io (WebSockets)
Backend NestJS (modular, feature‑based),
Express.js (legacy API)
Cache Redis
Database MongoDB
DevOps Docker, docker‑compose, nginx
CI/CD GitHub Actions
Hosting Digital Ocean Droplet

✅ Note: The new NestJS-based API (in server-v2/) is actively in development. The legacy Express API (server/) remains functional until the migration is complete.


Getting Started

1. Clone the repo

git clone --branch dev https://github.com/seafoodd/ultiTTT.git
cd ultiTTT

2. Copy & configure .env files in root, client/, and server-v2/

cp .env.example .env
vim .env

Open .env and fill in your values

if you run the app with docker-compose.dev.yml, then you only need these env variables in server-v2/.env (because other ones will be overwritten):
# Brevo (Sendinblue) API key and sender email
BREVO_API_KEY=your-brevo-api-key
BREVO_SENDER_EMAIL=no-reply@example.com

3. Development with Docker

Bring up all services:

docker‑compose ‑f docker‑compose.dev.yml up --build
  • client on http://localhost:5173
  • server on http://localhost:5000
  • server-v2 on http://localhost:5001

4. Running Locally without Docker (optional)

Frontend

cd client
npm install
npm run dev

Backend

legacy api:

cd server
npm install
npm run dev

v2 api:

cd server-v2
pnpm install
pnpm run start:dev
(you'll also have to set up mongodb and redis, I used docker containers for them before I started using dev docker-compose)

Production

  1. Build containers:

    docker‑compose build
  2. Start in detached mode:

    docker‑compose up ‑d
  3. Check logs:

    docker‑compose logs ‑f

Database backups are managed automatically via the scripts in the scripts/ directory and run with cron.


CI/CD

GitHub Actions workflows live in .github/workflows/

On each push to main, we:

  1. Run tests
  2. Deploy to DigitalOcean droplet

Contributing

  1. Fork the repo
  2. Create a topic branch (git checkout -b feature/awesome)
  3. Commit your changes & push
  4. Open a Pull Request against master
  5. Ensure all GitHub Actions pass

Repo Activity

Alt


License

ultiTTT is licensed under the GNU Affero General Public License 3. See LICENSE for details.

About

ultiTTT - competitive Ultimate Tic Tac Toe online platform

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors