Skip to content

Conversation

@byseif21
Copy link
Contributor

@byseif21 byseif21 commented Apr 22, 2025

Description

refactored backend files to enhance type safety and reliability using Zod validation and Redis instead of JSON.parse , I tried to avoid the files that isn't necessary tho so I hope I don't miss any or included unnecessary ones!! didn't fully test only verified code compilation and partial tests without Redis!!.

Should Close #5881
Related to #6207

@monkeytypegeorge monkeytypegeorge added the backend Server stuff label Apr 22, 2025
@byseif21
Copy link
Contributor Author

Hi @fehmer , thank you for the feedback. Could you please let me know if there is anything else needs changing too?

Miodec added 2 commits April 23, 2025 15:41
start approved quote with -1, throw if unchanged
no need for typecast anymore
@monkeytypegeorge monkeytypegeorge added the packages Changes in local packages label Apr 23, 2025
@Miodec Miodec added the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 23, 2025
@github-actions github-actions bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 23, 2025
@github-actions
Copy link
Contributor

Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes.

@github-actions github-actions bot added the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 23, 2025
@github-actions github-actions bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 23, 2025
@byseif21 byseif21 requested review from Miodec and fehmer April 23, 2025 19:09
@github-actions github-actions bot added the waiting for review Pull requests that require a review before continuing label Apr 23, 2025
@github-actions github-actions bot removed the waiting for review Pull requests that require a review before continuing label Apr 24, 2025
Miodec and others added 3 commits April 24, 2025 14:26
use this schema as add result options
modify function props structure slightly
remove last activity timestamp modifying as its already passed into the function
@Miodec
Copy link
Member

Miodec commented Apr 24, 2025

@byseif21 modified the xp leaderboard code a bit, check my latest commit and let me know what you think

@byseif21
Copy link
Contributor Author

@byseif21 modified the xp leaderboard code a bit, check my latest commit and let me know what you think

Very nice work, that's even cleaner! seems perfect to me.

@Miodec Miodec changed the title refactor: backend enhancement with Type-Safe Redis and Zod (@byseif21) refactor(backend): improve redis and json.parse type safety with zod (@byseif21) Apr 24, 2025
@Miodec Miodec merged commit 86383cf into monkeytypegame:master Apr 24, 2025
13 checks passed
@Miodec
Copy link
Member

Miodec commented Apr 24, 2025

Thanks!

@byseif21
Copy link
Contributor Author

Thanks!

Glad to contribute on that and thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Server stuff packages Changes in local packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace JSON.parse with parseJsonWithSchema

4 participants