Skip to content

Conversation

@suiramdev
Copy link
Owner

No description provided.

@suiramdev suiramdev changed the title Add / Replace with convex Draft: Add / Replace with convex Aug 28, 2025
@suiramdev suiramdev marked this pull request as draft August 28, 2025 08:28
@suiramdev suiramdev changed the title Draft: Add / Replace with convex Add / Replace with convex Aug 28, 2025
@suiramdev
Copy link
Owner Author

Having issues related to get-convex/convex-backend#193 (comment)

…t variables, and refactor user management components

- Added Zero API endpoints for fetching and mutating data.
- Updated .env.example with new Zero API URLs.
- Refactored user management components to utilize the new Zero API.
- Introduced a new UsersTable component with improved structure and functionality.
- Updated package dependencies and configurations for Zero integration.
This commit marks the first production implementation of Zero Replicache in
the codebase, enabling real-time data synchronization with optimistic updates
and offline capabilities. The refactoring of Zero queries to use related()
establishes the query patterns that will be used throughout the application
for collaborative features.
- Added EditUserDialog component for editing user details.
- Updated BanUserDialog and DeleteUserDialog to use new mutator functions.
- Introduced createUserMutator for user-related operations including banning, deleting, and updating users.
- Refactored user table actions to integrate the new EditUserDialog and handle user actions more effectively.
Replace Zero with Convex as the backend-as-a-service (BaaS) solution.
Zero proved to be too unstable for production use, while Convex
provides a more stable and reliable foundation for the application.

Key changes:
- Remove Zero package and all related API routes
- Remove Prisma/PostgreSQL database package (packages/db)
- Add Convex package with BetterAuth integration
- Update authentication helpers to work with Convex
- Refactor organization and user management to use Convex queries/mutations
- Update admin app to use Convex provider instead of Zero client
- Simplify routing structure by removing organization-scoped routes
- Updated member table components to utilize Convex for fetching organization members.
- Refactored member-related types and queries to align with Convex's structure.
- Introduced new mutations for creating accounts, users, and members within the BetterAuth framework.
- Improved user interface components for member actions, including selection and status display.
- Added support for organization-specific member queries and streamlined data handling.
More standard use of better-auth in convex, WIP pages, ...
- Remove organization-related features and components
  - Delete organization settings, setup flow, and member management
  - Remove organization navigation and related UI components
  - Clean up organization queries and mutations

- Refactor all query validators
  - Add explicit return type validators using v.array() and v.object()
  - Standardize query return type definitions across all queries
  - Improve type safety for query responses

- Begin deprecation of auth/ package
  - Update sign-in form components
  - Remove setup-related auth mutations
  - Migrate towards direct Convex auth integration
- Deleted the @repo/auth package and its related files.
- Updated imports in various components to use @repo/convex for authentication.
- Refactored sign-in and sign-up forms to utilize new auth client from @repo/convex.
- Cleaned up unused auth client code and adjusted package.json dependencies accordingly.
- Refactored component structure to improve organization and clarity, moving components to their respective feature directories.
- Updated package dependencies, including better-auth and convex, to the latest versions for improved functionality and security.
- Introduced new components for room management, including InviteFriendsButton and LeaveRoomButton, enhancing user interaction within rooms.
- Cleaned up unused components and optimized imports across the application.
…pabilities

- Implemented message querying and sending in the ChatBox component, allowing users to send and receive messages in real-time.
- Updated the schema to include a messages table with necessary fields.
- Added mutations and queries for handling message operations in the Convex backend.
- Refactored the ChatBox component to utilize preloaded message data and improve user experience.
- Introduced RoomHeader and RoomStatus components to improve the room interface, displaying room details and status.
- Updated RoomPage to utilize the new components, enhancing the user experience with better organization and clarity.
- Added RoomSettingsButton for managing room settings, including playlist selection and privacy options.
- Implemented media query hook for responsive design adjustments.
- Updated mutations to support new room attributes, including playlist author.
- Updated RoomSettingsButton to utilize react-hook-form for improved form handling and validation.
- Added new fields for playlist management, including total tracks, to the room schema and mutations.
- Refactored RoomStatus to display playlist details and allow host interactions for playlist selection.
- Introduced DashedSelector and SearchableList components for better playlist selection experience.
- Improved UI components for a more cohesive user experience in room management.
- Changed room status messages to provide clearer information: "Waiting for players" to "Waiting for the host", "Playing" to "Game in progress", and "Finished" to "Game finished".
- Updated the Join button in RoomPreviewCard to always display "Join Room" and adjusted its disabled state to only depend on the presence of a room code.
- Add optimistic updates for instant message rendering in ChatBox
- Remove isSending state since messages appear immediately
- Simplify RoomStatus component (remove badges, streamline UI)
- Add playlist metadata (totalTracks, author) to room forms
- Make app title a clickable link to home
- Remove unused ChatEmptyState component
- Delete deprecated RoomSettings component
- Updated globs to include only TypeScript files.
- Introduced core principles of atomic decomposition for component
design.
- Added detailed guidelines for distinguishing between atoms and
molecules.
- Emphasized the importance of reusability, testability, and
maintainability in component architecture.
- Included a pre-commit checklist to ensure adherence to decomposition
principles.
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