{"id":47217729,"url":"https://github.com/dauble/fantasy-f1","last_synced_at":"2026-03-13T16:35:33.744Z","repository":{"id":343094646,"uuid":"1176167282","full_name":"dauble/fantasy-f1","owner":"dauble","description":"Small app to predict Fantasy F1 drivers","archived":false,"fork":false,"pushed_at":"2026-03-08T21:11:39.000Z","size":117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-09T00:53:55.924Z","etag":null,"topics":["f1","f1-fantasy","fantasy","fantasy-f1"],"latest_commit_sha":null,"homepage":"https://fantasy-f1-hn8mhg.fly.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dauble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-08T17:54:59.000Z","updated_at":"2026-03-08T21:16:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dauble/fantasy-f1","commit_stats":null,"previous_names":["dauble/fantasy-f1"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dauble/fantasy-f1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dauble%2Ffantasy-f1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dauble%2Ffantasy-f1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dauble%2Ffantasy-f1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dauble%2Ffantasy-f1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dauble","download_url":"https://codeload.github.com/dauble/fantasy-f1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dauble%2Ffantasy-f1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30471103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["f1","f1-fantasy","fantasy","fantasy-f1"],"created_at":"2026-03-13T16:35:32.178Z","updated_at":"2026-03-13T16:35:33.734Z","avatar_url":"https://github.com/dauble.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fantasy F1 Team Builder \u0026 Predictor\n\nA modern React application for building and managing your Fantasy Formula 1 team, with data-driven predictions and comprehensive statistics.\n\n![Fantasy F1](https://img.shields.io/badge/Fantasy%20F1-E10600?style=flat\u0026logo=f1\u0026logoColor=white)\n![React](https://img.shields.io/badge/React-19.2.0-61DAFB?style=flat\u0026logo=react)\n![Vite](https://img.shields.io/badge/Vite-7.3.1-646CFF?style=flat\u0026logo=vite\u0026logoColor=white)\n![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-3-38B2AC?style=flat\u0026logo=tailwind-css)\n\n## Features\n\n### 🏎️ Team Builder\n\n- **$100M Budget Management**: Build your team within the official Fantasy F1 budget\n- **5 Drivers + 2 Constructors**: Select your optimal lineup\n- **Real-time Price Tracking**: Dynamic pricing based on driver values\n- **Budget Calculator**: Visual budget tracker with remaining funds\n- **Turbo Driver Selection**: Choose your driver to score 2x points\n- **Auto-Save**: Your team selections are automatically saved to browser storage\n- **Team History**: Save teams for each race week and track your selections over time\n- **Import/Export**: Share teams via JSON files or back up your selections\n- **Clear Team**: Reset your selections with one click\n\n### 📜 Team History\n\n- **Weekly Team Tracking**: Save your team for each race week with custom labels\n- **View Past Teams**: See all your previous team selections\n- **Load Historical Teams**: Restore any past team as your current selection\n- **Export Teams**: Download any saved team as a JSON file\n- **Delete History**: Remove old team entries to keep your history clean\n\n### � Price Manager\n\n- **Manual Price Entry**: Update driver and constructor prices each week to match official Fantasy F1 values\n- **Custom Price Tracking**: Set custom prices that override default values across the entire app\n- **Price Change Indicators**: See price increases/decreases with up/down arrows and percentage changes\n- **Price History**: Track up to 10 historical price snapshots to see trends over time\n- **Import/Export CSV**: Share price lists or backup your custom prices via CSV files\n- **Reset to Defaults**: Quickly revert to default prices if needed\n- **Visual Feedback**: Custom prices are highlighted in green, changes shown in red/green\n\n### �📊 Predictions\n\n- **Race Outcome Predictions**: Data-driven forecasts for upcoming races\n- **Points Calculator**: See predicted points for each driver\n- **Turbo Multiplier Preview**: Compare standard vs. turbocharged points\n- **Historical Analysis**: Predictions based on circuit characteristics\n\n### 🤖 AI-Powered Predictions\n\n- **Claude AI Integration**: Intelligent team recommendations powered by Anthropic's Claude\n- **Historical Data Analysis**: Analyzes recent race results, lap times, and driver trends\n- **Smart Recommendations**: 5 drivers + 2 constructors optimized for predicted points\n- **Turbo Driver Suggestions**: AI identifies best turbo pick based on recent form\n- **Value Analysis**: Highlights drivers with best points-per-dollar ratio\n- **Confidence Ratings**: Each recommendation includes confidence level (high/medium/low)\n- **Circuit-Specific Insights**: Predictions consider track type and characteristics\n\n### 📋 Rules \u0026 Scoring\n\n- **Complete Scoring System**: All Fantasy F1 point categories explained\n- **Strategy Tips**: Pro tips for building winning teams\n- **Chip Strategies**: How to use Turbo Driver and other power-ups\n- **Official Links**: Direct access to Fantasy F1 official resources\n\n## Tech Stack\n\n- **React 19** - Modern UI library\n- **Vite 7** - Lightning-fast build tool\n- **Tailwind CSS 3** - Utility-first styling\n- **React Router** - Client-side routing\n- **Axios** - HTTP client for API requests\n- **Heroicons** - Beautiful hand-crafted SVG icons\n- **Moment.js** - Date/time formatting\n\n## Data Source\n\nThis application uses the [OpenF1 API](https://openf1.org/) which provides:\n\n- Real-time and historical F1 data\n- Driver information and statistics\n- Session data and results\n- Official F1 timing data\n\n### API Caching\n\nTo prevent rate limiting (429 errors) from the OpenF1 API, this app implements an intelligent caching system:\n\n- **5-minute cache TTL**: API responses are cached in localStorage for 5 minutes\n- **Automatic cache management**: Old entries are automatically cleaned up\n- **Cache status widget**: View cache statistics and manually clear cache if needed\n- **Smart cache keys**: Each API endpoint and parameter combination has a unique cache key\n\nThe cache status widget appears in the bottom-right corner of the app, showing the number of cached items and total cache size.\n\n### Team Persistence\n\nYour team selections are automatically saved to browser localStorage:\n\n- **Auto-save**: Your selections are saved automatically as you build your team\n- **Current Team**: Your active team is always persisted between sessions\n- **Team History**: Save up to 20 historical teams with custom labels (e.g., \"Monaco GP\", \"Race 5\")\n- **Import/Export**: Share teams via downloadable JSON files\n- **Cross-Session**: Your team persists even after closing your browser\n\n**Storage Keys:**\n\n- `fantasy_f1_current_team`: Your active team selections\n- `fantasy_f1_teams_history`: Up to 20 saved historical teams\n\n**Team Data Includes:**\n\n- Selected drivers and constructors\n- Turbo driver choice\n- Total budget spent\n- Save timestamps\n\n### Custom Pricing\n\nUpdate driver and constructor prices weekly to match official Fantasy F1 values:\n\n- **Manual Price Entry**: Input prices in millions (e.g., \"32.5\" for $32.5M)\n- **Automatic Override**: Custom prices automatically override defaults throughout the app\n- **Price History**: Tracks last 10 price updates with timestamps\n- **Change Tracking**: See price increases/decreases with arrows and percentages\n- **CSV Support**: Import/export prices for easy sharing or backup\n\n**Storage Keys:**\n\n- `fantasy_f1_custom_prices`: Current custom price values\n- `fantasy_f1_price_history`: Historical price snapshots (up to 10 entries)\n\n**Price Data Includes:**\n\n- Driver prices by driver number\n- Constructor prices by team name\n- Last updated timestamp\n- Price change history\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18+ and npm\n\n### Installation\n\n1. Install dependencies:\n\n```bash\nnpm install\n```\n\n2. **(Optional)** For AI Predictions, create a `.env` file:\n\n```bash\nANTHROPIC_API_KEY=sk-ant-your-api-key-here\n```\n\n3. Start the development server:\n\n```bash\nnpm run dev\n```\n\nThis starts both the Express server (port 3000) and Vite (port 5173) concurrently.\n\n4. Open your browser and navigate to:\n\n```\nhttp://localhost:5173\n```\n\n### For AI Predictions Feature\n\nThe AI Predictions feature requires additional setup:\n\n1. **Get an Anthropic API key** at [console.anthropic.com](https://console.anthropic.com/)\n\n2. **Create a `.env` file** in the project root:\n\n   ```bash\n   ANTHROPIC_API_KEY=sk-ant-your-api-key-here\n   ```\n\n3. **Start the development servers**:\n\n   ```bash\n   npm run dev\n   ```\n\n   This starts both the Express server (port 3000) and Vite dev server (port 5173) concurrently.\n\n4. Open `http://localhost:5173` and navigate to Predictions page\n\n**Note**: You can also run servers individually if needed:\n\n- Express only: `npm run server`\n- Vite only: `npm run dev:client`\n\nSee [documentation/AI_PREDICTIONS_SETUP.md](documentation/AI_PREDICTIONS_SETUP.md) for complete setup instructions.\n\n## Fantasy F1 Rules\n\n### Budget \u0026 Selection\n\n- **Budget**: $100,000,000 (100M)\n- **Drivers**: Select 5 drivers\n- **Constructors**: Select 2 constructors\n- **Turbo Driver**: One driver scores 2x points\n\n### Points System\n\n#### Race Finishing Points\n\n- 1st: 25 pts | 2nd: 18 pts | 3rd: 15 pts\n- 4th: 12 pts | 5th: 10 pts | 6th: 8 pts\n- 7th: 6 pts | 8th: 4 pts | 9th: 2 pts | 10th: 1 pt\n\n#### Qualifying Points\n\n- P1-P10: 10-1 points respectively\n\n#### Bonus Points\n\n- Fastest Lap: +5 pts\n- Position Gained: +2 pts each\n- Beat Teammate (Qualifying): +2 pts\n- Beat Teammate (Race): +3 pts\n- Classified Finish: +1 pt\n\n#### Penalties\n\n- Position Lost: -2 pts each\n- Not Classified: -5 pts\n- Disqualified: -20 pts\n\n## Available Scripts\n\n- `npm run dev` - Start both Express server (port 3000) and Vite dev server (port 5173) concurrently\n- `npm run dev:server` - Start Express proxy server only (port 3000)\n- `npm run dev:client` - Start Vite development server only (port 5173)\n- `npm run server` - Start Express proxy server for AI predictions (port 3000)\n- `npm run build` - Build production bundle\n- `npm run preview` - Preview production build locally\n- `npm run deploy` - Deploy to Fly.io (requires setup)\n- `npm run lint` - Run ESLint\n\n## Documentation\n\nComprehensive technical documentation is available in the [`documentation/`](documentation/) folder:\n\n- **[Architecture Guide](documentation/ARCHITECTURE.md)** - Complete technical documentation covering:\n  - Project structure and core systems\n  - API \u0026 caching layer implementation\n  - Team persistence and pricing systems\n  - Data flow and localStorage schema\n  - Component architecture and styling\n  - Performance optimizations and error handling\n\n- **[Deployment Guide](documentation/DEPLOYMENT.md)** - Step-by-step instructions for deploying to Fly.io:\n  - Prerequisites and initial setup\n  - Configuration and deployment process\n  - Monitoring, scaling, and troubleshooting\n  - Custom domain setup\n\n## Deployment\n\nThis application is deployed on [Fly.io](https://fly.io) with automatic SSL, CDN, and global distribution.\n\n### Manual Deployment\n\n**Quick Start**:\n\n1. Install Fly CLI: `brew install flyctl`\n2. Login: `flyctl auth login`\n3. Create app: `flyctl apps create your-app-name`\n4. Deploy: `npm run deploy` (or `flyctl deploy`)\n5. Open: `flyctl open`\n\n### Automated Deployment (CI/CD)\n\nThe repository includes **GitHub Actions** for automatic deployments:\n\n- **Trigger**: Push to `main` branch\n- **Action**: Automatically deploys to Fly.io\n- **Setup**: Add `FLY_API_TOKEN` secret to your GitHub repository settings\n\nGet your token: `flyctl auth token`\n\nEvery push to `main` triggers a deployment automatically! ✨\n\nYour app will be live at `https://your-app-name.fly.dev` 🚀\n\nFor complete deployment instructions, CI/CD setup, troubleshooting, and advanced configuration, see the **[Deployment Guide](documentation/DEPLOYMENT.md)**.\n\n## Acknowledgments\n\n- [OpenF1](https://openf1.org/) for providing the F1 data API\n- [Formula 1](https://www.formula1.com/) for the official Fantasy F1 game\n- [dauble/f1-stats](https://github.com/dauble/f1-stats) for UI inspiration and design patterns\n\n## Disclaimer\n\nThis is an unofficial Fantasy F1 tool and is not affiliated with or endorsed by Formula 1, FOM, or any F1 teams.\n\n---\n\nBuilt with ❤️ for F1 fans by F1 fans\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdauble%2Ffantasy-f1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdauble%2Ffantasy-f1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdauble%2Ffantasy-f1/lists"}