Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Public Leaderboard System #33

Open
KendallDoesCoding opened this issue Mar 13, 2023 · 35 comments
Open

[FEAT] Public Leaderboard System #33

KendallDoesCoding opened this issue Mar 13, 2023 · 35 comments
Labels
EddieHub:good-first-issue feedback good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@KendallDoesCoding
Copy link
Owner

As of now the leaderboard/highscore only works locally (on the local computer), it would be amazing if the system can be website/server wide, but I think we may have to maintain a database or something for this.

@KendallDoesCoding KendallDoesCoding added good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested EddieHub:good-first-issue feedback labels Mar 13, 2023
@PeacefulWrath
Copy link

we need database and deploy it in some server

@KendallDoesCoding
Copy link
Owner Author

we need database and deploy it in some server

It cannot be deployed via a website?

@PeacefulWrath
Copy link

i think localstorage can be a good option

@KendallDoesCoding
Copy link
Owner Author

i think localstorage can be a good option

Perfect! Can you work on this issue?

@PeacefulWrath
Copy link

PeacefulWrath commented Mar 14, 2023

sure

@KendallDoesCoding
Copy link
Owner Author

assigned

@PeacefulWrath
Copy link

you have already used local storage so we need to use databases, can i go for mongodb for that???

@KendallDoesCoding
Copy link
Owner Author

KendallDoesCoding commented Mar 15, 2023 via email

@KendallDoesCoding
Copy link
Owner Author

When will you make the PR @Srinja333?

@PeacefulWrath
Copy link

soon

@PeacefulWrath
Copy link

my localhost refuse to open how to run it?

@KendallDoesCoding
Copy link
Owner Author

my localhost refuse to open how to run it?

any error message, screenshot? upload as a draft PR.

@PeacefulWrath
Copy link

crbug/1173575, non-js module files deprecated.

@PeacefulWrath
Copy link

i have just run it in vs code without debugging

@KendallDoesCoding
Copy link
Owner Author

it's ok make a draft PR let me see.

@PeacefulWrath
Copy link

how to do that?

@KendallDoesCoding
Copy link
Owner Author

how to do that?

you got git installed?

@PeacefulWrath
Copy link

yes

@KendallDoesCoding
Copy link
Owner Author

KendallDoesCoding commented Mar 17, 2023 via email

@PeacefulWrath
Copy link

no sorry

@PeacefulWrath
Copy link

i just clone from you

@KendallDoesCoding
Copy link
Owner Author

@Srinja333 - any update?

@PeacefulWrath
Copy link

Work is ongoing.... I had exam so I missed some days.....

@KendallDoesCoding
Copy link
Owner Author

KendallDoesCoding commented Mar 26, 2023 via email

@PeacefulWrath PeacefulWrath removed their assignment Apr 3, 2023
@Aditya1404Sal
Copy link

Hey ! does this issue / feature need working on ? , I'd be happy to work on it , i have worked with mongoDb before. Cheers !

@KendallDoesCoding
Copy link
Owner Author

Hey ! does this issue / feature need working on ? , I'd be happy to work on it , i have worked with mongoDb before. Cheers !

Yes. Sure, you can work on this.

@KendallDoesCoding
Copy link
Owner Author

@Aditya1404Sal - I forgot to assign you to this issue, even though I commented.

Can you work on getting this done by next week, please? Because, I want to release this feature soon.

@Aditya1404Sal
Copy link

It will be done in a week

@Aditya1404Sal Aditya1404Sal removed their assignment Jun 29, 2023
@ujju2000
Copy link

hey, this issue is resolved or i can work with you ?

@Aditya1404Sal
Copy link

@ujju2000 i had started the mongodb integration but it's taking up a considerable amount of time, so yeah you can takeover

@ujju2000
Copy link

okay, we just have to save the scores in the database ?

@RuchirDixit
Copy link

I believe we might need to use MongoDB Atlas in this case right? So that DB is publicly accessible?
Please let me know if there is any other way.

@KendallDoesCoding
Copy link
Owner Author

@ujju2000 @RuchirDixit - are both of you working on this?

@RuchirDixit
Copy link

I am just working on this issue for the sake of learning if @ujju2000 completes it he can raise a PR or else I will once it is solved.

@SlowMoschen
Copy link

Hi there!
Is this Issue already resolved, if not maybe I can help with it.

If we want to save a Highscore of a User we need to save it to a Database. A MongoDB would be pretty suitable for it because it has a free storage option.

Setting up the Database and the corresponding express application is no big deal and I can create that quite quickly , but we need a host posibility for the backend so that the Database is always accessable for the Quizapp.

My suggestion for the MongoDB Highscore Schema would be:

username - a non unique username set by the user, how it is done already. (possibible duplicates, wich should be fine)
highscore - the actual highscore reached by the user
createdAt - a timestamp when the Highscore was saved to the Database (we could display this then in the leaderboard)

To save and access the Highscores we should only need to swap the current localStorage logic with a POST/GET request to the express app.
For protection against a reuqets we dont want we can use cors and set the only allowed origin to the domain name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EddieHub:good-first-issue feedback good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants