MLBB Draft Intelligence is a Next.js application that helps you simulate Mobile Legends draft phases and get real-time hero recommendations.
- Rank-based draft flow (
Epic,Legend,Mythic) with different ban/pick slot rules. - First pick / second pick support (
FP/SP). - Recommendation engine that combines:
- base meta score,
- counter matchup impact,
- ally synergy impact,
- role fulfillment constraints.
- Draft board UI for ally and enemy bans/picks.
- Next.js 16 (App Router)
- React 19 + TypeScript
- Tailwind CSS 4
- Framer Motion
Prerequisites:
- Node.js 20+ (recommended)
- npm 10+ (or any compatible package manager)
- Install dependencies:
npm install- Run the development server:
npm run dev- Open:
http://localhost:3000
- Clone the repository.
- Move into the project folder.
- Install dependencies with
npm install. - Start development mode with
npm run dev. - Open
http://localhost:3000in your browser.
npm run dev- Start local development server.npm run build- Build for production.npm run start- Run the production server.npm run lint- Run ESLint.
app/
layout.tsx
page.tsx
src/
components/
DraftDashboard.tsx
SpotlightCard.tsx
lib/
api.ts
DraftEngine.ts
utils.ts
The recommendation score is based on:
totalScore = baseScore + counterModifier + synergyModifier
Additional logic:
- Strong vs enemy hero:
+20 - Weak vs enemy hero:
-25 - Assist/synergy with ally hero:
+15 - Single-role hero with already taken role: strong penalty to avoid duplicate critical role picks.
The system evaluates each draft state in real time:
- Read current ally picks, enemy picks, and bans.
- Remove already-picked and banned heroes from candidates.
- Compute each candidate hero score using base score + matchup + synergy modifiers.
- Apply role constraints to avoid invalid or low-value compositions.
- Sort by total score and return top recommendations.
- If API data is unavailable, the app shows a warning state in the dashboard.
- You can customize scoring values in
src/lib/DraftEngine.ts.
Deploy this project using any Next.js-compatible platform (for example Vercel).
- Next.js deployment docs: https://nextjs.org/docs/app/building-your-application/deploying
This project includes a Vercel cron schedule in vercel.json:
0 8 * * *(UTC), which is15:00WIB.
The cron calls GET /api/cron/refresh-heroes and refreshes cached hero data.
Required environment variable:
CRON_SECRET: token used asAuthorization: Bearer <CRON_SECRET>.
Set this variable in your Vercel project settings so the refresh endpoint stays protected.