Run: git log --oneline -5 2>/dev/null for recent changes
Run: ls src/ app/ lib/ functions/ 2>/dev/null to understand project structure
Use this context to tailor all output to the actual project
Estimate the true cost of building, running, and maintaining software architectures. Use this before scoping projects, pricing engagements, or choosing between build vs buy.
Step 1: Classify the Cost Analysis Type
Need
Output
Project estimate
Total build cost (hours × rate + infrastructure)
Architecture comparison
関連 Skill
Side-by-side cost of 2+ approaches
Infrastructure forecast
Monthly/annual cloud + service costs at scale
Build vs buy
Custom development vs SaaS/off-the-shelf comparison
Maintenance budget
Ongoing cost to keep a shipped product running
Client proposal
SOW-ready cost breakdown for consulting engagement
Step 2: Gather Context
What's being built — feature, MVP, full product, migration?
Platforms — Android, iOS, Web, backend, or combination?
Team — in-house, contractors, agency (rate per hour)?
Timeline — deadline-driven or scope-driven?
Scale expectations — users at launch, 6 months, 12 months?
Third-party services — Stripe, Firebase, AI APIs, CDN?
Step 3: Engineering Hour Estimates
Estimation Framework
Break every feature into tasks. Estimate each task in hours.
Always use three-point estimation:
Optimistic (O): everything goes right, no unknowns
Likely (L): normal development with typical blockers
Pessimistic (P): significant unknowns, dependencies, or complexity
Estimate = (O + 4L + P) / 6
Then apply the complexity multiplier:
Simple (CRUD, standard UI): 1.0x
Moderate (custom logic, integrations): 1.3x
Complex (real-time, AI, payments): 1.6x
Novel (never done before, R&D): 2.0x
Stripe: 2.9% + $0.30 per transaction (no monthly fee)
SendGrid/Resend: $0-20/month (up to 100 emails/day free)
OpenAI API: $0.50-15 per 1M tokens (model dependent)
Gemini API: $0-7 per 1M tokens (model dependent)
Vercel: $0-20/month (hobby/pro), usage-based beyond
Algolia/Search: $0-50/month (up to 10K records free)
Sentry: $0-26/month (error monitoring)
Analytics: $0 (Firebase Analytics), $0-25/month (Mixpanel/PostHog)
Domain + DNS: $12-20/year
Step 5: Project Cost Templates
MVP (one platform + backend)
Typical scope: 5-8 screens, auth, core feature, payments
Hours: 200-400 hours
At $150/hr: $30,000-60,000
At $200/hr: $40,000-80,000
Timeline: 6-10 weeks
Infrastructure (year 1): $300-2,000
Third-party services (year 1): $500-3,000
Total year 1: $31,000-85,000
Full Product (mobile + web + backend)
Typical scope: 15-25 screens per platform, admin dashboard, API
Hours: 800-1,500 hours
At $150/hr: $120,000-225,000
At $200/hr: $160,000-300,000
Timeline: 4-8 months
Infrastructure (year 1): $1,200-12,000
Third-party services (year 1): $2,000-10,000
Total year 1: $125,000-322,000
Maintenance (ongoing after launch)
Bug fixes + minor updates: 10-20 hours/month
OS/dependency updates: 5-10 hours/quarter
Feature additions: scope per feature
Infrastructure monitoring: 2-5 hours/month
Monthly maintenance cost:
At $150/hr: $2,250-4,500/month
At $200/hr: $3,000-6,000/month
Or retainer: flat monthly fee (typically 15-20% of build cost annually)
Step 6: Build vs Buy Analysis
DECISION FRAMEWORK
Build custom when:
✅ Core differentiator (this IS your product)
✅ No off-the-shelf solution fits >80% of requirements
✅ Data ownership/privacy is critical
✅ Long-term cost of SaaS licenses exceeds build cost
✅ You need deep integration with existing systems
Buy/use SaaS when:
✅ Not a core differentiator (auth, email, analytics, payments)
✅ Off-the-shelf fits >80% of requirements
✅ Speed to market matters more than customization
✅ Team doesn't have expertise to build + maintain
✅ Build cost > 3 years of SaaS subscription
Common build vs buy decisions:
Auth: BUY (Firebase Auth, Auth0) — never build your own
Payments: BUY (Stripe) — never build your own
Email: BUY (SendGrid, Resend) — commodity
Analytics: BUY (Firebase, Mixpanel) — commodity
Search: BUILD if simple, BUY if complex (Algolia, Typesense)
CMS: BUY if content-only, BUILD if integrated with app logic
AI features: BUILD (custom integration with LLM APIs)
Core logic: ALWAYS BUILD — this is your product
Live Pricing Data
Use WebSearch to fetch current pricing for infrastructure components:
"Firebase pricing calculator 2025"
"Vercel pricing tiers 2025"
"OpenAI API pricing per token 2025"
"Stripe payment processing fees 2025"
Flag any assumptions that differ from current published pricing.