This tool helps iRacing users efficiently navigate series, cars, and tracks, allowing them to make informed decisions about the best content to purchase based on usage in the current season. The project also includes wishlist functionality, allowing users to add items and navigate to iRacing's website for easy purchasing.
Visit it at: https://racingplanner.com
This project is not affiliated with or endorsed by iRacing.com.
- Content Analysis: View cars and tracks used by every active series, and decide best purchase for the season.
- Wishlist: Add cars and tracks to a wishlist for streamlined purchasing.
- Integration with iRacing: Links to iRacing's website to complete purchases.
Before running the project, ensure you have the following installed:
- Node.js (v20 or newer)
npmpackage manager
-
Clone the repository:
git clone https://github.com/your-username/iracing-content-navigator.git cd iracing-content-navigator -
Install dependencies:
npm install
To start the development server:
npm run devThe app will be available at http://localhost:5173.
To create a production build:
npm run buildThe output will be located in the dist folder.
To preview the production build locally:
npm run previewThe project includes scripts to fetch data from iRacing's public API and parse it into JSON files. These scripts use OAuth 2.1 authentication with the Password Limited Grant flow.
-
Register your application with iRacing:
- Contact iRacing support to register your application and get OAuth credentials
- Request access to the Password Limited Grant flow
- You will receive a
client_idandclient_secret - Your iRacing account (email) will be added to the access list for your client
-
Create a
.envfile in the root directory with your credentials:IRACING_USERNAME=your_email@example.com IRACING_PASSWORD=your_iracing_password IRACING_CLIENT_ID=your_client_id IRACING_CLIENT_SECRET=your_client_secret
Important: The Password Limited Grant flow requires that your specific iRacing account is registered with your client application. This is a security feature to prevent credential harvesting.
Run the fetch script to download current season data:
npm run fetch-dataRun the fetch-past script to download historical season data:
npm run fetch-pastProcess the fetched data into src/ir-data/ JSON files:
npm run parse-datanpm run parse-pastYou can refresh data from GitHub without running scripts locally.
- Add these repository secrets in GitHub: Settings > Secrets and variables > Actions.
IRACING_USERNAMEIRACING_PASSWORDIRACING_CLIENT_IDIRACING_CLIENT_SECRET
- Go to the Actions tab.
- Open Update iRacing Data.
- Click Run workflow.
The workflow runs the full pipeline (fetch-data, fetch-past, parse-data, parse-past) and then runs npm run build as a validation gate before committing.
If data changed, it bumps the patch version with npm version patch --no-git-tag-version (updating package.json and package-lock.json) and prepends a matching changelog entry with:
[actions] Refresh iRacing data
If everything passes, it commits and pushes changes directly to main only when data files change.
You can deploy to GitHub Pages from GitHub with a separate manual action.
- Go to the Actions tab.
- Open Deploy to GitHub Pages.
- Ensure branch is
main. - Click Run workflow.
This workflow runs npm run deploy (which includes the build step via predeploy).
The scripts use OAuth 2.1 Password Limited Grant, which:
- Automatically handles token acquisition and refresh
- Uses secure password masking (SHA-256 + Base64 encoding)
- Includes rate limiting protection
- Tokens are cached and reused until expiration
Contributions are welcome! If you'd like to improve this project, please:
- Fork the repository
- Create a new branch (
git checkout -b feature-name) - Commit your changes (
git commit -m 'Add feature-name') - Push to the branch (
git push origin feature-name) - Open a pull request
