S
SolidStackPH
▶ MP4
Implementation Plan

EFantasy
Esports Fantasy Platform

A Dota 2 fantasy sports platform for the Philippine market.
Built with Next.js, NestJS, PostgreSQL on Google Cloud Platform.

12
Weeks (MVP)
4
Phases
6
Core Modules
PHP
Market Focus

Client: EpicByte Creations · Phase 1: Dota 2, Philippines Only

01 — Overview

What We're Building

A complete esports fantasy platform where users draft Dota 2 player lineups, join contests, and compete for prizes based on real match performance.

🎮

Fantasy Contests

Users build lineups with budget constraints, join paid/free contests, and earn points from live Dota 2 match stats.

💰

Wallet & Payments

Maya-powered deposits, ledger-based wallet tracking, CSV batch payouts. All transactions in Philippine Peso.

🏆

Creator Tournaments

Premium users create custom tournaments with entry fees, max entrants, and payout templates. Platform takes rake.

📊

Live Data Pipeline

PandaScore API integration for real-time match data, player stats, tournament tracking, and auto-scoring engine.

👥

Affiliate System

Referral codes, attributed signups/deposits tracking, basic reporting with optional fixed CPA rules.

🛡

Admin & Security

RBAC admin panel, rate limiting, device/IP logging, duplicate account detection, webhook verification.

02 — Architecture

Technical Stack

Modern, scalable architecture on Google Cloud Platform.

Client
Next.js PWA
Mobile (Responsive)
Landing Page
API Gateway
NestJS API Server
Auth (JWT + Guards)
WebSocket (Leaderboard)
Services
Scoring Engine
Contest Manager
Wallet/Ledger
Data Ingestion
Settlement
Data Layer
Cloud SQL (Postgres)
Cloud Pub/Sub
Cloud Storage
Secret Manager
External
PandaScore API
Maya Payments
Email/Notifications
03 — Timeline

Implementation Phases

12-week MVP delivery broken into 4 focused sprints.

Weeks 1-3

Phase 1: Foundation & Data Pipeline

Project setup, database schema design, authentication system (email + Google), PandaScore API integration, historical data backfill (1 year of Dota 2 match data), landing page deployment.

Weeks 4-6

Phase 2: Core Fantasy Engine

Contest creation/joining flow, lineup builder with budget + captain mechanics, scoring engine development, fantasy points calculation, leaderboard system with live polling refresh.

Weeks 7-9

Phase 3: Payments & Wallet

Maya payment integration (webhook-confirmed deposits), ledger-based wallet system, settlement engine with pending verification, CSV batch payout export, affiliate tracking system.

Weeks 10-12

Phase 4: Admin, Security & Launch

Admin panel (RBAC), creator tournament templates, fraud prevention (rate limiting, IP logging, duplicate detection), security hardening, QA testing, production deployment on GCP.

MILESTONE DELIVERABLES

Week 3 Delivery

  • Live landing page on production URL
  • Auth system functional
  • Dota 2 data ingestion running
  • Database schema finalized

Week 6 Delivery

  • Playable contest demo (free entry)
  • Lineup builder working end-to-end
  • Scoring engine validated

Week 9 Delivery

  • Paid contests with Maya deposits
  • Wallet balance tracking
  • Settlement pipeline complete

Week 12 Delivery

  • Full production launch
  • Admin panel & creator tools
  • Security audit passed
04 — Features

Detailed Feature Breakdown

📱

User Web App (PWA)

  • Signup/Login with profile management
  • Contest lobby with filtering & search
  • Lineup builder (budget + captain, slate lock)
  • Join contest flow with entry fee deduction
  • Live leaderboard with auto-refresh
  • Wallet view (balances + transaction history)
  • Responsive for desktop & mobile

Dota 2 API Integration

  • PandaScore as primary data provider
  • Ingest tournaments, leagues, matches, teams
  • Player stats normalized for fantasy scoring
  • Full historical scan (past 12 months)
  • Scoring engine for fantasy point computation
  • Pending verification for delayed/corrected stats
💳

Payments & Wallet

  • Maya Business deposits (webhook-confirmed)
  • Idempotent crediting (no double deposits)
  • Ledger-based wallet with full audit trail
  • Multiple payment types (subscription, per-contest)
  • CSV export batch for manual payouts
  • Maya Disbursements API (under review)
🎯

Creator & Affiliate

  • Preset tournament templates for creators
  • Configurable: entry fee, max entrants, payout
  • Fixed % rake share for creators
  • Earnings credited only after settlement
  • Affiliate referral codes & tracking links
  • Attributed signups + first deposit tracking
  • Optional fixed CPA rules
05 — Data Model

Core Database Schema

PostgreSQL with a ledger-first financial architecture.

