Skip to content

Add configurable billing notification channel for Addie#511

Merged
bokelley merged 2 commits into
mainfrom
bokelley/addie-billing-channel
Jan 3, 2026
Merged

Add configurable billing notification channel for Addie#511
bokelley merged 2 commits into
mainfrom
bokelley/addie-billing-channel

Conversation

@bokelley

@bokelley bokelley commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a configurable Slack channel for billing notifications (new subscriptions, payments, failures, cancellations)
  • Replace hardcoded webhook-based billing notifications with channel-based messaging via Addie
  • Add System Settings admin page with Slack channel picker

Changes

  • New migration: 105_system_settings.sql - Adds system_settings key-value table
  • New DB layer: system-settings-db.ts - Read/write system settings with typed helpers
  • New API routes: /api/admin/settings/* - Admin settings endpoints with Slack channel picker
  • New admin UI: admin-settings.html - System Settings page under Settings menu
  • New notification service: notifications/billing.ts - Sends billing notifications via sendChannelMessage
  • Updated http.ts: Uses new billing notification service instead of webhook

Test plan

  • TypeScript compiles without errors
  • All tests pass
  • Admin settings page loads correctly
  • Channel picker shows available Slack channels (requires Addie token)
  • Saving channel updates the setting in database

🤖 Generated with Claude Code

bokelley and others added 2 commits January 3, 2026 14:57
Replaces the hardcoded webhook-based billing notifications with a
configurable Slack channel that admins can select via a new System
Settings page. This allows billing notifications (new subscriptions,
payments, failures, cancellations) to be sent to a dedicated channel
instead of the general admin channel.

- Add system_settings table for key-value config storage
- Add admin settings API with Slack channel picker
- Add admin-settings.html page under Settings > System Settings
- Create billing notification service using sendChannelMessage
- Update http.ts to use new billing notifications

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Main branch already has 105_addie_email_event_type.sql, so renaming
the system_settings migration to 106.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit eb62450 into main Jan 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant