A comprehensive NFL prediction platform where users make weekly picks on games and prop bets, compete on leaderboards, and track their performance throughout the season.
- Weekly Game Predictions: Pick winners for NFL games organized by time windows (morning, afternoon, late)
- Prop Bet Predictions: Answer various prop bet questions including over/under, point spreads, and "take-the-bait" scenarios
- Real-time Scoring: Automatic grading of predictions when game results are finalized
- Leaderboard System: Weekly rankings and season-long competition tracking
- Responsive Design: Optimized for desktop and mobile devices
- Profile Management: User avatars, display names, and personal statistics
- Progressive Submission: Save draft picks and submit when ready
- Performance Analytics: Detailed statistics on accuracy, trends, and achievements
- Game Management: Import games, set windows, and finalize results
- Prediction Analytics: Comprehensive stats tracking and historical data
- User Administration: Account management and moderation tools
- Framework: Django 4.x with Django REST Framework
- Database: PostgreSQL with optimized indexing
- Authentication: Session-based authentication with CSRF protection
- Storage: Configurable local/S3 storage for user avatars
- Caching: Redis caching for performance-critical queries
- Framework: React 18 with Vite build system
- Styling: Tailwind CSS for responsive design
- State Management: React Context for authentication and theme
- API Integration: Axios for REST API communication
- Routing: React Router for navigation
- Users: Custom user model with profile fields and avatar management
- Games: NFL games organized by season, week, and time windows
- Predictions: Money-line and prop bet predictions with correctness tracking
- Analytics: User performance history and season statistics
- Windows: Time-based game groupings for progressive revealing of results
# Backend setup
cd backend
pip install -r ../requirements.txt
python manage.py migrate
python manage.py runserver
# Frontend setup
cd frontend
npm install
npm run dev- AWS: ECS with Fargate, RDS PostgreSQL, S3 storage
- Render: Integrated deployment with managed PostgreSQL
- OpenShift: Container platform deployment (see
pickems.md)
βββ backend/ # Django API server
β βββ accounts/ # User authentication and profiles
β βββ games/ # Game and prop bet models
β βββ predictions/ # User prediction models and views
β βββ analytics/ # Statistics and leaderboard logic
β βββ nfl_pickems/ # Django project settings
βββ frontend/ # React SPA
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Route components
β β βββ context/ # React context providers
β β βββ utils/ # Helper functions
βββ aws/ # AWS deployment configurations
βββ docs/ # Additional documentation
- CSRF protection on all state-changing operations
- Input validation and sanitization
- Secure session management
- Database constraint enforcement
- Timezone-aware datetime handling
- File upload validation and processing
- Money-line Picks: Choose the winning team for each game
- Prop Bets: Multiple choice questions with various categories
- Locking Mechanism: Predictions locked when games start
- Validation: Comprehensive input validation and constraint checking
- Real-time Updates: Automatic scoring when games are finalized
- Historical Tracking: Complete prediction history with performance metrics
- Leaderboards: Weekly and season-long rankings
- Achievement System: Track personal bests and consistency metrics
- Draft System: Save picks before final submission
- Progress Indicators: Visual feedback on completion status
- Responsive Design: Optimized for all device sizes
- Theme Support: Light/dark mode toggle
DJANGO_ENV: Development or production modeDATABASE_URL: PostgreSQL connection stringDJANGO_SECRET_KEY: Django secret keyUSE_CLOUD_STORAGE: Enable S3 storage for avatarsCORS_ALLOWED_ORIGINS: Frontend URLs for CORS
The application uses PostgreSQL with carefully designed indexes for performance:
- Game lookups by season/week/window
- User prediction queries
- Leaderboard generation
- Statistics calculations
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or issues:
- Check existing GitHub issues
- Create a new issue with detailed description
- Include relevant logs and environment details
Built with β€οΈ for NFL fans who love the thrill of prediction and competition!