Skip to content

CHaerem/SportSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SportSync ๐Ÿ†

A beautifully simple sports dashboard following the CALM principle - instantly scannable, elegantly informative, and completely automated.

Deploy Live Site

โœจ What is SportSync?

SportSync is a static sports dashboard that answers one question perfectly: "What sports are happening when?"

  • ๐Ÿ•’ Crystal clear time display with Norwegian timezone (24-hour format)
  • ๐ŸŽฏ CALM design - readable by grandparents, loved by tech users
  • ๐Ÿ”„ Fully automated - fresh data every 6 hours via GitHub Actions
  • ๐Ÿ“ฑ Mobile-first responsive design
  • ๐Ÿš€ Zero maintenance once deployed

๐Ÿš€ Quick Start

1. Deploy to GitHub Pages (1-click setup)

  1. Fork this repository
  2. Enable GitHub Pages: Settings โ†’ Pages โ†’ Deploy from /docs folder
  3. Visit your dashboard: https://yourusername.github.io/SportSync/
  4. Done! Data updates automatically every 6 hours

2. Local Development

git clone https://github.com/chaerem/SportSync.git
cd SportSync
npm run dev
# Open http://localhost:8000

๐Ÿƒโ€โ™‚๏ธ Live Demo

See it in action: chaerem.github.io/SportSync

๐Ÿ“Š Sports Coverage

Sport Data Source Coverage
โšฝ Football ESPN API Premier League, La Liga, Eliteserien
๐ŸŽพ Tennis ESPN API ATP, WTA, Grand Slams
๐ŸŒ๏ธ Golf ESPN API PGA Tour, DP World Tour, Majors
๐ŸŽ๏ธ Formula 1 ESPN Racing API Full race calendar + practice/qualifying
โ™Ÿ๏ธ Chess Curated Data Major tournaments, Norwegian focus
๐ŸŽฎ Esports HLTV API CS2 competitions (FaZe/rain focus)

๐ŸŽจ Design Philosophy

The CALM Principle

SportSync is designed to be instantly scannable without overwhelming users:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ TODAY              ๐ŸŸข FOOTBALL      โ”‚  โ† Day + Sport Badge
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 19:45                               โ”‚  โ† Large, clear time
โ”‚                                     โ”‚
โ”‚ Arsenal vs Manchester City          โ”‚  โ† Event title
โ”‚ Premier League โ€ข Emirates Stadium   โ”‚  โ† Competition & venue
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Perfect for everyone:

  • Grandparents: Large text, obvious controls, zero confusion
  • Tech users: Efficient scanning, comprehensive data
  • Mobile users: Touch-friendly, readable on any screen
  • Quick checks: Essential info visible at a glance

Time Display Strategy

All events show in Norwegian time (Europe/Oslo) using 24-hour format:

  • Today: "TODAY 19:45"
  • Tomorrow: "TOMORROW 14:30"
  • This week: "FRIDAY 16:00"
  • Future: "SUN, DEC 15 12:30"

๐Ÿ—๏ธ Architecture

GitHub Actions (every 6 hours)
    โ†“
Fetch fresh sports data from APIs
    โ†“
Generate unified events.json + individual sport files
    โ†“
Commit to repository โ†’ GitHub Pages deploys
    โ†“
Users see updated dashboard instantly

File Structure

docs/                           # GitHub Pages root
โ”œโ”€โ”€ index.html                  # Main dashboard (all-in-one file)
โ”œโ”€โ”€ js/
โ”‚   โ”œโ”€โ”€ simple-dashboard.js     # CALM dashboard controller  
โ”‚   โ””โ”€โ”€ sports-api.js           # API integration layer
โ”œโ”€โ”€ data/                       # Auto-generated by GitHub Actions
โ”‚   โ”œโ”€โ”€ events.json             # โญ Unified events feed (main data source)
โ”‚   โ”œโ”€โ”€ events.ics              # Calendar export
โ”‚   โ”œโ”€โ”€ football.json           # Per-sport source files
โ”‚   โ”œโ”€โ”€ tennis.json
โ”‚   โ”œโ”€โ”€ golf.json
โ”‚   โ”œโ”€โ”€ f1.json
โ”‚   โ”œโ”€โ”€ chess.json
โ”‚   โ”œโ”€โ”€ esports.json
โ”‚   โ””โ”€โ”€ meta.json               # Update timestamps
โ””โ”€โ”€ sw.js                       # Service worker for offline support

