ADR-008: Phase 3 Architecture - Cost Estimation & Infrastructure Decision
Status: Accepted
Context
This ADR consolidates cost estimations and architectural decisions for three interdependent features: Payment Integration, Hardware Support, and Sharing Options. These features share infrastructure dependencies (cloud storage, payment processing) and must be architected together to optimize costs.
Important Business Model Clarifier: This is a one-time purchase business, not a subscription. Customers buy a lifetime license (Rp 8,000,000) and get full access. End-users do NOT pay per photo - they receive prints/downloads as part of the customer's service.
Summary of Related Features
| Feature | ADR | RFC |
|---|---|---|
| Payment Integration | ADR-003 | RFC-001 |
| Hardware Support | ADR-005 | RFC-003 |
| Sharing Options (Softcopy) | ADR-006 | RFC-004 |
Business Model Overview
Pricing Model Options
We evaluated three pricing models:
| Model | Description | Customer Pays | We Receive |
|---|---|---|---|
| Subscription | Monthly recurring | Rp 100,000/mo | Recurring |
| One-Time Purchase | Lifetime license | Rp 8,000,000 once | Upfront |
| Pay per Volume | Pay per print | Rp 500/print | Per transaction |
Model 1: Subscription (Monthly)
| Tier | Price | Target |
|---|---|---|
| Starter | Rp 100,000/mo | Small events |
| Pro | Rp 250,000/mo | Regular users |
| Enterprise | Rp 500,000/mo | Heavy usage |
Pros: Predictable recurring revenue, lower barrier to entry
Cons: Need continuous retention, slower revenue growth
Model 2: One-Time Purchase (Lifetime)
| Product | Price | Description |
|---|---|---|
| Lifetime License | Rp 8,000,000/unit | Full access, lifetime usage |
Pros: Large upfront revenue, simpler billing
Cons: No recurring revenue, need constant new sales
Model 3: Pay per Volume (Per Print)
| Usage | Price |
|---|---|
| Per Print | Rp 500/print |
Pros: Pay-as-you-go, lowest barrier to entry
Cons: Transaction-heavy, complex tracking, low margin per print
Cost Simulation Comparison
Scenario: 100 customers after 12 months
| Metric | Subscription | One-Time | Pay per Volume |
|---|---|---|---|
| Price/unit | Rp 100,000/mo | Rp 8,000,000 | Rp 500/print |
| Per Customer Revenue | Rp 100,000/mo | Rp 8,000,000 | Rp 50,000/mo |
| Customers | 100 active | 100 total | 100 active |
| Avg usage | - | - | 100 prints/month |
| Monthly Revenue | Rp 10,000,000 | Rp 80,000,000 | Rp 5,000,000 |
| Annual Revenue | Rp 120,000,000 | Rp 160,000,000 | Rp 60,000,000 |
| Revenue after 2 yrs | Rp 240M | Rp 160M | Rp 120M |
Break-Even Analysis
Assuming Rp 500,000/mo operational costs:
| Model | Break-Even Point |
|---|---|
| Subscription | ~5 customers |
| One-Time | ~10 customers |
| Pay per Volume | ~110 prints/month |
Recommendation Matrix
| Factor | Best Choice |
|---|---|
| Fastest revenue (Month 1) | One-Time (Rp 80M) |
| Long-term revenue | Subscription or Pay per Volume |
| Simplest operations | One-Time |
| Lowest barrier to entry | Pay per Volume |
| Best profit margin | Subscription |
Final Decision
Selected: One-Time Purchase (Rp 8,000,000)
Rationale:
- Fastest upfront revenue to reinvest in growth
- Simplest billing (no recurring complexity)
- Matches typical hardware sales model
- 10 units/month target = Rp 80M/month revenue
1. Payment Processing Costs (One-Time Purchase)
| Item | Cost |
|---|---|
| Xendit Account | Free |
| Payment Processing | 2.5% per transaction |
| Bank Transfer Fee | ~Rp 15,000-30,000 per disbursement |
Key Insight: Each unit sale generates one Xendit transaction. With 10 units/month, this is low volume. One-time purchase means no recurring revenue, but higher upfront revenue per customer.
2. Cloud Storage Costs (Sharing Options)
| Provider | Storage (10GB) | Egress (50GB/month) | Total |
|---|---|---|---|
| Supabase | Rp 0 | Rp 70,000 | Rp 70,000/mo |
| Cloudflare R2 | Rp 0 | Rp 0 | Rp 0/mo |
| AWS S3 | Rp 5,500/GB | Rp 140,000/GB | Rp 150,000/mo |
Recommendation: Cloudflare R2 (no egress fees) - aligns with ADR-001 decision
3. Hardware Support Costs
| Item | Cost |
|---|---|
| Printer SDKs/APIs | Free (open source libs) |
| Bluetooth communication | Free |
| Testing devices | One-time Rp 3,000,000-7,500,000 |
4. Operational Cost Analysis
Scenario: 10 new units sold/month
| Cost Item | Monthly | Annual |
|---|---|---|
| Tech (Infra + Monitor) | < Rp 2,000,000 | < Rp 24,000,000 |
| Payment Processing (2.5%) | Rp 2,000,000 | Rp 24,000,000 |
| Hardware COGS | Rp 30,000,000 | Rp 360,000,000 |
| Customer Support | Rp 5,000,000 | Rp 60,000,000 |
| Marketing | Rp 3,000,000 | Rp 36,000,000 |
| Development/Maintenance | Rp 8,000,000 | Rp 96,000,000 |
| Misc | Rp 5,000,000 | Rp 60,000,000 |
| Total | ~Rp 55,000,000/mo | ~Rp 660,000,000/yr |
Revenue: 10 units × Rp 8,000,000 = Rp 80,000,000/mo
Net Profit: ~Rp 25,000,000/mo (~31% margin)
Note: Assumed profit margin of 20-30%. Tech costs (infrastructure + monitoring + observability) kept under Rp 2,000,000/mo.
Combined Infrastructure Cost Model
Architecture Decision
Decision: Unified Infrastructure
We will implement a unified architecture where:
- Payment and sharing are tenant-facing features - Softcopy availability depends on tenant subscription/license state, not booth-user payment
- Cloudflare R2 for all storage - Zero egress fees, integrates with Workers for QR generation
- Xendit centralized account - Simplifies compliance, single dashboard
- Tenant dashboard on same domain -
/dashboardsubpath (not subdomain)
Combined Data Model
Related Flows
Photo Session Flow (Post-Purchase)
One-Time Purchase Flow
Storage Cost Comparison Chart
Final Recommendation
| Component | Choice | Rationale |
|---|---|---|
| Payment Gateway | Xendit (centralized) | QRIS support, one-time payments |
| Cloud Storage | Cloudflare R2 | Zero egress, R2 Workers for QR |
| Database | Cloudflare D1 (SQLite) | Single vendor, free tier, 5GB |
| Hosting | Cloudflare Pages/Workers | Free tier, unlimited bandwidth |
| Tenant Dashboard | Same domain (/dashboard) | Simpler auth, SEO friendly |
| Pricing Model | One-time purchase | Rp 8,000,000 lifetime license |
| Softcopy Model | Included in license | Part of lifetime purchase |
Key Business Model Shifts
- One-time purchase - Customers pay Rp 8,000,000 once, get lifetime access
- No recurring revenue - Revenue is front-loaded per unit sold
- 10 units/month target - Aggressive sales target for growth
- Softcopy included - Not a separate revenue stream
- 2.5% payment processing - Xendit fee per transaction
Consequences
Positive
- Zero storage egress costs with R2
- Large upfront revenue per customer (Rp 8M)
- Sustainable profit margin (20-30%)
- Simple one-time payment flow
- End-user experience is friction-free (no payment during events)
- No recurring billing complexity
Negative & Risks
- No recurring revenue - need continuous new sales
- 10 units/month is an ambitious target
- Hardware COGS is significant (~37.5% of revenue)
- Need ongoing customer support capacity
- Storage costs grow with total user base (mitigate with R2)
Related Files
- ADR-003: ADR-003-payment-integration.md
- ADR-005: ADR-005-hardware-support.md
- ADR-006: ADR-006-sharing-options.md
- ADR-010: ADR-010-database-d1.md
- RFC-001: RFC-001-payment-integration.md
- RFC-003: RFC-003-hardware-support.md
- RFC-004: RFC-004-sharing-options.md
- RFC-007: RFC-007-d1-database.md