feat(slack-app): Phase 1 MVP with Nango multi-workspace OAuth#1561
feat(slack-app): Phase 1 MVP with Nango multi-workspace OAuth#1561victor-inkeep wants to merge 1 commit intomainfrom
Conversation
Implement core Slack bot functionality: - Nango OAuth flow with workspace credential caching - Bolt.js handlers: commands, mentions, DM's shortcuts - /inkeep command with ask modal (project -> agent selection) - Channel default agent configuration - Vercel deploymnet support - Set up ngrok tunnel script for local development
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @victor-inkeep's task —— View job Code Review: Slack App Phase 1 MVPAfter conducting a comprehensive review of this Slack app implementation, I have several architectural and code quality considerations to share. This is a well-structured MVP with solid foundations, but there are opportunities for improvement across security, error handling, performance, and system design. 🏗️ System Architecture & DesignStrengths
Areas for Consideration1. Database Access Layer Inconsistency
|
| * Fallback (dev only): | ||
| * - Uses SLACK_BOT_TOKEN env var if workspace lookup fails | ||
| */ | ||
| async function authorize({ |
There was a problem hiding this comment.
TODO: Add enterpriseId to workspace schema for Enterprise Grid support. Unique key should be enterpriseId + teamId
| @@ -0,0 +1,163 @@ | |||
| //agents-core/src/db/manage/slack-schema.ts | |||
There was a problem hiding this comment.
TODO: Add enterpriseId column
| /** | ||
| * TODO: Replace with actual agents-core imports once monorepo is set up: | ||
| * import { getSlackWorkspaceByTeamId } from '@inkeep/agents-core/data-access/manage/slack'; | ||
| */ |
There was a problem hiding this comment.
TODO: Add to SlackWorkspace interface enterpriseId
| // src/app/api/nango/webhook/route.ts | ||
| // Nango webhook handler for OAuth and connection events | ||
| // ============================================================ | ||
|
|
There was a problem hiding this comment.
TODO: Update to capture enterpriseId from OAuth response
Summary
Phase 1 MVP of the Inkeep Slack bot with multi-workspace OAuth via Nango.
What's Included
/inkeep,/inkeep login|logout|status|default|helpOAuth Flow
Key Files
src/app/api/nango/- OAuth endpointssrc/bolt/- Bolt.js handlers (commands, events, actions)src/lib/slack-credentials.ts- Token caching + workspace lookupTesting