A full-stack mobile platform enabling users to launch, configure, and manage dedicated Minecraft Bedrock servers from their phone. The backend provisions EC2 spot instances on demand, manages a hot standby pool for fast launches, and handles world persistence, addon deployment, and a credit-based monetization system.
<60s
Server Launch (Hot Path)
2
Platforms (iOS + Android)
EC2 Spot Instance Provisioning
Two-tier server launch architecture delivering sub-60-second startup times through a hot standby pool, with cold-launch fallback for capacity overflow.
Hot Path (~30-60s): Claim pre-warmed standby instance → Write user config via SSM → Download world from S3 → Start Minecraft service → NLB routing applied
Cold Path (~3-5min): Launch fresh EC2 spot (t3.small) → UserData bootstrap → SSM connection (50 retries, exponential backoff) → Full provisioning
- EC2 spot instances (t3.small) with 12GB root + 8GB secondary EBS (gp3) in us-west-2
- Custom AMI pre-installed with Bedrock Dedicated Server, systemd configs, SSM agent, and CloudWatch agent
- NLB UDP forwarding rules applied per-user for network routing to dedicated port (range 30000-65535)
- Spot price capture at launch time for per-session cost tracking
- Graceful shutdown with world archival to S3 before instance termination
- Spot interruption handling: fallback to direct termination if SSM unreachable, world data preserved
Hot Standby Pool
Pre-warmed EC2 instances in a ready state eliminate the cold-start penalty. Instances cycle through a state machine: booting → ready → claimed → resetting → ready.
- Management command launches standby instances with minimal UserData (no user-specific config)
- Readiness detection via SSM polling for
/tmp/standby-ready flag file
- Atomic claim operation prevents race conditions on concurrent launches
- Post-session reset: archive user world to S3, wipe user data, clear EC2 tags, return to pool
- Separate cost tracking for standby instances (DailyInfrastructureCost model)
React Native Mobile App
Cross-platform Expo app with five main tabs providing full server management, configuration, credit management, and addon marketplace access.
- Home: Server status with real-time uptime, connection details (hostname/port), launch/shutdown controls, session summary modal, play streak tracking
- Configuration: Full server.properties management — game mode, difficulty, max players, PvP, RCON, spawn settings, level type/seed, hardcore mode
- Free Credits: Rewarded video ads (5/day), social share verification (3 credits), app review reward (5 credits), daily play bonus with streak multiplier
- Account: Email verification flow, push notification management, OTA update check, coupon redemption, subscription status
- Addon Management: Browse, activate/deactivate, upload custom addons, premium addons for subscribers
Addon Marketplace
User-contributed addon system supporting behavior packs, resource packs, worlds, skins, shaders, and maps — with a slot-based activation system and live deployment to running servers.
- S3-backed file storage with upload via multipart FormData
- Upvote system with duplicate vote prevention per user
- Free users limited to 3 active addon slots; subscribers unlimited
- Live addon deployment: SSM executes management command on running instance, restarts Minecraft service, zero user action required
- Featured and premium addon tiers managed by staff
World Snapshot & Backup System
S3-based world persistence with manual snapshots, automatic archival on session end, and one-click restore to any saved version.
- World archived as tar.gz to S3 per-user directory on every session shutdown
- Named snapshots with size tracking for quota management
- Restore replaces active world file; next server launch downloads restored version
- Standby instances auto-archive claimed user's world during reset cycle
Monetization & Credit System
Dual-currency credit system (free + paid) integrated with RevenueCat for cross-platform subscription management across iOS and Android.
- Free credits: Earned via ads, social shares, reviews, daily play bonuses; expire monthly, consumed first
- Paid credits: Purchased via RevenueCat IAP; never expire
- Play streak system with 2x bonus at 7+ consecutive days
- RevenueCat handles App Store + Play Store billing with unified entitlement checking
- Soft paywall: minimum 1 credit to launch, ad offer + purchase prompt when insufficient
Screenshot Verification Pipeline
Automated reward verification using AWS Lambda + Bedrock image analysis to validate social share and app review screenshots before awarding credits.
- SHA-256 duplicate detection prevents re-submission of the same image
- Lambda function analyzes screenshots for Minecraft HUD elements with confidence scoring
- Webhook callback updates verification status and triggers credit award + push notification
- Rate-limited: 1 share/day, 1 review/lifetime per user
OTA Update System
Staged rollout system using deterministic hash bucketing, enabling controlled deployment from 10% to 100% of users without infrastructure changes.
- Version comparison using semantic versioning (packaging.version)
- Rollout control:
MD5(user_id) % 100 compared against rollout_percentage for deterministic bucketing
- Force-update flag for critical patches requiring immediate install
- Per-user update status tracking (check → download → install → error/skipped) for analytics
Staff Dashboard & Analytics
Comprehensive admin interface covering user management, session monitoring, financial tracking, addon moderation, OTA deployment, and infrastructure cost analysis.
- Real-time metrics: active sessions, new users (today/week), growth charts, server version popularity
- Infrastructure cost tracking: EC2 spot + standby, S3, RDS, NLB, CloudWatch — per session and daily aggregation
- Ad revenue analytics: impressions, clicks, ECPM by platform and format
- Addon analytics: downloads, type distribution, top performers
- OTA update management: create, staged rollout, publish, rollback
- Screenshot moderation: approve/reject with email link actions
- Push notification broadcasting to all registered devices
Technical Challenges Solved
Cold-Start Latency
EC2 instances take 3-5 minutes to provision. Solved with a hot standby pool that keeps pre-warmed instances ready for instant claim, reducing user-facing launch time to under 60 seconds.
Port Management at Scale
Each user needs a unique UDP port for NLB routing. Pre-assigned on profile creation from range 30000-65535 with collision detection, enabling thousands of concurrent users.
Spot Instance Interruptions
AWS can reclaim spot instances without warning. Graceful shutdown attempts SSM-based world archive first, with fallback to direct termination — user data is never lost.
Screenshot Fraud Prevention
Credit rewards for screenshots incentivize fraud. SHA-256 hashing prevents duplicate submissions, and Lambda + Bedrock CV analysis validates game content with confidence scoring.