feat: add collaborative study group rooms with username-based invitat…#476
Open
Ishta-P-Jain wants to merge 1 commit into
Open
feat: add collaborative study group rooms with username-based invitat…#476Ishta-P-Jain wants to merge 1 commit into
Ishta-P-Jain wants to merge 1 commit into
Conversation
Contributor
|
@Ishta-P-Jain is attempting to deploy a commit to the Vikas' projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Which issue does this PR close?
Closes #386
Rationale for this change
InnoVision currently focuses on individual learning. Peer-to-peer learning significantly improves engagement, motivation, and knowledge retention. This PR adds a collaborative study room feature so learners can study, discuss doubts, and learn together in real time.
What changes are included in this PR?
New files
src/app/study-rooms/page.jsx— Main study rooms page with room sidebar, chat area, create room modal, and invite accept/decline bannersrc/app/api/rooms/create/route.js— API route to create a new study roomsrc/app/api/rooms/invite/route.js— API route to invite a user by usernamesrc/app/api/rooms/join/route.js— API route to accept an invite and join a roomsrc/components/study-rooms/RoomList.jsx— Real-time sidebar list of rooms the user belongs tosrc/components/study-rooms/ChatWindow.jsx— Real-time chat inside a room using Firebase onSnapshotsrc/components/study-rooms/InviteModal.jsx— Modal to invite a friend by username with helpful hint about username formatModified files
src/contexts/auth.js— Addedusernamefield (email prefix) when saving new users to Firestoresrc/contexts/notifications.js— Added real-time Firestore listener for pending invitations so they appear in the existing notification bell instantlysrc/components/Navbar/Navbar.jsx— Added Study Rooms icon (Users) to the navigation barFeature flow
/study-rooms?invite=IDwhere an Accept & Join / Decline banner appearsAre these changes tested?
Manually tested the following:
No automated tests included as the feature relies heavily on Firebase real-time listeners and UI interactions. Existing tests are not affected.
Are there any user-facing changes?
Yes:
/study-roomspage accessible from the navbar (Users icon)usernamefield added to their Firestore user document manually (value = part of email before @). New sign-ups get this automatically.firestore.rulesnot included in this PR — the following rules need to be added to the project's Firestore rules by a maintainer: