A comprehensive Mobile Legends companion platform that combines real-time hero analytics with curated lore content. Built to help players make data-driven decisions and explore the rich storytelling universe of Mobile Legends: Bang Bang.
Live: loreofdawn.com
- Live Meta Statistics - Real-time win rates, pick rates, and ban rates by rank
- Hero Matchups - Data-driven counter picks and synergies
- Performance Tracking - Historical trends and quadrant visualizations
- Advanced Filtering - Search by role, lane, difficulty, and performance metrics
- Complete Hero Stories - All hero backstories in an organized, readable format
- Smart Tagging - AI-powered metadata for moods, themes, and character relationships
- Featured Content - Hero of the day and curated story recommendations
- Search & Discovery - Find stories by mood, theme, or character connections
- Natural Language Queries - Ask questions about heroes, meta, and matchups
- Data-Backed Answers - Powered by live database statistics
- Credit System - Stripe-integrated monetization with account tiers
- TanStack Start (React 19, Vite) on Cloudflare Workers with TypeScript
- TailwindCSS v4 for styling
- shadcn/ui component library
- Clerk for authentication
- Cloudflare Workers - Edge API with global caching
- Hono - Lightweight, high-performance server framework
- ML stats sync - 3-hourly cron in the Worker pulls hero stats from the game API into Supabase, then reseeds KV
- Drizzle ORM with PostgreSQL (Supabase)
- Cloudflare Hyperdrive - Connection pooling and query acceleration
- Cloudflare KV - Edge caching layer
- Durable Objects - Rate limiting
- Automated Cron Jobs - Regular data synchronization
- API Integration - Mobile Legends Wiki and game data APIs
- Content Processing - AI-powered metadata extraction and tagging
- Stripe - Subscription management with webhooks
loreofdawn/
├── apps/
│ ├── web/ # TanStack Start frontend (Cloudflare Worker)
│ └── worker/ # Cloudflare Workers edge API + ML stats sync cron
├── packages/
│ ├── database/ # Drizzle schema and types
│ └── utils/ # Shared utilities
- Bun runtime
- PostgreSQL database (or Supabase account)
- Cloudflare account (for Workers deployment)
# Install dependencies
bun install
# Set up environment variables
cp apps/web/.env.example apps/web/.env
cp apps/worker/.dev.vars.example apps/worker/.dev.vars
# Push database schema (packages/database reads DATABASE_URL)
bun db:push# Run all apps in development mode
bun dev
# Or run individual apps
bun dev:web # Frontend (http://localhost:1201)
bun dev:worker # Worker API (http://localhost:8788)The Worker's cron (0 */3 * * *) runs the ML sync and then reseeds KV. Trigger a run by hand with:
curl -X POST https://cf-api.loreofdawn.com/internal/sync -H "Authorization: Bearer $SYNC_SECRET_TOKEN"# Generate migrations
bun db:generate
# Apply migrations
bun db:push
# Open Drizzle Studio
bun db:studioVITE_SERVER_URL- Worker API endpointVITE_CLERK_PUBLISHABLE_KEY- Clerk public keyCLERK_SECRET_KEY- Clerk secret key (inapps/web/.dev.varslocally, a Worker secret in production)
OPENAI_API_KEY- OpenAI API key for AI featuresCLERK_SECRET_KEY- Clerk authenticationSTRIPE_SECRET_KEY- Stripe paymentsCLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE- Local DB connectionML_BASE_URL,ML_FIRST_ID,ML_SECOND_ID_{HERO,MATCHUP,META,GRAPH}- ML stats API endpoints for the sync cronSYNC_SECRET_TOKEN- Bearer token forPOST /internal/sync
cd apps/web
bun run deploycd apps/worker
wrangler deploy