Users & Auth

users
user_profiles
user_sessions
user_devices
affiliate_codes

Contests & Lineups

contests
contest_entries
lineups
lineup_players
contest_templates

Finance & Ledger

wallets
ledger_entries
transactions
settlements
payout_batches

Esports Data

tournaments
matches
teams
players
player_match_stats

Scoring

scoring_rules
fantasy_points
leaderboards
leaderboard_entries
score_audits

Admin & Ops

admin_users
admin_roles
audit_logs
affiliate_reports
system_config

06 — Scoring

Fantasy Scoring Engine

Points calculated from real Dota 2 match performance data.

ActionPoints
Kill+3.0
Death-1.5
Assist+1.5
Last Hit (per 10)+0.5
GPM Bonus (500+)+2.0
Tower Kill+1.0
Roshan Kill+2.0
Win Bonus+5.0
Captain Multiplierx2.0

Scoring Pipeline

  • Ingest: PandaScore webhook/poll for match completion
  • Parse: Extract player-level stats per match
  • Calculate: Apply scoring rules, captain multiplier
  • Aggregate: Sum across all slate matches
  • Rank: Update leaderboard positions
  • Verify: Hold results pending for stat corrections
  • Settle: Finalize, distribute prizes to wallets

Safety Mechanisms

  • Pending verification window before settlement
  • Rescore capability if stats are corrected
  • Audit trail for all score calculations
  • Idempotent settlement (no double payouts)
07 — Infrastructure

GCP Infrastructure & Costs

Hosted on Google Cloud Platform with cost optimization strategies.

Monthly Operating Costs (MVP)

ServiceMonthly Cost
PandaScore API$480 USD
Cloud Run + Workers$200-300 USD
Cloud SQL (Postgres)$100-150 USD
Cloud Storage + CDN$30-50 USD
Logging/Monitoring$20 USD
Domain~$1.25/mo
Total $830-1,000/mo

Cost Optimization Strategy

🚀

GCP Startup Credits

Apply for Google Cloud startup program for promotional credits to offset initial infrastructure costs.

📉

Right-sizing (Month 2+)

Review memory/CPU utilization after launch. If usage is under 40%, downsize instances for up to 40% savings.

📅

Committed Use Discounts

1-year or 3-year committed use plans for additional 20-57% savings on compute and database.

08 — Pricing

Investment Options

Two paths to market. Both include all core deliverables.

Option A — MVP Launch

Get to market fast, iterate based on real users

800,000
10-12 weeksVAT exclusive
  • Core ledger + basic wallet operations
  • Semi-live ingestion (polling + basic logs)
  • Standard settlement with pending verification
  • Minimal admin + limited audit logs
  • Baseline security (webhook verify + rate limit)
  • Email verification + Google sign-up
  • Fixed rake rule for creators
  • Dota 2 implemented, ready for future games
09 — Terms

Payment Milestones

Payments tied to verified deliverables. You pay as you see progress.

10%
40%
30%
10%

10%

Upon signing & project kickoff

40%

Live landing page delivered on production URL

30%

Live demo unit with core features working

10%

Final turnover: production + codebase + runbook

What You Get at Final Turnover

  • Production deployment on GCP (fully configured)
  • Complete source code and repository access
  • All credentials and API keys
  • Basic operations runbook
  • Database documentation
10 — Roadmap

Beyond Phase 1: Growth

Phase 1 is Dota 2 + Philippines. Here's what comes next.

🎮

Multi-Game Expansion

Add up to 5 games via "Game Adapter" pattern. Each game = new scoring rules + data provider, reusing the existing contest + wallet + settlement infrastructure.

Phase 2
🌍

Global Rollout

USD + international payment rails. Multi-currency wallet schema (ready in Option B). Compliance and provider requirements scoped separately per region.

Phase 3
📲

Native Mobile Apps

React Native or Flutter apps for iOS and Android. Push notifications, biometric login, optimized mobile contest experience.

Phase 3+
🤖

AI-Powered Features

Player performance predictions, smart lineup suggestions, automated contest balancing, anomaly detection for fraud prevention.

Phase 4
📢

Social & Community

User leagues, chat, content creator tools, streaming integration (Twitch/YouTube), community challenges and seasonal events.

Phase 4
📊

Advanced Analytics

Real-time dashboards, player analytics, historical performance charts, custom reports for creators and admins.

Ongoing
Thank You

Let's Build
EFantasy Together

We're ready to bring this esports fantasy platform to life.
Phase 1 starts with Dota 2 for the Philippine market — and scales from there.

Option A
₱800,000
10-12 weeks
Option B
₱1,450,000
16-18 weeks

SolidStackPH

Building Digital Products That Scale