Skip to content

vibing-ai/sports-scribe

Sport Scribe πŸˆβš½πŸ€

AI-Powered Sports Journalism Platform

Sport Scribe is an intelligent sports journalism platform that leverages AI agents to automatically generate high-quality sports articles, game recaps, and analysis from live game data and statistics.

🌟 Features

  • AI-Powered Content Generation: Basic AI agent framework for content generation (currently in development - basic agents implemented with room for expansion)
  • Real-time Game Integration: Connects to sports APIs for live game data and statistics
  • Modern Web Platform: Next.js frontend with responsive design and real-time updates
  • Football-Focused Platform: Specializing in football (soccer) coverage with comprehensive league support including Premier League, La Liga, Bundesliga, Serie A, and more
  • Content Management: Full editorial workflow with drafts, reviews, and publishing
  • Analytics Dashboard: Track article performance and user engagement

πŸ—οΈ Architecture

  • Frontend: Next.js 14 (App Router) + TypeScript + HeroUI (@heroui/react) + Tailwind CSS
  • Backend: Python FastAPI with OpenAI integration
  • Database: Supabase (PostgreSQL) with real-time capabilities
  • AI System: AI agent framework (currently in development - basic agents implemented with room for expansion):
    • Data Collector: Gathers game data from sports APIs
    • Researcher: Analyzes team and player backgrounds
    • Writer: Generates articles with various tones and styles
    • Editor: Reviews and improves content quality
    • Basic content generation (fact-checking planned for future releases)

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.11+
  • Supabase account
  • OpenAI API key

Important Setup Notes

⚠️ Before starting, ensure you have:

  • Python 3.11+ installed
  • Node.js 18+ installed
  • Git installed
  • A code editor (VS Code recommended)

Python Virtual Environment Setup (REQUIRED)

cd ai-backend
python3.11 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
pip install -r requirements-dev.txt

Installation

  1. Clone the repository

    git clone https://github.com/vibing-ai/sport-scribe.git
    cd sport-scribe
  2. Set up environment variables

    cp env.example .env
    cp web/env.local.example web/.env.local
    cp ai-backend/env.example ai-backend/.env
  3. Install dependencies

    # Web platform
    cd web && npm install && cd ..
    
    # AI backend
    cd ai-backend && pip install -r requirements.txt && cd ..
  4. Initialize database

    # Database setup requires Supabase CLI - see deployment/database-setup.md
  5. Start development servers

    # Option 1: Docker Compose
    docker-compose -f docker-compose.dev.yml up
    
    # Option 2: Individual services
    cd web && npm run dev &
    cd ai-backend && python main.py &
  6. Access the application

For detailed setup instructions, see Getting Started Guide.

πŸ“ Project Structure

sport-scribe/
β”œβ”€β”€ ai-backend/          # Python AI agent system
β”‚   β”œβ”€β”€ agents/          # AI agent implementations
β”‚   β”œβ”€β”€ tools/           # Sports APIs and data tools
β”‚   β”œβ”€β”€ config/          # Agent configurations
β”‚   └── tests/           # Backend tests
β”œβ”€β”€ web/                 # Next.js web platform
β”‚   β”œβ”€β”€ app/             # App router pages
β”‚   β”œβ”€β”€ components/      # React components
β”‚   β”œβ”€β”€ lib/             # Utilities and integrations
β”‚   └── hooks/           # Custom React hooks
β”œβ”€β”€ shared/              # Shared schemas and types
β”‚   β”œβ”€β”€ types/           # TypeScript interfaces
β”‚   β”œβ”€β”€ schemas/         # Database and API schemas
β”‚   └── constants/       # Shared constants
β”œβ”€β”€ docs/                # Project documentation
└── scripts/             # Build and deployment scripts

πŸ€– AI Agent System

Sport Scribe uses a multi-agent architecture where specialized AI agents collaborate to produce high-quality sports content:

Agent Workflow

  1. Data Collector β†’ Gathers real-time game data and statistics
  2. Researcher β†’ Analyzes team history, player backgrounds, and context
  3. Writer β†’ Generates articles with appropriate tone and style
  4. Editor β†’ Reviews content for quality, grammar, and readability
  5. Basic content generation (fact-checking planned for future releases)

Supported Content Types

  • Game recaps and summaries
  • Player spotlights and profiles
  • Team analysis and previews
  • Season reviews and predictions
  • Trade news and roster changes

πŸ› οΈ Development

Code Quality

Sport Scribe uses comprehensive quality tools to ensure code excellence:

# Install quality tools (one-time setup)
./scripts/setup-ci-tools.sh

# Run comprehensive quality checks
./scripts/lint-all.sh

# Auto-fix linting issues
./scripts/lint-fix.sh [ai|web|sql|all]

# Type checking
./scripts/type-check.sh

# Testing setup in progress - see CONTRIBUTING.md for current testing
# approach

Quality Tools

  • shellcheck: Shell script linting
  • yamllint: YAML file validation
  • hadolint: Dockerfile linting
  • ajv-cli: JSON schema validation
  • sqlfluff: SQL linting and formatting
  • ruff: Python linting and formatting (fast)
  • mypy: Python type checking
  • bandit: Python security analysis
  • safety: Python vulnerability scanning
  • ESLint: TypeScript/JavaScript linting
  • Prettier: Code formatting

Database Management

# Reset database
supabase db reset

# Apply migrations
supabase db push

# Generate TypeScript types
npm run generate:types

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Run quality checks: ./scripts/lint-fix.sh
  5. Commit your changes: git commit -m 'feat: add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

See Contributing Guidelines for detailed information.

πŸ“Š Technology Stack

Frontend

  • Next.js 14 (App Router)
  • TypeScript for type safety
  • HeroUI (@heroui/react) for UI components
  • Tailwind CSS for styling
  • Supabase for database and auth

Backend

  • Python 3.11+ runtime
  • FastAPI for API framework
  • Ruff for linting and formatting
  • OpenAI for AI model integration
  • Supabase for database

Development Tools

  • Docker for containerization
  • GitHub Actions for CI/CD
  • Ruff for Python code quality
  • ESLint for TypeScript code quality

πŸš€ Deployment

  • AI Backend: Docker containerized FastAPI service
  • Web Platform: Next.js application (Vercel ready)
  • Database: Supabase managed PostgreSQL
  • CI/CD: GitHub Actions workflows

See Deployment Documentation for detailed instructions.

πŸ“š Documentation

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • OpenAI for AI model capabilities
  • Supabase for backend infrastructure
  • Next.js for frontend framework
  • The sports data API providers

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors