#18 group chat create manage send messages#36
Merged
mrsumanbiswas merged 8 commits intoJul 3, 2026
Merged
Conversation
…get group messages
…fied inbox timeline
… Metadata, Api route update
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.
PR Description
Associated Issue
Closes #18 (back-end)
Target Milestone
v0.2.0
Type of Change
Description & Overview
This PR delivers the complete production-ready backend infrastructure required to support multi-user channels, group administrative controls, transient event multiplexing, and a consolidated unified inbox layout.
The messaging core has been successfully extended from a 1-on-1 direct messaging system into an isolated room fan-out engine backed by relational integrity guardrails and compound temporal indexes.
Architectural Highlights
1. Hardened Relational Schema (
migrations/006,migrations/007)groupsandgroup_membersjunction tables.chk_message_destination) ensuring a message cannot target a user and a group simultaneously, or drift with zero mapping contexts.group_members.last_read_atto resolve read receipts across scale boundaries without database row bloating.(group_id, created_at DESC)) to prevent high I/O memory sorting under paginated query volumes.2. Context Isolation Security Middleware (
middlewares/group_auth.go)GroupAuthGuard: Restricts resource visibility, history retrieval, and websocket interception exclusively to verified active members. Injecting the verified role directly down the context.GroupAdminGuard: Blocks structural changes (adding/kicking members, altering metadata) unless the user context holds administrative clearance.3. WebSocket Multi-Cast Fan-out (
services/ws.go)ReadPumpexecution engine to parse non-emptygroup_idstructures.Hub.mu.RLock()) over the active map dictionary to broadcast text streams, group typing states, and group read receipts without echoing payloads back to the initial writer node.4. Consolidated Unified Dashboard Query (
repository/message.go)UNION ALLtimeline query compiling direct messages and group activity into a single chronological dashboard feed.$1::uuid) andCOALESCEsafety traps against databaseNULLscans.New & Enhanced Endpoints Matrix
POST/api/groupsadmin)GET/api/groupsGET/api/groups/{id}PATCH/api/groups/{id}POST/api/groups/{id}/leaveGET/api/groups/{id}/membersPOST/api/groups/{id}/membersDELETE/api/groups/{id}/members/{userId}GET/api/groups/{id}/messagesbeforetimelinesGET/api/messages/conversationsunread_countmetricsPOST/api/messages/readsender_idorgroup_idTesting Protocol Executed
log.Printfto prevent generic 500 concealment.wscat) using explicit UUID syntax mappings to verify that transient live frames (typing, text messaging, read synchronization updates) multiplex cleanly without race conditions or memory leaks.Reviewer Notes
Backend infrastructure is fully integrated and tested out against the current mobile specification rules. API outputs are completely unblocked and ready for immediate implementation inside the Android UI layouts.