monuelo / i-just-want-to-play-tetris

Please let me play Tetris in peace
https://tetris.hericl.es
MIT License
15 stars 3 forks source link

Create leaderboard #6

Open monuelo opened 4 years ago

monuelo commented 4 years ago

Create a ranking with the top scores and allows a player to register your name and score.

c-grigsby commented 2 years ago

Greetings! I'm thinking about implementing this and would like your thoughts. I'm considering making a small backend for the app to handle data persistence and filtering for highest scores. On the UI, top 5 scores and players could be shown on #home when the app is opened and at #game-over give the player the option to register name and score. Thanks!

monuelo commented 2 years ago

Hi, @c-grigsby! Nice to see you around. Yeah, I think you're on the right way. And for persisting data, maybe a JSON file can handle the job. Thoughts?

c-grigsby commented 2 years ago

Yeah, I was thinking about doing something lightweight with Express and with the current requirements a simple JSON file seems up for the job of persisting data. Do you think we should place the backend in a separate repo or within a directory in the current one?

monuelo commented 2 years ago

Let's put in here for now. Maybe we could even put the frontend over Next.JS and Setup API Routes, but I don't want to do any breaking changes for now, 'cause @kihuni is actually working on the webpack issue

monuelo commented 2 years ago

But since it's done, we could even use some env/workspace manager like lerna or NX, and create workflow files to deploy the apps according to changes made on the push.

monuelo commented 2 years ago

For now, just create a new folder to put the project

c-grigsby commented 2 years ago

Nice, yep migrating would definitely simplify some things and a few workflows would be awesome. I'll take a look into implementing this feature in the near future. Thanks for your time and have an awesome day!

kihuni commented 2 years ago

Hi, @monuelo. I have already started working on the issues. Possibly by the end of tomorrow, eastern African time, I will have been done with it.

monuelo commented 2 years ago

Awesome, @kihuni! ✨ Don't worry about the time, there's no rush. 😉

kihuni commented 2 years ago

Thank you, I will take my time.