A modern, full-stack sports news and fantasy platform built with React, Node.js, and MongoDB. Get real-time scores, personalized news feeds, fantasy predictions, and interactive fan experiences.
- Live Scores: Real-time sports scores and match updates
- News Feed: Personalized sports news and trending articles
- Fantasy Sports: AI-powered fantasy predictions and insights
- Interactive Calendar: Sports events and match scheduling
- Fan Reactions: Real-time fan engagement and reactions
- Audio Content: Text-to-speech for articles and news
- Real-time Chat: Live match discussions and fan interactions
- Search & Filter: Advanced search across sports content
- Responsive Design: Mobile-first, responsive UI
- Dark/Light Theme: Toggle between themes
- Social Sharing: Share content across platforms
- User Authentication: Secure login and user management
- React 18 - Modern UI library
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- Context API - State management
- Node.js - JavaScript runtime
- Express.js - Web application framework
- MongoDB - NoSQL database
- Socket.io - Real-time communication
- JWT - Authentication tokens
- Gemini AI - AI-powered content generation
- Sports APIs - Live scores and sports data
- Google Cloud TTS - Text-to-speech service
- Email Service - User notifications
- Node.js (v16 or higher)
- MongoDB (local or cloud)
- Git
git clone https://github.com/CreatesRahul-Lab/Sports-website.git
cd Sports-websitecd backend
npm installCreate a .env file in the backend directory:
cp .env.example .envEdit the .env file with your configuration:
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/sports-news
JWT_SECRET=your-super-secret-jwt-key-here
JWT_EXPIRE=7d
# API Keys
GEMINI_API_KEY=your-gemini-api-key-here
SPORTS_DB_API_KEY=your-sports-db-api-key-here
SPORTMONKS_API_KEY=your-sportmonks-api-key-here
# Email Configuration
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password
# Google Cloud TTS
GOOGLE_CLOUD_PROJECT_ID=your-project-id
GOOGLE_CLOUD_KEY_FILE=path/to/service-account-key.json
# Frontend URL
FRONTEND_URL=http://localhost:3000cd ../frontend
npm installBackend (Terminal 1):
cd backend
npm startFrontend (Terminal 2):
cd frontend
npm run devThe application will be available at:
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:5000
Sports-website/
โโโ backend/
โ โโโ middleware/ # Authentication & error handling
โ โโโ models/ # Database models
โ โโโ routes/ # API routes
โ โโโ services/ # External services
โ โโโ uploads/ # File uploads
โ โโโ server.js # Main server file
โโโ frontend/
โ โโโ public/ # Static assets
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โโโ contexts/ # React contexts
โ โ โโโ pages/ # Page components
โ โ โโโ services/ # API services
โ โโโ index.html # Main HTML file
โโโ README.md
The application requires several environment variables. Copy .env.example to .env and configure:
- Database: MongoDB connection string
- Authentication: JWT secret and expiration
- APIs: Sports data and AI service keys
- Email: SMTP configuration for notifications
- Google Cloud: TTS service configuration
- Gemini API: For AI-powered content
- Sports DB API: For sports data
- SportMonks API: For additional sports data
- Google Cloud: For text-to-speech service
- Register/Login: Create an account or sign in
- Browse News: View personalized sports news
- Live Scores: Check real-time match scores
- Fantasy: Get AI predictions for fantasy sports
- Calendar: View upcoming matches and events
- Chat: Join live match discussions
- API Endpoints: RESTful API with comprehensive endpoints
- Real-time Updates: Socket.io for live features
- Authentication: JWT-based secure authentication
- File Uploads: Support for audio and media files
Frontend:
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
Backend:
npm start- Start servernpm run dev- Start with nodemon (development)
- Components: Modular React components
- Services: API integration and external services
- Middleware: Authentication and error handling
- Models: Database schema definitions
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Sports data providers for API access
- Google Cloud for TTS services
- Open source community for tools and libraries
- Contributors and testers
For support, email [your-email@example.com] or create an issue in the GitHub repository.
Built with โค๏ธ by CreatesRahul-Lab