Leaderboard-Pro icon indicating copy to clipboard operation
Leaderboard-Pro copied to clipboard

[HACKTOBERFEST-25] feat: remove the dummy data in the subtext of each tile and implement actual metric change mechanism

Open amaydixit11 opened this issue 4 months ago • 7 comments

Image

amaydixit11 avatar Aug 06 '25 13:08 amaydixit11

hey @amaydixit11, would love to work on this. Can you assign it please ?

Rudra775 avatar Sep 21 '25 08:09 Rudra775

@Rudra775 You can start working on the issue. Make sure to rasie PRs only after 1st October.

HarK-github avatar Sep 21 '25 10:09 HarK-github

@HarK-github sure, will do ;)

Rudra775 avatar Sep 21 '25 12:09 Rudra775

hello @sumagnadas & other maintainers, I've started working the issue and setup the project locally. Started reading the codebase to become familiar. I had a question, that the update on rating(which is co-related to the previous months data) which is to be done on the HomePage.jsx, does it have to stored in DB like User Details ? or the frontend has to merely make an API call every time we call the page ?

Also if there's any extra info that you'd like to share.. so that we can be on the same page it could be helpful too.

Rudra775 avatar Oct 01 '25 17:10 Rudra775

@Rudra775 it has to be persistent somewhere because i dont think the websites provide that information in API. If it does, then we can just call an API and calculate in the frontend. Otherwise, the logic has to be implemented to store it in a database.

Also, currently we don't have an implementation for the overall rank calculation so it would be good to hear some ideas, albeit directly not related to the current issue.

sumagnadas avatar Oct 02 '25 08:10 sumagnadas

hello @sumagnadas have been working on this issue lately and heres my approach. Creating an endpoint /api/stats/:username/ for fetching from db. whenever users link their platform handles, we’ll fetch their current stats and store them in the database. this will ensure dynamic changes. future updates might be handled via cron jobs, will have to learn about it. please lmk if all this is gtg.

once im done with this then maybe i can workk on overall rank calculation too ?

Rudra775 avatar Oct 06 '25 18:10 Rudra775

Sorry for the late response.

That is a good approach. The only thing you have to add to this is platform-wise stats because one user can have the same username in different platforms. It could also be such that the username, as a key, lists the different platforms it is associated with, although I don't think that's a good database model. Anyways, if you can come up with a better approach, apart from the ones, you can go with it too. Apart from that, the approach is good and we can update the database every month or so, depending on our needs.

sumagnadas avatar Oct 08 '25 09:10 sumagnadas