scripts/                        # Data fetching & processing
โ”œโ”€โ”€ fetch/                      # Modular API fetchers
โ”‚   โ”œโ”€โ”€ football.js
โ”‚   โ”œโ”€โ”€ tennis.js
โ”‚   โ”œโ”€โ”€ golf.js
โ”‚   โ”œโ”€โ”€ f1.js
โ”‚   โ”œโ”€โ”€ chess.js
โ”‚   โ””โ”€โ”€ esports.js
โ”œโ”€โ”€ config/                     # Curated configs
โ”‚   โ”œโ”€โ”€ chess-tournaments.json
โ”‚   โ””โ”€โ”€ norwegian-chess-players.json
โ”œโ”€โ”€ build-events.js             # Creates unified events.json
โ”œโ”€โ”€ build-ics.js                # Generates calendar export
โ””โ”€โ”€ validate-events.js          # Data integrity checks

.github/workflows/
โ””โ”€โ”€ update-sports-data.yml      # Automation pipeline

โš™๏ธ How It Works

๐Ÿค– Automated Data Pipeline

The entire system runs serverlessly using only GitHub infrastructure:

  1. GitHub Actions trigger every 6 hours (00:00, 06:00, 12:00, 18:00 UTC)
  2. Node.js scripts fetch fresh data from ESPN, HLTV, and curated sources
  3. Unified events.json gets generated with all upcoming events sorted chronologically
  4. Calendar export (.ics) created for external calendar apps
  5. Auto-commit pushes updated data to repository
  6. GitHub Pages instantly deploys the updated dashboard

๐Ÿ“ฑ Client-Side Strategy

The dashboard loads only one file (events.json) for maximum performance:

  • Cached data first - instant loading from GitHub CDN
  • Graceful fallback - handles API outages seamlessly
  • Offline support - service worker caches everything
  • Minimal JavaScript - <10KB total, works on any device

๐Ÿ› ๏ธ Development

Available Scripts

npm run dev        # Start local development server
npm run build      # Fetch data + build events + calendar
npm run test       # Validate data integrity
npm run clean      # Remove all generated data files
npm run refresh    # Clean + full rebuild

Data Pipeline Commands

npm run update:data     # Fetch fresh API data
npm run build:events    # Generate unified events.json  
npm run build:calendar  # Create calendar export (.ics)
npm run validate:data   # Check data integrity

Adding New Sports

  1. Create fetcher: Add scripts/fetch/newsport.js
  2. Update pipeline: Import in scripts/fetch/index.js
  3. Add to dashboard: Update sport badges in docs/index.html
  4. Test locally: npm run refresh

Customizing Focus

Edit sport priorities and Norwegian focus:

  • Chess tournaments: scripts/config/chess-tournaments.json
  • Norwegian players: scripts/config/norwegian-chess-players.json
  • API endpoints: Individual fetcher files in scripts/fetch/

๐Ÿ”ง Deployment Options

GitHub Pages (Recommended)

  • โœ… Free hosting
  • โœ… Automatic updates
  • โœ… Custom domain support
  • โœ… Global CDN

Alternative Platforms

  • Netlify: Connect your GitHub repo for auto-deploys
  • Vercel: Import project, deploy from /docs folder
  • Cloudflare Pages: GitHub integration with edge performance

๐Ÿ“… Calendar Integration

SportSync generates a standard .ics calendar file at /docs/data/events.ics:

  • Subscribe in any calendar app (Google Calendar, Apple Calendar, Outlook)
  • Auto-updates every 6 hours with fresh sports events
  • Includes participants for chess tournaments and team sports
  • Norwegian timezone for accurate local times

๐ŸŽฏ Why SportSync?

In a world of cluttered sports apps and overwhelming dashboards, SportSync returns to simplicity:

  • No notifications - just information when you need it
  • No accounts - works instantly for everyone
  • No premium features - everything is free and open source
  • No bloat - pure HTML/CSS/JS, works on any device
  • No maintenance - set it and forget it

Perfect for checking your daily sports schedule over morning coffee or planning your weekend viewing. โ˜•๏ธ๐Ÿ†

๐Ÿค Contributing

We welcome contributions that maintain the CALM principle:

  1. Fork the repository
  2. Keep changes simple and user-focused
  3. Test on both mobile and desktop
  4. Ensure accessibility and readability
  5. Create a Pull Request with clear description

๐Ÿ“„ License

MIT License - feel free to create your own sports dashboard!


Built with โค๏ธ for sports fans who value simplicity over complexity.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •