open-format / GetStarted

This starter is an introduction into a new decentralised world and what we believe to be the starting point for 90% of all future applications.
https://docs.openformat.tech/
MIT License
1 stars 0 forks source link

Leaderboard #12

Closed tinypell3ts closed 1 year ago

tinypell3ts commented 1 year ago

Feature Description

This feature aims to add a leaderboard page for displaying users with the most experience points. The implementation should allow users to view a table of all users and their experience point balances, sorted by highest balance first.

## Proposed solution
- [x] Create a new page for the leaderboard, with a table to display the user information.
- [x] Fetch experience point balances from the subgraph, using the token address provided in the documentation.
- [x] Sort the table by highest balance first, so that users with the most experience points are listed at the top.
- [x] Include relevant user information in the table, such as wallet address, username (if available)
- [ ] Add pagination to the table if necessary, to improve performance and user experience.
- [x] Style the leaderboard page to match the existing design of the DApp template.
- [x] Add timed leaderboard. I.e. daily, weekly, monthly, yearly, all time filters

Acceptance Criteria

  1. The leaderboard page should display all users and their experience point balances, sorted by highest balance first.
  2. The leaderboard page should include relevant user information, such as username (if available)
  3. The leaderboard page should be styled to match the existing design of the DApp template.
  4. The feature should be compatible with the current version of the DApp template.

Additional Context

Subgraph documentation: https://thegraph.com/docs/ Example of querying the subgraph for token balances: Subgraph

3rdBlock commented 1 year ago

Started the leaderboard. Need to add pagination and timed leaderboard filtering.

Styling needs to be defined still.

tinypell3ts commented 1 year ago

Thanks for this. To echo what I added in your PR. We can hold off on pagination for now until we have decided how to display the data from the subgraph. The Action and Mission entity now have a createdAt on them, so you can do weekly leaderboard.

Keep it up! You're doing great. Please keep adding your progress updates here 💪