Predict. Improve. Play.
Socculator is an advanced AI-powered football player evaluation and goal prediction platform that leverages machine learning models to analyze player performance and predict goal-scoring potential in football matches.
- AI-Powered Predictions: Multiple machine learning models (XGBoost, SVR, Linear Regression, KNN) for accurate goal predictions
- Player Evaluation: Comprehensive player statistics and performance analysis
- Interactive Web Interface: Modern, responsive UI built with Next.js and Tailwind CSS
- User Authentication: Secure login/signup system with JWT tokens
- Real-time Analysis: SHAP explanations for model predictions
- Team Management: Support for 200+ international football teams
- Performance Reports: Detailed player performance reports with visualizations
- Framework: Next.js 14 with TypeScript
- Styling: Tailwind CSS with custom components
- UI Components: NextUI, Framer Motion for animations
- State Management: React hooks and cookies for authentication
- Charts: Chart.js and Recharts for data visualization
- Runtime: Node.js with Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT-based authentication with bcrypt password hashing
- ML Integration: Python scripts for machine learning predictions
- API: RESTful API endpoints for predictions and user management
- Models: XGBoost, Support Vector Regression, Linear Regression, K-Nearest Neighbors
- Data Processing: Pandas for data manipulation
- Feature Engineering: Label encoding for categorical variables
- Explainability: SHAP values for model interpretability
- Prediction Pipeline: Automated model selection and prediction generation
Socculator/
βββ client/ # Next.js frontend application
β βββ src/
β β βββ app/ # App router pages
β β β βββ (tabs)/ # Tab-based navigation
β β β βββ form/ # Player prediction form
β β β βββ login/ # Authentication pages
β β β βββ signup/
β β βββ components/ # Reusable UI components
β β β βββ ui/ # Custom UI components
β β β βββ ...
β β βββ constants/ # Application constants
β β βββ utils/ # Utility functions
β βββ public/ # Static assets
β βββ package.json
βββ server/ # Node.js backend application
β βββ routes/ # API route handlers
β βββ middleware/ # Custom middleware
β βββ modles/ # Database models
β βββ Python/ # Machine learning scripts
β βββ *.joblib # Trained ML models
β βββ goalscorers_with_winner.csv # Training data
βββ README.md
- Node.js (v18 or higher)
- Python (v3.8 or higher)
- MongoDB
- npm or yarn
cd client
npm install
npm run devcd server
npm install
npm startpip install pandas scikit-learn joblib shap numpy- Input: Player name, team, opponent team, match outcome
- Output: Predicted goals with detailed explanations
- Models: Multiple ML algorithms for robust predictions
- Explainability: SHAP values provide insights into prediction factors
- Security: JWT tokens with bcrypt password hashing
- User Management: Registration, login, and profile management
- Protected Routes: Authentication-required pages and API endpoints
- Charts: Interactive charts for player performance
- Reports: Comprehensive player statistics and trends
- UI/UX: Modern, responsive design with smooth animations
- Data Processing: CSV data with player statistics and match outcomes
- Feature Engineering: Team and player encoding for ML models
- Model Training: Multiple algorithms for comparison and selection
- Prediction API: RESTful endpoints for real-time predictions
POST /auth/- User registrationPOST /auth/login- User loginPOST /auth/fetchuser- Get user details
POST /auth/submit- Submit prediction requestPOST /auth/getreport- Get player performance report
- XGBoost: Gradient boosting for complex pattern recognition
- Support Vector Regression (SVR): Non-linear regression with RBF kernel
- Linear Regression: Simple linear relationship modeling
- K-Nearest Neighbors (KNN): Instance-based learning
- Player Encoding: Numerical representation of player names
- Team Encoding: Numerical representation of team names
- Match Context: Home/away team and match outcome
- Performance Metrics: Historical goal-scoring data
- BackgroundBeams: Animated background effects
- MovingBorder: Interactive border animations
- AnimatedTooltip: Hover tooltips with animations
- NavbarMenu: Responsive navigation menu
- WavyBackground: Dynamic wave animations
- Home: Landing page with hero section
- Form: Player prediction interface
- Login/Signup: Authentication pages
- Player Details: Performance analysis and reports
- Clone the repository
- Set up the database: Configure MongoDB connection
- Install dependencies: Run
npm installin both client and server directories - Start the development servers:
- Frontend:
npm run dev(runs on port 3000) - Backend:
npm start(runs on port 3002)
- Frontend:
- Access the application: Open
http://localhost:3000
- Password Hashing: bcrypt with salt rounds
- JWT Authentication: Secure token-based authentication
- Input Validation: Express-validator for request validation
- CORS Configuration: Cross-origin resource sharing setup
- Environment Variables: Secure configuration management
- Model Caching: Pre-trained models loaded once
- Efficient Data Processing: Pandas for fast data manipulation
- Client-side Routing: Next.js App Router for optimal performance
- Component Optimization: React best practices for rendering
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
- Data Source: Football match data and player statistics
- ML Libraries: scikit-learn, XGBoost, SHAP
- Frontend: Next.js, React, Tailwind CSS
- Backend: Node.js, Express.js, MongoDB
Socculator 1.0 - Where AI meets Football β½π€