A comprehensive fantasy sports platform for FIRST Robotics Competition (FRC) teams. Draft teams, manage rosters, track performance, and compete in leagues with advanced analytics and trading features.
- User authentication and registration
- Create and join draft rooms
- Real-time draft interface with pick timer
- Snake draft format support
- Public and private room options
- FRC team database with 9,000+ teams
- Team search and filtering
- Integration with The Blue Alliance API
- Team statistics and information display
- Advanced draft room management
- Pick history and draft analytics
- Improved user interface
- Draft room status tracking
- Fantasy scoring system based on FRC performance
- Event and team performance tracking
- Roster management with starting lineups
- Weekly scoring calculations
- Comprehensive league standings
- Advanced analytics and insights
- Weekly performance tracking
- Team performance projections
- League analytics dashboard
- Trading System: Player-to-player team trades
- Waiver Wire: Pick up/drop teams during season
- Notifications: Real-time alerts and updates
- Mobile API: Optimized endpoints for mobile apps
- Data Sync: Automated TBA integration
- Advanced Analytics: League insights and engagement metrics
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS
- Backend: Convex (real-time database and functions)
- Authentication: NextAuth.js
- Deployment: Vercel
- External APIs: The Blue Alliance (TBA) API
- Node.js 18+
- npm or yarn
- Convex account
git clone <repository-url>
cd my-app
npm install
Create a .env.local
file:
# Convex
NEXT_PUBLIC_CONVEX_URL=your_convex_url
CONVEX_DEPLOY_KEY=your_convex_deploy_key
# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
# The Blue Alliance API
TBA_API_KEY=your_tba_api_key
# Deploy Convex schema
npx convex deploy
# Seed with sample data (optional)
npm run seed-data
npm run dev
Visit http://localhost:3000
to access the application.
- Sign Up/Login: Create an account or sign in
- Browse Teams: Explore the FRC team database
- Create Draft: Set up a new draft room
- Invite Players: Share room code with friends
- Draft Teams: Participate in real-time draft
- Manage Roster: Set starting lineups and track performance
- Create Room: Configure settings (public/private, team count, pick timer)
- Join Room: Use room codes or browse public rooms
- Draft Interface: Real-time picking with automatic turn progression
- Snake Format: Alternating pick order each round
Teams earn points based on FRC event performance:
- Base Points: 12 points for event participation
- Qualification: +2 per win, -1 per loss (normalized to 10 matches)
- Playoffs: +1 for making playoffs, +0.33 per win, -0.25 per loss
- Standings: Weekly and season-long rankings
- Analytics: Score distributions, trends, and insights
- Projections: AI-powered team performance predictions
- History: Track individual and league performance over time
- Trading: Propose and accept team trades with other users
- Waiver Wire: Claim available teams based on priority order
- Notifications: Get alerts for trades, scores, and league updates
- Mobile API: Access optimized endpoints for mobile applications
- Phase 5 Demo:
/admin/phase5-demo
- Test league management features - Phase 6 Demo:
/admin/phase6-demo
- Test advanced features
Run the seeding script to populate with realistic test data:
npm run seed-data
This adds:
- 20 competitive FRC teams
- 2023 and 2024 event data
- Realistic performance statistics
- Weekly scoring calculations
- Seed Data: Run seeding script
- Create Draft: Set up test draft room
- Draft Teams: Complete a draft with multiple users
- Set Lineups: Configure starting rosters
- Calculate Scores: Use Phase 5 demo to process weekly scores
- View Analytics: Check league standings and analytics
- Test Trading: Use Phase 6 demo to test advanced features
api.draft.createDraftRoom
- Create new draft roomapi.draft.joinDraftRoom
- Join existing roomapi.draft.makePick
- Make draft pickapi.draft.getDraftState
- Get current draft state
api.teams.listTeams
- Get team list with filteringapi.playerManagement.recordTeamEventPerformance
- Record event resultsapi.playerManagement.calculateWeeklyScores
- Calculate weekly points
api.playerManagement.getLeagueStandings
- Get league standingsapi.playerManagement.getLeagueAnalytics
- Get detailed analyticsapi.playerManagement.getUserLeagueHistory
- Get user performance
api.playerManagement.initiateTrade
- Start team tradeapi.playerManagement.addToWaiverWire
- Add waiver claimapi.playerManagement.createNotification
- Send notificationapi.playerManagement.getMobileDashboard
- Mobile dashboard data
- Users: Authentication and profile data
- Teams: FRC team information and statistics
- DraftRooms: Draft configuration and state
- DraftPicks: Individual draft selections
- PlayerRosters: User team ownership and lineups
- Events: FRC competition events
- TeamEventPerformances: Team results at events
- WeeklyTeamScores: Aggregated weekly scoring
- LeagueWeeklyScores: Fantasy league scoring
- TradeProposals: Team trading system
- WaiverClaims: Waiver wire management
- Notifications: User alert system
- Live draft updates using Convex subscriptions
- Automatic turn progression and pick timers
- Real-time roster and scoring updates
- Live notifications and trade alerts
- Connect repository to Vercel
- Configure environment variables
- Deploy with automatic builds
npx convex deploy --prod
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open Pull Request
- Phase 7: Mobile App (React Native)
- Phase 8: Advanced AI Analytics
- Phase 9: Tournament Brackets
- Phase 10: Social Features & Communities
- Multi-season league support
- Custom scoring systems
- Team performance predictions
- Social media integration
- Commissioner tools
- Advanced statistics
- Export/import functionality
- Convex Connection: Ensure
NEXT_PUBLIC_CONVEX_URL
is correct - Authentication: Check NextAuth configuration
- TBA API: Verify API key and rate limits
- Seeding Errors: Ensure database schema is deployed
Enable debug logging by setting:
DEBUG=true
This project is licensed under the MIT License - see the LICENSE file for details.
- FIRST Robotics Competition for the amazing program
- The Blue Alliance for comprehensive FRC data
- Convex for real-time database infrastructure
- Vercel for hosting and deployment
- FRC Community for inspiration and feedback
Built with โค๏ธ for the FRC Community
For questions, issues, or feature requests, please open an issue on GitHub.