Skip to content
This repository was archived by the owner on Aug 9, 2025. It is now read-only.

wersplat/bodega-esports-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bodega Esports Platform

05/17/2025

Node.js TypeScript Discord.js License Railway Deployment CI GPLv3 License Discord Sentry Monitoring

πŸ“Š Monitoring Status

Bodega Platform monitoring via UptimeRobot Public Dashboard:

Service Type Status Badge
Frontend HTTP(s) Frontend
Backend HTTP(s) Backend
Discord Bot Heartbeat Bot

πŸ”— View live status: uptime dashboard


🎯 Overview

Bodega Esports Platform is a full-stack web application designed for gaming tournament management. Its frontend is a Next.js-based React application providing a dynamic, component-driven UI. The backend is a Node.js/Express server exposing RESTful APIs. A separate Discord bot component uses Discord.js to facilitate community interactions (e.g., registering users, reporting scores). In a future update, an OCR (Optical Character Recognition) module (e.g., Tesseract) will be added to parse match screenshots and scoreboards automatically.


πŸ“¦ Platform Components

πŸ–₯️ Frontend (Next.js + Tailwind)

  • SSR React app for players, team managers, and admins
  • Leaderboards with season/division/stat filtering
  • Auth via Supabase
  • Responsive mobile-first layout with custom styling
  • Exports to Google Sheets and CSV

βš™οΈ Backend (FastAPI + Supabase)

  • REST API for players, teams, matches, and stats
  • Supabase Postgres with full schema and RLS
  • Stat normalization, MVP scoring, match result handling
  • Export-ready endpoints for leaderboard and standings
  • OAuth-ready, supports Discord-based auth

πŸ€– Discord Bot (TS + discord.js)

  • Slash commands: /roster, /submitstats, /flag, /broadcast
  • OCR screenshot submission via /submitstats
  • Weekly MVP alerts, top scorers, reminders
  • Deployed as Render Background Worker from discord-bot/
  • Uses heartbeat ping to Healthchecks.io

🧠 OCR Engine (Python, PaddleOCR)

  • OCR parser for 2K box scores (JPG/PNG)
  • Uses PaddleOCR with PIL and fallback to Tesseract
  • Exposed via /api/ocr FastAPI route
  • Supports positional parsing, stat cleanup, and stat validation

πŸ“ Folder Structure

bodega-esports-platform/
β”œβ”€β”€ frontend/            # Next.js application
β”‚   β”œβ”€β”€ app/             # Next.js App Router directory
β”‚   β”œβ”€β”€ public/          # Static assets
β”‚   β”œβ”€β”€ components/      # Shared React components
β”‚   β”œβ”€β”€ pages/           # Legacy pages (if any)
β”‚   β”œβ”€β”€ next.config.js   # Next.js configuration
β”‚   β”œβ”€β”€ tsconfig.json    # TypeScript config
β”‚   └── package.json     # Frontend dependencies
β”œβ”€β”€ backend/             # Node.js/Express server
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ routes/
β”‚   └── package.json
β”œβ”€β”€ discord-bot/         # Discord bot (Node.js, Discord.js)
β”‚   β”œβ”€β”€ commands/
β”‚   β”œβ”€β”€ index.js
β”‚   └── package.json
β”œβ”€β”€ ocr/                 # Placeholder for future OCR component
β”œβ”€β”€ package.json         # (Workspace or root metadata)
└── README.md

Setup and Installation

Prerequisites:

  • Node.js v16+ and npm
  • Discord bot credentials (token, client ID)
  • Environment variables managed via .env files in each module

Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install dependencies and start the dev server:
    npm install
    npm run dev
  3. The app will run at http://localhost:3000 by default. Configure API URL and other settings via .env.local, e.g.:
    NEXT_PUBLIC_API_URL=http://localhost:5000/api

Backend

  1. Open a new terminal and enter the backend folder:
    cd backend
  2. Install dependencies:
    npm install
  3. Copy and configure environment variables:
    cp .env.example .env
    # then edit .env to set PORT, DATABASE_URL, etc.
  4. Start the server:
    npm run dev
  5. The API will be available at http://localhost:5000 (or your configured port).

Discord Bot

  1. In another terminal, go to the discord-bot folder:
    cd discord-bot
  2. Install dependencies:
    npm install
  3. Copy the environment template and configure:
    cp .env.example .env
    # set DISCORD_TOKEN, CLIENT_ID, GUILD_ID, etc.
  4. Deploy slash commands (if applicable):
    npm run deploy
  5. Start the bot:
    npm start

After these steps, you should have the frontend, backend, and Discord bot running locally. Each component has its own .env and scripts to manage development and production builds.

Usage

  • Frontend: Browse to http://localhost:3000. Use the UI to view tournaments, teams, and scores.
  • Backend: Interact with REST endpoints via HTTP clients (e.g., curl, Postman) under /api, e.g., GET /api/teams.
  • Discord Bot: Invite the bot using its OAuth2 URL, then use configured slash commands in your Discord server (e.g., /register, /report-score).

Future Work

  • OCR Integration (Placeholder): Add an OCR component (e.g., Tesseract) in ocr/ to parse text from match screenshots and automate stat entry.
  • Deployment: Replace badge placeholders with real Railway and Sentry URLs once deployed, and configure CI/CD pipelines accordingly.

References


πŸ“„ License

GPLv3 β€” open-source and modifiable with attribution.


πŸ‘€ Author & Community

Bodega Cats Gaming Club
🌐 bodegacatsgc.gg
πŸ’¬ Discord: Bodega Cats Gaming Club

About

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •