Added Slack account linking and implemented private Slack channels creation for mentorship pairs#56
Open
mafernandag wants to merge 7 commits intomainfrom
Open
Added Slack account linking and implemented private Slack channels creation for mentorship pairs#56mafernandag wants to merge 7 commits intomainfrom
mafernandag wants to merge 7 commits intomainfrom
Conversation
|
Visit the preview URL for this PR (updated for commit 59054ff): https://mentor-match-backend--pr-56-txwh4zla.web.app (expires Tue, 30 Dec 2025 20:10:35 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 00dcef695f9e3298930fa589c5484a93e0a376cb |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces comprehensive Slack integration to enable two-way communication between the Mentorship App and Slack workspaces. The implementation supports OAuth account linking, automatic private channel creation for mentorship pairs, and bidirectional message synchronization.
Key Changes:
- OAuth flow for linking user Slack accounts with user tokens stored in Firestore
- Automatic creation of private Slack channels for each mentorship pair with auto-invite functionality
- Real-time message bridging using Socket.io for app-to-Slack and Slack-to-app synchronization
- Admin API endpoints for manual channel management (UI pending)
- Google Cloud Functions for handling Slack webhooks and message forwarding
Reviewed changes
Copilot reviewed 14 out of 17 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
functions/slack.js |
Core Slack integration logic including event handling, signature verification, channel creation, and message forwarding |
functions/index.js |
OAuth callback endpoints and admin channel management routes integrated into Express API |
functions/package.json |
Upgraded firebase-functions to v7.0.0 for enhanced functionality |
src/components/dashboard/SlackPage.jsx |
UI component for Slack account linking with connection status display |
src/components/SlackOAuthPage.jsx |
OAuth callback handler with popup window support and user refresh |
src/components/dashboard/SideMenu.jsx |
Added Slack menu item with inline SVG icon |
src/components/chat/Chat.jsx |
Socket.io integration for real-time Slack message sync and dual-send functionality |
src/hooks/useUser.jsx |
Cross-window message listener for OAuth popup completion events |
src/api/slackBridge.js |
Client-side API functions for posting messages and creating channels |
src/api/firebaseConfig.js |
Enhanced test environment compatibility with conditional initialization |
package.json |
Added dependencies: @slack/web-api, socket.io, socket.io-client, body-parser |
App.jsx |
Added OAuth success route |
.gitignore |
Added Slack server directory and local env files |
Files not reviewed (2)
- mentor-match-app/functions/package-lock.json: Language not supported
- mentor-match-app/package-lock.json: Language not supported
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.
This PR introduces a complete Slack integration to enable seamless communication between the Mentorship App and existing Slack workspaces. It supports OAuth linking, admin channel management, and bi-directional message syncing for mentorship pairs. Closes #41.
Key Features:
Authentication & Linking:
Admin Capabilities:
Mentorship Chat Sync (Two-Way Bridging):
Infrastructure: