@@ -623,14 +623,38 @@ fly secrets list -a catty-api
623623
624624---
625625
626- ## Future Milestones
627-
628- ### Milestone 2: Billing & Quotas
629- - Add usage tracking per user
630- - Implement billing via Stripe
631- - Add session time limits and quotas
632-
633- ### Milestone 3: Enhanced Features
626+ ## Roadmap
627+
628+ ### Custom Domain
629+ Move to own domain (e.g., ` api.catty.sh ` ) so no Fly URLs are exposed to users:
630+ - Register domain
631+ - Configure Fly custom domains for both ` catty-api ` and ` catty-exec `
632+ - Update CLI default API URL
633+ - Update WebSocket connect URLs returned by API
634+
635+ ### Usage Metering & Billing
636+ Track per-user token usage and implement billing:
637+ - ** Token tracking** : Intercept/proxy Anthropic API calls to count tokens per user, or use Anthropic's usage API if available
638+ - ** Database** : Supabase for users, sessions, and usage records
639+ - ** Pricing model** : Free tier (e.g., X tokens/month) + flat subscription (~ $25/mo for unlimited or higher cap)
640+ - ** Goal** : Cheaper than running Claude Code locally with your own API key
641+ - ** Billing integration** : Stripe for payment processing (simple checkout, no metered billing complexity initially)
642+
643+ ### Multi-Key API Pool
644+ Handle load spikes by rotating through multiple Anthropic API keys:
645+ - Store keys in database (Supabase)
646+ - Round-robin or least-recently-used selection when spawning sessions
647+ - Key health tracking (rate limits, errors)
648+ - Admin interface to add/remove keys
649+
650+ ### Database Backend (Supabase)
651+ Replace in-memory session storage with persistent database:
652+ - ** Users table** : id, email, workos_id, created_at, subscription_status
653+ - ** Sessions table** : id, user_id, machine_id, created_at, ended_at, tokens_used
654+ - ** API keys table** : id, key (encrypted), is_active, usage_count, last_used_at
655+ - ** Usage table** : user_id, date, tokens_in, tokens_out
656+
657+ ### Future Enhancements
634658- Session resume (reconnect to existing session)
635659- Download workspace changes back to local
636660- Multiple concurrent sessions per user
0 commit comments