Inital Design & Development Plan
Provide a clear, structured roadmap of development milestones, including timeline, design artifacts, and responsibilities.
Roadmap with Milestones (4 Weeks)
Section titled “Roadmap with Milestones (4 Weeks)”Week | Focus Area | Tasks / Deliverables |
---|---|---|
1 | Setup & Design | - Set up GitHub repo & CI/CD - Project scaffolding (React + Node + DB) - UI wireframes (Figma) - Architecture diagram |
2 | Authentication | - Implement sign-up/login/logout - Role-based access (admin, user) - Connect to DB for user storage |
3 | Core Features | - Live score input (admin) - Real-time updates (WebSocket) - Dashboard for viewers |
4 | Testing & Feedback | - Unit & integration tests - Usability testing session - Sprint Review demo - Collect & apply feedback |
Tools: GitHub, Notion, Figma, Draw.io, Clerk/Auth0, Firebase, Express.js, React, Jest
Design Artifacts
Section titled “Design Artifacts”- Wireframes → UI mockups for core pages (Login, Dashboard, Match Input, Viewer)
- Architecture Diagram → High-level system overview (Frontend ↔ Backend ↔ Firebase)
- UML Diagrams → Use Case Diagram + Component Diagram
Wireframes
Section titled “Wireframes”Use Case Diagram
Section titled “Use Case Diagram”Shows how admins, viewers, and guests interact with the system.
Main Use Cases:
Admin → Add/Edit/Remove Matches, Manage Users, Push Updates
Viewer → View Live Scores, Follow Teams, Receive Notifications
Component Diagram
Section titled “Component Diagram”High-level breakdown of frontend, backend, and Firebase integration.
Components:
a) Frontend (React)
Section titled “a) Frontend (React)”- Pages (Login, Dashboard, Viewer)
- Reusable Components (MatchCard, ScoreBoard)
- Talks to backend via REST APIs and WebSockets
b) Backend (Node.js + Express)
Section titled “b) Backend (Node.js + Express)”- Auth Service
- Match Service
- Database (Firebase)
- Firestore: Matches, Users, Events
Sequence Diagram
Section titled “Sequence Diagram”Example: Admin adds a goal → Viewers see it live.
Data Model (ER Diagram)
Section titled “Data Model (ER Diagram)”Entities: User, Team, Match, Event, Player.
Deployment Diagram
Section titled “Deployment Diagram”Local dev, Azure hosting, Firebase integration.
System Architecture Overview
Section titled “System Architecture Overview”a) Frontend (React)
Section titled “a) Frontend (React)”- Displays live match data, timelines, and match setup forms
- Pages: Login, Dashboard, Preferences
- Talks to backend via REST APIs and WebSockets
b) Backend (Node.js + Express)
Section titled “b) Backend (Node.js + Express)”- Handles API requests from frontend
- Manages authentication, CRUD for matches, events
- Pushes live updates via WebSockets
c) Database (Firebase)
Section titled “c) Database (Firebase)”- Stores matches, events, players, teams, and user preferences
Backend API Endpoints
Section titled “Backend API Endpoints”POST /auth/login
→ User loginPOST /auth/signup
→ Create new userPOST /auth/logout
→ End session
Matches
Section titled “Matches”POST /matches
→ Create new matchGET /matches
→ Get all matchesGET /matches/:id
→ Get single matchPUT /matches/:id
→ Update match infoDELETE /matches/:id
→ Delete match
Events
Section titled “Events”POST /matches/:id/events
→ Add event (goal, foul, substitution, etc.)PUT /matches/:id/events/:eventId
→ Edit eventDELETE /matches/:id/events/:eventId
→ Remove event
GET /matches/:id/feed
→ Get current match stateGET /matches/:id/timeline
→ Get chronological list of events
Preferences
Section titled “Preferences”GET /users/:id/preferences
→ Get user preferencesPUT /users/:id/preferences
→ Update preferences
Database Schema
Section titled “Database Schema”Users
- user_id (PK)
- password_hash
- favorite_teams
Teams
- team_id (PK)
- name
- logo_url
Players
- player_id (PK)
- name
- team_id (FK)
Matches
- match_id (PK)
- home_team_id (FK)
- away_team_id (FK)
- start_time
- venue
- status (scheduled, live, paused, ended)
Events
- event_id (PK)
- match_id (FK)
- timestamp
- event_type (goal, foul, substitution, etc.)
- description
- team_id (FK, optional)
- player_id (FK, optional)
Frontend Components (React)
Section titled “Frontend Components (React)”-
LoginPage
- Inputs: Email, Password
- Buttons: Sign In, Forgot Password, Sign Up
-
Dashboard
- TopNav: Logo, User Profile, Logout button
- Sidebar: Links to Live Matches, Match Setup, Event Timeline, Preferences
- Main Area:
- LiveScoreboard: Teams, logos, score, timer, possession
- EventTimeline: Vertical list of events
- MatchControlPanel: Pause/Resume, Add Event form
-
PreferencesPage
- Select favorite teams
- Choose default layout
- Toggle notifications
Reusable Components
Section titled “Reusable Components”- MatchCard
- EventItem
- TeamSelector
- TimeDisplay
- FormModal (add/edit matches/events)
Integration Flow
Section titled “Integration Flow”- Admin/Operator creates a match via
/matches
- Operator adds live events manually via
/matches/:id/events
- Backend stores the event in Events table
- Backend updates Matches table with new score/time
- Frontend fetches state via
/matches/:id/feed
- WebSocket pushes live updates instantly
- Preferences API customizes what each user sees
Development Workflow
Section titled “Development Workflow”This guide covers the development process for the Sports Live application.
Development Modes
Section titled “Development Modes”Mock Data Mode (Recommended for Development)
npm start
- Uses mock sports data
- No API costs
- Fast development
Live Data Mode (For Testing)
npx vercel dev
- Uses real Football-Data.org API
- Requires API token setup
- Live sports data
Environment Setup
Section titled “Environment Setup”Create a .env.local
file:
REACT_APP_CLERK_PUBLISHABLE_KEY=your_clerk_keyFOOTBALL_API_TOKEN=your_football_api_token
Testing
Section titled “Testing”Run the test suite:
npm test
Building
Section titled “Building”Create production build:
npm run build