Repository navigation
Refactor routes and middleware: Extract Slack endpoints and admin routes - #383
Merged
Merged
Conversation
Extract public Slack webhook routes into separate modules for better organization and maintainability. Create reusable Slack middleware and separate endpoint handlers for the main AAO bot and Addie AI assistant. Changes: - Add separate Slack events endpoint for Addie AI (/api/addie/slack/events) - Extract Slack middleware to server/src/middleware/slack.ts - Extract public Slack routes to server/src/routes/slack.ts - Extract admin Slack routes to server/src/routes/admin/slack.ts - Extract admin Email routes to server/src/routes/admin/email.ts - Create shared unified users cache in server/src/cache/unified-users.ts - Update CLAUDE.md with Slack app configuration documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
BREAKING CHANGE: Slack endpoint URLs changed:
- /api/slack/events → /api/slack/aaobot/events
- /api/slack/commands → /api/slack/aaobot/commands
- New: /api/slack/addie/events
All Slack routes now under /api/slack/{app}/ for consistency.
Update Slack app Event Subscription URLs after deployment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Keep both Slack Apps and Dev Mode Testing sections in CLAUDE.md - Use our refactored slack.ts with separate admin routes - Remove duplicate Slack route mounts from origin/main 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.
Summary
Refactored http.ts to extract routes and middleware into separate modules for better organization. Added separate Slack endpoint for Addie AI assistant with independent signing secret configuration. Extracted admin routes into
/admin/subdirectory for clarity.Changes
server/src/middleware/slack.tswith reusable signature verificationserver/src/routes/slack.tssupporting both AAO bot and Addieserver/src/routes/admin/slack.tsserver/src/routes/admin/email.tsserver/src/cache/unified-users.tsTest plan
🤖 Generated with Claude Code
Co-Authored-By: Claude Haiku 4.5 [email protected]