Skip to content

NAJID-MOHAMED/football_predection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 

Repository files navigation

Football Prediction App

This is a full-stack web application that leverages a machine learning model to predict the outcomes of football (soccer) matches. The frontend is built with Next.js and TypeScript, and the backend prediction model is served via a Python API.

✨ Features

  • Match Outcome Prediction: Input match data to get predictions (Win, Loss, Draw).
  • Interactive Dashboard: Visualizes model performance and prediction data.
  • Model Performance Metrics: Displays key metrics like accuracy, precision, recall, and F1-score.
  • Feature Importance: Shows which factors (e.g., team form, player stats) are most influential in the model's predictions.
  • Confusion Matrix: A visual representation of the model's prediction accuracy.
  • Responsive Design: A clean, modern UI that works on all devices.

πŸ› οΈ Tech Stack

πŸš€ Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/NAJID-MOHAMED/football_predection.git
    cd football-prediction-app
  2. Install frontend dependencies:

    pnpm install
  3. Install backend dependencies:

    pip install -r requirements.txt
  4. Create a local environment file: Create a .env.local file in the root directory. Your API keys and other environment variables will go here.

    NEXT_PUBLIC_API_URL=http://127.0.0.1:5000
    

Running the Application

  1. Start the backend server: Open a terminal and run the Python API.

    # (Assuming the entry point is index.py inside the api folder)
    python api/index.py
  2. Start the frontend development server: Open a second terminal and run the Next.js app.

    pnpm dev

The application should now be running at http://localhost:3000.

πŸ“ Folder Structure

.
β”œβ”€β”€ api/                  # Python Backend API
β”‚   └── index.py
β”œβ”€β”€ app/                  # Next.js App Router
β”‚   β”œβ”€β”€ globals.css
β”‚   β”œβ”€β”€ layout.tsx
β”‚   └── page.tsx
β”œβ”€β”€ components/           # React Components
β”‚   β”œβ”€β”€ ui/               # shadcn/ui components
β”‚   └── dashboard.tsx
β”œβ”€β”€ hooks/                # Custom React Hooks
β”œβ”€β”€ lib/                  # Utility functions
β”œβ”€β”€ public/               # Static Assets
β”œβ”€β”€ .gitignore
β”œβ”€β”€ next.config.js
β”œβ”€β”€ package.json
β”œβ”€β”€ requirements.txt
└── tsconfig.json

.gitignore Recommendations

Your current .gitignore file is well-configured for a Next.js project and already includes .env*, which ensures your local environment variables are not committed.

For the Python backend, you should ensure the following patterns are also in your .gitignore to exclude common Python artifacts:

# Python
__pycache__/
*.pyc
*.pyo
*.pyd
.Python
env/
venv/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published