[Feature] Build a real-time collaborative pool chat/comments feature per group#98
Open
senmalong wants to merge 1 commit into
Open
[Feature] Build a real-time collaborative pool chat/comments feature per group#98senmalong wants to merge 1 commit into
senmalong wants to merge 1 commit into
Conversation
…ointSave-org#90) - Add pool_messages schema with RLS policies restricting read/write to pool members - Enforce message length limit (<= 1000 characters) and rate limiting (max 1 message per 3 seconds per sender) via DB trigger - Implement automated trigger to notify other pool members of new chat messages - Expose pool_messages and update Supabase Client initialization to support dynamic wallet headers - Create GroupDiscussion UI component featuring real-time message syncing, local rate-limit lockout, and mobile responsiveness - Integrate 'Discussion' tab inside group detail page layout next to Activity Log - Configure Playwright E2E coverage for chat functionality
Contributor
|
@senmalong kindly resolve conflict please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #90
Overview
This PR implements a real-time collaborative group chat / discussion feature per savings pool, enabling group members to communicate, coordinate deposit timings, and build trust securely within the app.
Key Achievements
Database Schema & Row Level Security (RLS):
pool_messagestable with an optimized index for quick fetching.pool_memberstable).Automated Notification Integration:
AFTER INSERTtrigger on thepool_messagestable that automatically adds in-app notifications to thenotificationstable for all other pool members whenever a new message is posted.Frontend Supabase Setup:
pool_messagestable under TypeScript Database schema types.getSupabaseClient(walletAddress)to dynamically instantiate Supabase clients with client-injected wallet headers to authorize RLS queries.Sleek Discussion UI:
postgres_changesevents) to sync and display messages in real-time.E2E Testing: