Skip to content

weathear/football-score-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Football Score Tracker with Multiple Leagues

🚀 Quick Start

1. Install Dependencies

cd backend
npm install

2. Start Backend Server

npm start

Server runs on http://localhost:3000

3. Open Frontend

Simply open index.html in your browser

✨ Features

Multiple Leagues

  • ✅ Create unlimited leagues
  • ✅ Switch between leagues instantly
  • ✅ Each league has its own teams and matches
  • ✅ Delete leagues (except the last one)

Dark Theme

  • ✅ Dark blue/black color scheme
  • ✅ Better for viewing
  • ✅ Modern professional look

Backend API

  • ✅ Node.js + Express server
  • ✅ RESTful endpoints
  • ✅ File-based storage (JSON)
  • ✅ CORS enabled

📊 How to Use

Viewer Page (index.html)

  1. Select a league from the dropdown
  2. View standings and recent matches
  3. Auto-refreshes every 10 seconds

Admin Panel (admin.html)

  1. Create League: Click "New League" button
  2. Switch League: Select from dropdown
  3. Add Teams: Enter team name and click "Add Team"
  4. Record Matches: Select teams, enter scores, click "Record Match"
  5. Delete League: Click "Delete League" (must have 2+ leagues)

🎯 API Endpoints

GET    /api/leagues                          # Get all leagues
POST   /api/leagues                          # Create league
DELETE /api/leagues/:id                      # Delete league

GET    /api/leagues/:id/teams                # Get teams
POST   /api/leagues/:id/teams                # Add team
DELETE /api/leagues/:id/teams/:teamId        # Delete team

GET    /api/leagues/:id/matches              # Get matches
POST   /api/leagues/:id/matches              # Record match

🎨 Color Scheme

  • Background: Dark blue/black gradient (#1a1a2e, #16213e)
  • Sidebar: Dark (#0f1419)
  • Header: Blue gradient (#1e3a8a, #1e40af)
  • Accents: Blue (#3b82f6, #60a5fa)
  • Success: Green (#10b981)
  • Danger: Red (#ef4444)

📁 Project Structure

├── backend/
│   ├── server.js           # Express server
│   ├── package.json        # Dependencies
│   └── data/
│       └── leagues.json    # Stored data
├── index.html              # Viewer page
├── admin.html              # Admin panel
├── styles.css              # Dark theme styles
├── api.js                  # API service
├── viewer.js               # Viewer logic
└── admin.js                # Admin logic

💡 Example Use Cases

  1. Sports League: Track your local football league
  2. Fantasy League: Manage fantasy team standings
  3. Tournament: Run a knockout or round-robin tournament
  4. Multiple Divisions: Have separate leagues for different divisions
  5. Historical Data: Keep old seasons as separate leagues

Enjoy! ⚽

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors