Skip to content
Nirmit-AnganePublic

About

SportX : A web-based sports event management platform featuring tournament scheduling, live scores, team management, standings, and QR-based match access.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SportX 🏆

SportX is a complete, centralized Sports Event Management, Live Score, and QR Access Platform. It has been built from the ground up prioritizing simplicity, stability, maintainability, and a professional user experience.


🏗️ Architecture

The system is designed with a Central Source of Truth architecture to support multiple administrators seamlessly without state desynchronization. The platform is entirely web-based.

graph TD
    A["Admin Web Client 1"] -->|REST API| C("Central Node.js API")
    B["Admin Web Client 2"] -->|REST API| C
    C <-->|Read/Write| D[("Central PostgreSQL DB")]
    E["Public Web App"] -->|REST API Polling| C
    F["Mobile Phones via QR"] -->|HTTP| E
Loading

Components

  1. Central Database (database/): PostgreSQL database serving as the single source of truth for all events, teams, and live scores.
  2. Central API (server/): A Node.js/Express REST API written in TypeScript. It handles all business logic, QR code generation, and database interactions.
  3. Admin Dashboard (web/admin.html): A secure, protected web dashboard for authorized staff, allowing tournament control and score updates from any modern browser.
  4. Public Web Application (web/): A mobile-first, responsive HTML/JS/CSS frontend. Spectators scan QR codes and instantly view auto-updating live scores and brackets.

🚀 How to Launch Locally

1. Database Setup

  1. Ensure you have PostgreSQL installed and running on port 5432.
  2. Create a database named sportx.
  3. Run the schema and seed scripts against it:
    psql -U postgres -d sportx -f database/schema.sql
    psql -U postgres -d sportx -f database/seed.sql

2. Start the Central API

cd server
npm install
npm run dev

The API will start on http://localhost:5000.

3. Start the Web App

You can use any standard HTTP server to serve the static files.

cd web
npx http-server -p 3000

The website will be available at http://localhost:3000.

4. Admin Access

The admin dashboard is an integrated secure portal.

  1. Navigate to http://localhost:3000/login.html
  2. Login with the default credentials:
    • Username: admin
    • Password: admin123

5. Inspect / View Database in Terminal

SportX includes a built-in terminal tool to inspect tables and run queries directly in your terminal without requiring psql to be installed:

# View all tables and row counts
node server/query.js

# View data from a specific table (e.g. teams, matches, sports, events, players)
node server/query.js teams
node server/query.js matches

# Run a custom SQL query directly
node server/query.js "SELECT id, name, captain, coach FROM teams LIMIT 5"

Tip: If you are inside the server/ directory, you can also use npm run db:view or node query.js <table_name>.


📱 Core Features

  • Multi-Admin Synchronization: Update a score on one admin device, and it is instantly reflected on all other devices and spectator phones.
  • QR Code System: Generate printable QR posters dynamically via the backend API.
  • Zero-Friction Mobile Experience: Scanning a match QR code routes directly to the specific live match page—no menus, no searching.
  • Automated Bracket Generation: Admins can generate and visualize tournament brackets dynamically.
  • Live Auto-Polling: The web client automatically polls the central API to update scores in real-time with subtle visual indicators.
  • Premium UI: Dark sports aesthetics, high-contrast typography, and micro-animations designed for professional broadcast environments.

About

SportX : A web-based sports event management platform featuring tournament scheduling, live scores, team management, standings, and QR-based match access.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages