A professional Next.js application for managing the Margate Krakens Flag Football Tournament with live score updates and real-time timer system.
- Live Tournament Schedule: Real-time display of all games with team logos
- Admin Panel: Complete score management and game control
- Real-Time Timer: 15-minute countdown timers for each half with start/stop controls
- Live Updates: Public view updates every 500ms during active games
- Team Management: Full team roster with statistics
- Mobile Responsive: Optimized for all device sizes
- Install Dependencies:
npm install- Initialize Database:
curl http://localhost:3000/api/init-data
curl http://localhost:3000/api/init-timers- Start Development Server:
npm run dev- Access the Application:
- Public View: http://localhost:3000
- Admin Panel: http://localhost:3000/admin
- Tournament: Squid Games 2025
- Date: Saturday, October 11th, 2025
- Host: Margate Krakens
- Teams:
- Margate Krakens
- Kent Exiles A
- Kent Exiles B
- Solent Red Storm
- Format: Single pitch, 6 games, 15-minute halves
The app features a professional timer system:
- Server-Side Timers: Run independently on the server
- Real-Time Updates: Frontend polls every 500ms during active games
- Visual Feedback:
- 🟢 Green + Pulsing = Timer Running
- 🔴 Red = Timer Stopped/Finished
- Auto-Stop: Timers automatically stop at 0:00
- Colors: Margate Krakens Yellow (#f9c413) and Pink (#d80e61)
- Font: Orbitron for tournament title
- Logo: Margate Krakens transparent logo
- Game Selection: Choose any game to manage
- Score Updates: Real-time score input
- Timer Controls: Start/Stop/Reset 15-minute timers
- Half Management: Switch between 1st and 2nd half
- Status Updates: Change game status (Scheduled/In Progress/Completed)
- Type: SQLite (file-based, no setup required)
- Auto-Creation: Database and tables created automatically
- Sample Data: Pre-loaded with tournament schedule and teams
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Database: SQLite with better-sqlite3
- Real-Time: Server-side timers with client polling
├── app/
│ ├── admin/page.tsx # Admin panel
│ ├── api/ # API routes
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Public schedule view
├── components/
│ └── ScheduleView.tsx # Schedule display component
├── lib/
│ ├── database.ts # Database operations
│ ├── sampleData.ts # Tournament data
│ └── timer.ts # Server-side timer system
├── public/
│ └── Krakens-Logo-transparent.png
└── types/
└── index.ts # TypeScript definitions
-
Start a Game:
- Go to Admin Panel
- Select the game
- Click "Start Match"
- Timer begins countdown
-
Update Scores:
- Enter scores in the admin panel
- Click "Update Game"
- Scores appear live on public view
-
Manage Timer:
- Start/Stop timer as needed
- Switch halves (resets timer to 15:00)
- Timer shows green when running, red when stopped
- Visit the main page to see live scores and countdown timers
- Updates automatically every 500ms during active games
- Shows team logos, scores, and game status
- Hot Reload: Changes update automatically
- TypeScript: Full type safety
- ESLint: Code quality checks
- Tailwind: Utility-first CSS
- Connect Repository: Link your GitHub repo to Netlify
- Build Settings:
- Build Command:
npm run build - Publish Directory:
.next
- Build Command:
- Environment Variables: None required
- Deploy: Netlify will automatically detect Next.js and deploy
- Connect Repository: Import your GitHub repo to Vercel
- Framework Preset: Next.js (auto-detected)
- Deploy: Vercel will automatically build and deploy
- Serverless Compatible: App automatically uses in-memory database on serverless platforms
- Local Development: Uses SQLite database for local development
- Data Persistence: Serverless deployments reset data on each deployment (suitable for tournaments)
Built for Margate Krakens Flag Football Club - Squid Games 2025 Tournament