Skip to content
prayaspoudelPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CueMaster Pro — Billiards & Snooker Tournament & Rating Web Application

Production-grade Snooker & Billiards Tournament Management and Dual Elo Rating System built with Go (Clean Architecture), PostgreSQL, and React (TypeScript + Tailwind CSS + Lucide Icons).


⚡ Tech Stack

  • Backend: Go (Golang) Clean Architecture (/cmd/server, /internal/billiards/...)
  • Frontend: React 18 + TypeScript + Vite + Tailwind CSS + Lucide Icons (/web)
  • Database: PostgreSQL 16 (Single schema source of truth: db/init/schema.sql)
  • Containerization: Docker Compose (docker-compose.yml with billiards-db, billiards-api, billiards-web)
  • API Testing: Postman Collection (billiards_postman_collection.json)

🏛️ Core Features

  1. Dual Elo Rating Engine ($K=32$, Base 1000):

    • Head-to-Head encounters update General Elo; official tournaments update Tournament Elo; composite Overall Elo updates for circuit rankings.
    • Calculates rating changes atomically inside PostgreSQL transactions when match results are submitted.
    • Immutable audit logs (rating_logs) preserve historical rating shifts.
  2. Club & Multi-Club Membership Management:

    • Lifecycle Statuses: Organizations support ACTIVE, SUSPEND, and DISABLED statuses (administered by Admin; affects system-wide dropdowns and match logging).
    • Multi-Club Affiliation: Players can join and represent multiple snooker clubs simultaneously.
    • Join Request Workflow: Players submit join requests from the Club Directory; Club Managers review, approve, or reject applications with generated membership cards (MEM-{orgID}-{last4}).
    • Club Roster Portal: Managers enroll players directly, track club member ratings, and review pending applications.
  3. Admin CRUD Management:

    • Full management interface for Tournaments (create, edit, delete, prize pools, date ranges).
    • Full management interface for Organizations (create, edit, change status, assign managers).
  4. Tournament Operations & Live Standings:

    • Status filtering (all, upcoming, ongoing, previous).
    • Dynamic standings computed live from verified match records (wins, losses, frames won/lost, points).
  5. Scorekeeper & Strict Match Invariants:

    • Log frames won and total points with strict winner invariant validation (winner_id must match the player with higher frame score).
  6. Identity & Authentication:

    • Default user password is the player's phone_number.
    • Role-based authorization (ADMIN, MANAGER, PLAYER).
    • Profile management with hand profile preferences (RIGHT, LEFT, AMBIDEXTROUS).

🚀 Running the Project

Using Docker Compose

docker compose up -d --build
  • Frontend Web App: http://localhost:3000
  • Go API Backend: http://localhost:8080
  • PostgreSQL Database: localhost:5432

Default Administrator Account:

  • Phone: +15550001
  • Password: +15550001

Running Locally

1. Backend (Go)

go run ./cmd/server

2. Frontend (React)

cd web
npm install
npm run dev

🧪 Verification Commands

gofmt -w .
go vet ./...
go test ./...
go build ./...
go build -o bin/evero.exe ./cmd/server
cd web && npm run build

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages