Skip to content

SafeScore analyzes match stats and form across 14+ leagues to generate high-probability football predictions. Stop guessing. Filter by risk and make more informed picks.

License

Notifications You must be signed in to change notification settings

devtofunmi/safescore

Repository files navigation

SafeScore

SafeScore is a professional, data-driven football prediction platform that leverages advanced statistical analysis to provide high-probability betting insights. Built with modern web technologies, it offers users a sleek, responsive, and real-time experience.

Features

  • Smart Predictions: Algorithmic analysis of form, H2H, goal statistics, and league strength.
  • Risk Management: Filter predictions by risk levels: 'Safe', 'Very Safe', and 'Medium Safe'.
  • Multi-League Coverage: Supports 14+ major global leagues including Premier League, La Liga, Bundesliga, Serie A, and Champions League.
  • PWA Support: Installable as a native-like app on mobile and desktop.
  • Premium UI: Dark-mode first design with smooth animations using Framer Motion.

Tech Stack

Core Logic

Prediction Engine

The frontend delegates prediction requests to a private core engine via the CORE_ENGINE_URL. This allows for proprietary analysis while keeping the UI and contribution layer open.

Automated Verification

SafeScore features an automated settlement system that:

  1. Saves predictions to a Supabase history table.
  2. Periodically verifies pending matches against real-world scores using the Football-Data API.
  3. Automatically updates the status (Won/Lost) and final scores for transparency.

Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • An API Key from Football-Data.org
  • (Optional) A SafeScore Core Engine API Key
  • Supabase account and project

Installation

  1. Clone the repository:

    git clone https://github.com/devtofunmi/safescore.git
    cd safescore
  2. Install dependencies:

    npm install
  3. Setup Environment Variables: Copy the example env file and fill in your keys:

    cp .env.example .env.local

    Required variables:

    NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
    SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
    FOOTBALL_DATA_API_KEY=your_football_data_api_key
  4. Setup Database & Admin Users:

    Quick Method (Recommended):

    1. Open Supabase Dashboard > SQL Editor
    2. Run supabase/complete-setup.sql (replace email with your admin email)
    3. Or use the one-liner: supabase/one-liner-admin.sql

    Automated Method:

    npm run seed:admin

    See supabase/QUICK_SETUP.md for detailed instructions.

  5. Run the development server:

    npm run dev

    Open http://localhost:3000 to see the result.

  6. Access Admin Dashboard:

    • Go to /admin/login
    • Login with your admin credentials
    • Access the admin dashboard at /admin

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

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


Disclaimer: This platform is for informational purposes only. Use the predictions at your own risk. We do not guarantee accuracy or financial gain.

About

SafeScore analyzes match stats and form across 14+ leagues to generate high-probability football predictions. Stop guessing. Filter by risk and make more informed picks.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages