> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openformat.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Level Progression Tracker

> Calculate your users level and their progression towards the next level based on the on-chain experience points (XP) they have earned. The XP requirements for levelling can be customised to determine how quickly the user progresses.

## Use cases

1. **Educational platforms & e-learning courses:** Users can earn XP for completing lessons or passing quizzes. Leveling up can grant access to more advanced courses or special content, thus encouraging continued learning and engagement.
2. **Employee Engagement Programs**: Employees earn XP by completing tasks, achieving targets etc. with levels indicating proficiency or eligibility for rewards.
3. **Customer Loyalty Programs**: Customers earn XP through purchases, reviews, or referrals. Higher levels could offer greater discounts, exclusive offers, or first access to new products.
4. **Fitness Apps**: Users might earn XP for workouts completed or PB's achieved. Levels could unlock virtual rewards or access to more features.
5. **Community and Social Platforms**: Users could earn XP for contributions like posting quality content or helping other users. Advancing levels might grant moderation privileges or other status indicators e.g. a Discord role.

## Prerequisites

1. **Setup OPENFORMAT**

   Before you can continue, please complete the following steps to obtain the necessary credentials:

   1. **Go to the [OPENFORMAT Dashboard](https://app.openformat.tech)**
   2. **Register** for an account
   3. **Generate an API Key**
   4. **Create a dApp**
   5. **Create a Badge** (only if required)

2. **An app where you are rewarding on-chain XP**

   You will need an app where your users have web3 accounts and are rewarded with XP. You can learn more about how to set this up [here](./reward-user-xp).

## Get Started

<Steps>
  <Step title="Remix this template">
    [Clone](https://buildship.app/remix?template=openformat-level-progression-tracker)
    this template in BuildShip.
  </Step>

  <Step title="OPENFORMAT Node Inputs">
    Add your OPENFORMAT `API Key` into the Get User Profile node
    inputs.
  </Step>

  <Step title="Test Integration">
    To test the integration, click on **Test** and add the `dappId` and `userId` into the query of the request.

    <video autoPlay muted loop controls playsInline className="w-full" src="https://mintcdn.com/openformat/vGurOUJG2onkcsD3/assets/templates/level-progression-tracker.mp4?fit=max&auto=format&n=vGurOUJG2onkcsD3&q=85&s=8b0308df95afa99843fc9b5ba7887ecb" data-path="assets/templates/level-progression-tracker.mp4" />
  </Step>
</Steps>

## Node Inputs

### Get User Profile

| Key       | Description                                                               |
| --------- | ------------------------------------------------------------------------- |
| `API Key` | Your OPENFORMAT [API Key](https://app.openformat.tech/home/settings).     |
| `dApp ID` | The ID for your OPENFORMAT [dApp](https://app.openformat.tech/home/apps). |

### Level Calculator

| Key                     | Description                                                                                                                                                                                                              |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `XP Balance`            | The amount of XP the user has earned, which will come from the output of the `Get User Profile` node. (String - converted to a number in the node)                                                                       |
| `Level XP Requirements` | An array of the XP requirements for each level, you can set these values to anything you want and the array can be any length. The default value is \[50,100,200,400,800,1600,3200,6400,12800,25600]. (Array of numbers) |
