Skip to content

tmcarmichael/nxtchess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

89 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

nxtchess

Development Status License Issues Code Style

Early demo

πŸš€ Project Vision

Create a lean, high-performance, multiplayer chess platform that incorporates unique training modes and AI-driven features.

The project is currently in early development. Check out the Roadmap below for planned features.


⚑️ Quick Start

Install Docker & Docker Compose Recommended: Docker Desktop

  1. Run the one-shot Make command:
make dev
  1. Open the frontend at http://localhost:5173

For 'sign in' funcationality, OAuth clientID/secret is required in backend env.

CTRL+C to bring the containers down.


πŸ’» Tech Stack


πŸ“œ Roadmap

What's planned next?

πŸš€ (In Progress) Phase 4: Server Engine Integration, Rating, and Training

  • Wrap the Stockfish binary in Golang to interface via UCI for server-side engine evaluations.
  • Implement server-side move validation, rating calculations, and storage of game results.
  • Reflect multiple rating types (blitz, rapid, AI training) in user profiles.
  • Add websocket support for real-time rated modes against engine or human players.
  • Refactor the frontend chessboard for seamless reuse across various game modes.
  • Refine user flows for account creation, username collisions, and sign-in edge cases.

Phase 5: Deployment, Logging, and Monitoring

  • Deploy FE & BE on Azure Apps, sidecar Redis instance for ephemeral session data.
  • Deploy a basic/free tier PostgresDB for persisting profiles and game history.
  • Establish a GitHub Actions CI/CD pipeline for automated builds, tests, and deployments.
  • Create staging and prod realms and integrate with CI/CD.
  • Implement a minimal ELK stack to centralize, index, and visualize logs.
  • Prometheus for metrics from Golang server, Postgres, and Redis sidecar.
  • Grafana to visualize key Prometheus logs, health checks, and alerting.
  • Configure domain, SSL certificates, and AKS env-based secret management for prod.

Phase 6: Quality Assurance and Performance Optimization

  • Add unit, integration, and end-to-end tests for critical frontend and backend flows.
  • Enable coverage reports and automated testing in CI/CD pipelines.
  • Load testing and optimization of server concurrency/caching strategies.
  • Database indexing, migrations, and query performance.
  • Integrate security scanning and code linting checks into CI/CD pipeline.
  • (Nice to have) Expand i18n/l10n support or plan for multi-language interfaces.
  • (Nice to have) Improve board resizing, accessibility, and cross-browser compatibility.

Phase 7: Enhanced Mechanics and Community

  • Develop unique AI training modes with server-based analysis.
  • Build a tournament system with scheduling, brackets, and user match histories.
  • Introduce friend lists or user-specific invites for community matches.
  • Add advanced player profile statistics and anti-cheat mechanisms.
  • Create a basic community layer (forums, Discord integration).
  • (Nice to have) API contract (OpenAPI, gRPC, or GraphQL) to formalize FE/BE interactions.

πŸ› οΈ Getting Started

Prerequisites

  • Node.js v16 or later
  • Yarn (Recommended)
  • Go v1.21 or later (if you run the backend outside of Docker)
  • Docker and Docker Compose (Docker Desktop Recommended)

You can build and run the frontend, server, or the whole app. Set .env in apps/frontend and apps/backend as needed.

Use the Makefile, for key commands:

make help
  1. Complete app startup

For a full startup (frontend, backend, DB, Redis):

make dev

This builds images, starts containers, and runs everything in attached mode on local ports. For server and sign in flows, OAuth clientID and secrets are required.

  1. Backend Server Only

For backend server only (and its DB/Redis dependencies):

make up PROFILES=backend

You can verify backend is up with:

curl http://localhost:8080
  1. Frontend Only

If you only want the frontend dev server:

make up PROFILES=frontend
  1. [Optional] Cleanup Commands

Key commands are:

To stop containers without removing them:

make stop PROFILES=full

To stop and remove containers:

make down PROFILES=full

To stop and remove containers and their volumes:

make clean PROFILES=full
  1. [Optional] Logs and Containers Exec

To follow logs for backend containers:

make logs PROFILES=backend

To access db container psql:

make exec-db

To open redis-cli in the redis container:

make exec-redis

To shell into the backend container:

make exec SERVICE=backend CMD="bash"

✨ Design North Star 2-17-25

Early design

🀝 Contributing

Contributions welcome. Get in touch, send a PR, or open a GitHub issue.


πŸ“§ Contact

Releases

No releases published

Packages

No packages published