WeSearch

Indie Dev Cost Management: Designing a $0 $100/Month Stack

·3 min read · 0 reactions · 0 comments · 0 views
Indie Dev Cost Management: Designing a $0 $100/Month Stack

Indie Dev Cost Management: Designing a $0→$100/Month Stack Avoid the "suddenly I'm paying...

Original article
DEV Community
Read full at DEV Community →
Full article excerpt tap to expand

try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 801579) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } kanta13jp1 Posted on Apr 28 Indie Dev Cost Management: Designing a $0 $100/Month Stack #ai #automation #indiedev #buildinpublic Indie Dev Cost Management: Designing a $0→$100/Month Stack Avoid the "suddenly I'm paying $500/month" trap. Here's a phase-based cost design I use in production. Early Stage ($0/month): Max the Free Tiers Stack: Frontend: Flutter Web → Firebase Hosting (free, 1GB/month) Backend: Supabase Free Tier DB: 500MB Edge Functions: 500K executions/month Auth: 50K MAU Storage: 1GB AI API: Claude Haiku ($0.80/M tokens — cheapest capable model) Email: Resend Free (100 emails/day) CI/CD: GitHub Actions (2,000 min/month) Enter fullscreen mode Exit fullscreen mode Free tier trap to watch for: Supabase Free: project pauses after 1 week of inactivity → Fix: weekly health-check cron in GHA on: schedule: - cron: '0 9 * * MON' steps: - run: curl -sf "$SUPABASE_URL/functions/v1/health-check" Enter fullscreen mode Exit fullscreen mode Growth Stage ($10-30/month): Minimal Paid Upgrades Added cost: Supabase Pro: $25/month DB: 8GB Edge Functions: 2M executions/month Branch feature (preview environments) No inactivity pause Total: ~$25/month Enter fullscreen mode Exit fullscreen mode Claude API cost optimization: // Route to haiku vs sonnet → 80% cost reduction String selectModel(String taskType) { return switch (taskType) { 'classification' => 'claude-haiku-4-5', // $0.80/M: classify/short 'summarization' => 'claude-haiku-4-5', // $0.80/M: summarize 'analysis' => 'claude-sonnet-4-6', // $3/M: deep reasoning 'generation' => 'claude-sonnet-4-6', // $3/M: content gen _ => 'claude-haiku-4-5', }; } Enter fullscreen mode Exit fullscreen mode Prompt Caching — 89% reduction: # Cache the system prompt on first call (Claude API) messages = [ { "role": "user", "content": [ { "type": "text", "text": system_prompt, "cache_control": {"type": "ephemeral"} # mark for caching }, { "type": "text", "text": user_input } ] } ] # Second call onward: cache hit → ~90% input token cost reduction Enter fullscreen mode Exit fullscreen mode Scaling Stage ($50-100/month): Right-sized Upgrades Cost breakdown: Supabase Pro: $25/month (fixed) Firebase: $5-20/month (Hosting + Functions) Claude API: $10-30/month (depends on MAU) Resend: $20/month (10K emails/month Pro) Vercel/CF Pages: $0 (free tiers sufficient) Total: $60-95/month Enter fullscreen mode Exit fullscreen mode Weekly cost monitoring with GHA: on: schedule: - cron: '0 9 * * MON' jobs: cost-report: steps: - name: Claude API usage run: | USAGE=$(curl -s "https://api.anthropic.com/v1/usage" \ -H "x-api-key: $ANTHROPIC_API_KEY") echo "Input tokens: $(echo $USAGE | jq '.input_tokens')" echo "Output tokens: $(echo $USAGE | jq '.output_tokens')" Enter fullscreen mode Exit fullscreen mode Cost Design Principles 1. Never pay until you've exhausted the free tier 2. Haiku first, sonnet only when quality demands it 3. Cache aggressively — CDN + Prompt Cache 4. Weekly cost alert → Slack notification on anomalies 5. At $100/month, revisit pricing model (paid plans or feature gates) Enter fullscreen mode Exit fullscreen mode Break-even math: $100/month infra ÷ $7/user/month (≈ ¥980) → Break-even: ~14 paying users →…

This excerpt is published under fair use for community discussion. Read the full article at DEV Community.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Email

Discussion

0 comments

More from DEV Community