Skip to content

Create batch for Epic Tech Context workflow - #11

Merged
CoderMariusz merged 3 commits into
mainfrom
claude/batch-epic-tech-context-01SvRSv1pTARw1t8XrnCWbs4
Nov 23, 2025
Merged

CoderMariusz merged 3 commits into
mainfrom
claude/batch-epic-tech-context-01SvRSv1pTARw1t8XrnCWbs4

Conversation

@CoderMariusz

Copy link
Copy Markdown
Owner

No description provided.

claude and others added 3 commits November 23, 2025 12:10
Created comprehensive technical specifications for foundation epics:

## EPIC-02: Tier 1 Economy (26 SP, P1)
- 5 building types (Lumbermill, Mine, Farm, Smelter, Workshop)
- 7 resource definitions (Wood, Ore, Food, Bars, Tools + Tier 2)
- NPC Market system with fixed prices (Buy 1.2×, Sell 0.8×)
- Supply chain economics and balance validation
- Clean Architecture: Domain/Data/Presentation layers
- Firestore schema and Security Rules
- Performance targets: <50ms transactions, 60 FPS
- Test strategy: 120+ unit tests, 30 integration tests, 10 E2E tests
- Anti-cheat measures and server-side validation

## EPIC-05: Mobile-First UX (29 SP, P1)
- Touch controls: Tap, Long-press, Swipe, Pinch, Double-tap
- Haptic feedback patterns (Light/Medium/Heavy)
- Camera system with dual zoom modes (Planning 0.5×, Build 1.5×)
- Performance optimization: 60 FPS on Snapdragon 660
  - Sprite batching, spatial culling, object pooling
  - Progressive quality reduction at <45 FPS
- One-handed UI layout (thumb-reachable zones)
- WCAG AAA accessibility (7:1 contrast, colorblind modes)
- Animation system: Resource collection, upgrade effects
- Design system: Colors, typography, 8-point spacing grid
- Test strategy: 100+ unit tests, 25 integration tests, 8 E2E tests

## Sprint Tracking
- Created sprint-status.yaml with all 12 epics and 68 stories
- Marked epic-02 and epic-05 as "contexted"
- Ready for story drafting phase

Files:
- docs/sprint-artifacts/tech-spec-epic-02.md (comprehensive tech spec)
- docs/sprint-artifacts/tech-spec-epic-05.md (comprehensive tech spec)
- docs/sprint-artifacts/sprint-status.yaml (epic/story tracking)

Next Steps: Run create-story workflow to draft first stories under EPIC-02 and EPIC-05
Created comprehensive technical specification for EPIC-08 (23 SP, P1).

## EPIC-08: Ethical F2P Monetization (NPD)

**Epic Goal:** $10 IAP cap, rewarded video ads, transparent pricing
**Dependencies:** EPIC-01, EPIC-02 (gold system), EPIC-04 (ad placement), EPIC-09 (Firebase)

### In-App Purchase (IAP) System
- 5 IAP products:
  - Starter Pack: $1.99 (1000 gold)
  - Builder Pack: $2.99 (1750 gold)
  - Factory Pack: $4.99 (3500 gold) - "Best Value"
  - Master Pack: $9.99 (8000 gold)
  - Remove Ads: $0.99 (permanent ad removal)
- $10.00 lifetime spending cap (hard limit)
- Google Play Billing Library 5.0 integration (Android)
- Apple StoreKit 2 integration (iOS)
- Purchase restoration across devices
- Receipt validation via Cloud Functions (server-side, fraud prevention)

### Rewarded Video Ads
- Google AdMob integration (30-second rewarded videos)
- Ad placements:
  - Welcome Back modal (2× offline production boost)
  - Speed Boost (2× production speed for 10 minutes)
- Ad frequency cap: Max 6 ads/day (prevents ad fatigue)
- Ethical fallback: Ad failure → reward granted anyway
- Optional only: Never forced, always skippable

### Shop UI
- Dedicated Shop screen with 5 IAP product cards
- Progress bar: "$X.XX / $10.00 spent"
- Purchase confirmation dialog
- Disabled state when $10 cap reached
- Success/error feedback animations

### Analytics & Revenue Tracking
- Firebase Analytics integration
- Custom events: iap_purchase_initiated, iap_purchase_completed, ad_watched
- Revenue metrics: Conversion rate (target 2%+), ARPPU (target $10), ad adoption (target 60%+)
- Funnel analysis: Shop opened → Purchase completed
- Cohort analysis: Paying vs non-paying users

### Security & Compliance
- Server-side receipt validation (Cloud Functions)
  - Google Play Developer API for Android
  - App Store Connect API for iOS
- Fraud detection (duplicate receipt prevention)
- Transaction logging in Firestore (audit trail)
- Firestore Security Rules (prevent direct purchase manipulation)
- EU regulatory compliance (no loot boxes)
- COPPA compliance (child-safe monetization)
- Rate limiting: Max 10 purchase attempts per hour

### Revenue Model
- Year 1 Target: $20-30k (10k downloads, 35% D7 retention)
- IAP Revenue: $8k (2% conversion × $10 ARPPU)
- Ad Revenue: $18k (60% ad adoption × $20 eCPM × 6 ads/day)

### Technical Architecture
- Domain Layer: PurchaseManager (lifetime cap enforcement), AdManager
- Data Layer: IAPManager (platform abstraction), ReceiptValidator (Cloud Functions)
- Presentation Layer: ShopScreen, PurchaseConfirmationDialog, AdRewardModal
- External Integrations:
  - in_app_purchase package (Flutter official)
  - google_mobile_ads package
  - Firebase Analytics
  - Cloud Functions (validateReceipt)

### Test Strategy
- 80+ unit tests (PurchaseManager, AdManager, lifetime cap)
- 20 integration tests (purchase flow, ad flow, restoration)
- 8 E2E tests (complete purchase journey, ad journey, cap enforcement)
- Platform testing: Android sandbox, iOS sandbox
- Cross-device testing: Purchase on Device A → restore on Device B

### Ethical F2P Principles
- ✅ $10 lifetime cap clearly communicated
- ✅ All IAPs visible upfront (transparency)
- ✅ No loot boxes / gacha mechanics
- ✅ No limited-time FOMO events
- ✅ No energy/stamina system
- ✅ No pay-to-win multiplayer
- ✅ Ads optional, never forced
- ✅ Ad failure doesn't punish player

Files:
- docs/sprint-artifacts/tech-spec-epic-08.md (comprehensive tech spec)
- docs/sprint-artifacts/sprint-status.yaml (updated: epic-08 marked as contexted)

Sprint Status:
- Contexted Epics: 3 (epic-02, epic-05, epic-08)
- Backlog Epics: 9

Next Steps: Run create-story workflow to draft first stories under EPIC-08
@CoderMariusz
CoderMariusz merged commit 2646bac into main Nov 23, 2025
1 check failed
@CoderMariusz
CoderMariusz deleted the claude/batch-epic-tech-context-01SvRSv1pTARw1t8XrnCWbs4 branch December 4, 2025 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants