Skip to content

FNFestival/fnfestival.github.io

Repository files navigation

FNFestival.co

This is the repository for the FNFestival.co website, where you can view the daily and generally available jam tracks for the Fortnite Festival mode.

How does it work?

The list of all available jam tracks can be found on the public Fortnite Content API at this link.

However, in order to retrieve the daily jam tracks, authentication is required. To do this, we use the fnbr.js library and then query the event flags that contain the daily jam tracks.

The jam tracks are automatically updated daily at midnight (0:00 UTC) using a GitHub workflow that runs the update script. Because GitHub Action cron jobs are unreliable and often delayed, we use a Cloudflare Worker to trigger the workflow on schedule.

Authentication

To retrieve the daily jam tracks, authentication with the Fortnite client/Epic Games is required. Follow these steps:

  1. Run npm run auth to start the authentication process.
  2. You will be asked for an authorization code. Obtain it from this link.
  3. After logging in, you will receive a JSON response containing the authorization code.
  4. Enter the authorization code when prompted.
  5. A deviceAuth.json file will be created, containing the accountId, deviceId, and secret.
  6. Set these values as secrets in your GitHub repository settings for the automated workflow.

Updating Tracks

Automated Updates (GitHub Actions)

The tracks are automatically updated via GitHub Actions. The workflow requires the following repository secrets:

  • FNBR_ACCOUNT_ID
  • FNBR_DEVICE_ID
  • FNBR_SECRET
  • SPOTIFY_CLIENT_ID
  • SPOTIFY_CLIENT_SECRET

These values come from the deviceAuth.json file created during authentication.

Manual Updates (Windows)

To manually update tracks on Windows:

  1. Set the required environment variables using the values from deviceAuth.json:

    set FNBR_ACCOUNT_ID=your_account_id
    set FNBR_DEVICE_ID=your_device_id
    set FNBR_SECRET=your_secret
    set SPOTIFY_CLIENT_ID=your_spotify_client_id
    set SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
  2. Run the update script:

    npm run update:tracks

The script will fetch the latest tracks and update data/tracks.json.

This process allows the script to connect to the Epic Games/Fortnite endpoints and request the events for Fortnite, including the daily jam tracks.

Thanks to

Contributing

This project was created rather quickly and there are many things that could be improved or added.

If you feel like it, you can help us out by making a pull request.

About

Explore daily and generally available Jam Tracks for the Fortnite Festival mode.

Topics

Resources

Stars

Watchers

Forks

Contributors