How bscott/subtrackr works
SubTrackr is a self-hosted subscription tracker. Its main workflow is managing subscriptions, then viewing spending and renewal dates and receiving reminders; additional branches cover authentication, settings, integrations and MCP access. The README documents several capabilities whose internal wiring was not sampled, so those links are attributed to the README rather than presented as inspected call paths.
Main entry points: main.go Web server and routes · notification_dispatcher.go Notification dispatch · database.go SQLite database · subscription.go Subscription operations
Components 28
Web application
- Web server and routes
cmd/server/main.go - SQLite database
internal/database/database.go - Schema migrations
internal/database/migrations.go - Settings handlers
internal/handlers/settings.go
Subscription domain
- Subscription handlers
internal/handlers/subscription.go - Subscription operations
internal/service/subscription.go - Subscription rules
internal/models/subscription.go - Subscription repository
internal/repository/subscription.go - Category management
internal/handlers/category.go - Calendar and iCal
internal/handlers/subscription.go - Spending analytics
internal/handlers/subscription.go
Services and integrations
- Settings service
internal/service/settings.go - Currency conversion
internal/service/currency.go - Reminder scheduling
internal/service/reminder_runner.go - Notification dispatch
internal/service/notification_dispatcher.go - Email delivery
internal/service/email.go - Push notifications
internal/service/ntfy.go - Webhook delivery
internal/service/webhook.go
Access and interfaces
- Authentication handlers
internal/handlers/auth.go - Authentication middleware
internal/middleware/auth.go - Session management
internal/service/session.go - MCP server
cmd/mcp/main.go
Browser interface
- Themes and appearance
web/static/js/themes.js - Subscription sorting
web/static/js/sorting.js - Form modals
web/static/js/modal.js
Other components
- User
- External notification services
- Browser
Connections 31
- User → Web server and routes: uses
- Web server and routes → SQLite database: initializes
cmd/server/main.go - Web server and routes → Authentication handlers: routes auth
cmd/server/main.go - Web server and routes → Subscription handlers: routes requests
cmd/server/main.go - Web server and routes → Category management: routes categories
cmd/server/main.go - Web server and routes → Authentication middleware: protects routes
- Authentication handlers → Session management: creates sessions
internal/handlers/auth.go - Subscription handlers → Subscription operations: manages subscriptions
- Subscription operations → Subscription repository: persists records
- Subscription repository → SQLite database: reads and writes
internal/repository/subscription.go - Subscription rules → Subscription repository: models records
internal/repository/subscription.go - SQLite database → Schema migrations: uses schema
- User → Calendar and iCal: views renewals
- User → Spending analytics: views spending
- User → Settings handlers: configures app
- Settings handlers → Settings service: updates preferences
- User → Category management: organizes subscriptions
- User → Currency conversion: uses conversion
- Reminder scheduling → Notification dispatch: dispatches reminders
- Notification dispatch → Email delivery: delivers email
- Notification dispatch → Push notifications: delivers push
- Notification dispatch → Webhook delivery: delivers webhooks
- Email delivery → External notification services: sends email
- Push notifications → External notification services: sends push
- Webhook delivery → External notification services: sends events
- User → MCP server: uses AI tools
- MCP server → Subscription operations: manages subscriptions
- Browser → Web server and routes: requests pages
- Browser → Themes and appearance: selects appearance
- Browser → Subscription sorting: sorts subscriptions
- Browser → Form modals: edits subscriptions