A beautiful dark-mode fantasy football dashboard built with Next.js, React, TypeScript, and Tailwind CSS. Track your Sleeper fantasy leagues, view standings, and analyze matchups with an intuitive interface.
π Live Demo: https://sleeper-agent-kenacgahz-seans-projects-40ab1836.vercel.app
- π User Authentication: Enter your Sleeper username to access your leagues
- π League Management: Toggle between multiple leagues you're part of
- π Standings View: See team rankings with wins, losses, points for/against
- βοΈ Matchups View: View weekly matchups with scores and team details
- π Detailed Matchup Analysis: Click into matchups to see starter/bench breakdown
- π₯ Interactive Roster Views: Click any team in standings to view their complete roster
- π Week Navigation: Browse different weeks of the season
- π Deep Linking: Direct URLs to leagues, matchups, and specific weeks
- πΎ Local Storage: Your username is remembered for future visits
- π Dark Mode Design: Beautiful dark theme optimized for extended use
- π± Responsive: Works great on desktop and mobile devices
- β¨ Smooth Animations: Slide-in roster views and hover effects
- Node.js 18+ and npm
-
Clone the repository:
git clone <repository-url> cd sleeper-agent
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open your browser: Navigate to http://localhost:3000
- Enter your Sleeper username on the homepage
- Select a league if you have multiple
- Navigate between views:
- Standings: View team rankings, click any team to see their roster
- Matchups: Browse weekly matchups, click for detailed breakdowns
- Use week selector to browse different weeks of the season
- Share direct links to specific leagues, weeks, or matchups
-
Install Vercel CLI:
npm install -g vercel
-
Build and deploy:
npm run build # Test production build vercel --prod # Deploy to production
-
Your app will be live at:
https://your-app-name.vercel.app
-
Push to GitHub:
git add . git commit -m "Deploy Sleeper Agent" git push origin main
-
Connect to Vercel:
- Go to vercel.com
- Import your GitHub repository
- Deploy automatically on every push
- Go to Vercel Dashboard β Your Project β Settings β Domains
- Click "Buy Domain" and search for your desired domain
- Complete purchase - DNS is configured automatically
- Done! Your app will be live at your custom domain
-
Buy domain from Namecheap, Google Domains, etc.
-
Add DNS records in your registrar's control panel:
A Record: Host: @ (or blank) Value: 76.76.19.61 CNAME Record: Host: www Value: cname.vercel-dns.com. -
Add domain to Vercel:
vercel domains add yourdomain.com your-project-name
-
Wait 5-48 hours for DNS propagation
Test production build locally:
npm run build
npm startBuild output analysis:
- Main App: ~104KB first load
- League Pages: ~111KB first load
- All routes are optimized for performance
Optional environment variables:
# .env.local (if needed for custom API endpoints)
NEXT_PUBLIC_API_BASE_URL=https://api.sleeper.app/v1- β
Build succeeds:
npm run build - β
Linting passes:
npm run lint - β All routes work: Test deep linking
- β Mobile responsive: Test on different screen sizes
- β Performance: Check loading times
- β SSL certificate: Automatic with Vercel
- β CDN distribution: Global edge network
- Framework: Next.js 15 with App Router
- Frontend: React 18 with TypeScript
- Styling: Tailwind CSS with custom animations
- Deployment: Vercel with automatic deployments
- API: Sleeper Fantasy API (no authentication required)
This app uses the Sleeper API to fetch:
- User data by username
- User's fantasy leagues
- League rosters and standings
- Weekly matchups and scores
- NFL player information
- Current NFL week and season
No API keys required - all endpoints are publicly accessible.
βββ app/ # Next.js App Router pages
β βββ user/[username]/ # User league selection
β βββ league/ # League-specific routes
β βββ globals.css # Global styles and animations
βββ components/ # Reusable React components
β βββ UsernameInput.tsx
β βββ LeagueSelector.tsx
β βββ Standings.tsx
β βββ Matchups.tsx
β βββ MatchupDetail.tsx
β βββ RosterView.tsx
βββ lib/ # Utility functions and API client
β βββ sleeper-api.ts
βββ types/ # TypeScript type definitions
β βββ sleeper.ts
βββ public/ # Static assets
βββ vercel.json # Deployment configuration
/- Homepage with username input/user/[username]- User's leagues/league/[league_id]- League standings/league/[league_id]/matchups/[week]- Weekly matchups/league/[league_id]/matchup/[week]/[matchup_id]- Matchup details
Build fails:
# Clear cache and reinstall
rm -rf .next node_modules package-lock.json
npm install
npm run buildAPI rate limiting:
- The Sleeper API has a limit of 1000 calls/minute
- The app optimizes calls by caching NFL player data
Domain not working:
- DNS propagation can take up to 48 hours
- Check DNS settings match Vercel's requirements
- Verify domain is added in Vercel dashboard
Performance issues:
- Enable image optimization in
next.config.js - Check bundle analyzer:
npm run build && npx @next/bundle-analyzer .next
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature-name - Submit a pull request
This project is open source and available under the MIT License.
Built with β€οΈ using Claude Code - Learn more about Claude Code