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

refactoring: backend services & frontend hooks #39

Merged
merged 30 commits into from
Nov 23, 2024
Merged

Conversation

in-mai-space
Copy link
Collaborator

@in-mai-space in-mai-space commented Nov 19, 2024

Frontend refactor:

  • abstraction of useInfiniteQuery (get endpoints with pagination) and useToggleBase (like and follow) hooks
  • move notification permission hooks into separate files to declutter main _layout

Backend refactor:

  • modify user model to include firstName and lastName, apparently it's required when registering
  • refactor endpoints to use MongoDB IDs instead of Supabase IDs, except for authentication and session-based user retrieval endpoints
  • consolidate user-related functions into the User Service interface for better organization
  • refactor / implement atomic transactions for services method and using mongoose transaction if necessary (thanks to MongoDB Atlas setup 🙏🏻)
  • rename user-related controllers for consistency
  • add documentation to the Service interfaces

@in-mai-space in-mai-space self-assigned this Nov 19, 2024
@stoneliuCS stoneliuCS merged commit 6f3eb07 into main Nov 23, 2024
1 check passed
@stoneliuCS stoneliuCS deleted the refactoring branch November 23, 2024 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants