AI Study Assistant powered by Xiaomi MiMo V2.5 Pro
Chat, flashcards, quizzes, and study plans — all powered by MiMo's long-chain reasoning and streaming SSE.
┌──────────────────────────────────────────────────────────────┐
│ MiMo StudyPal │
│ Powered by Xiaomi MiMo V2.5 Pro │
├──────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ 💬 Chat │ │ 📇 Flashcards│ │ 📝 Quiz │ │
│ │ (SSE) │ │ (JSON) │ │ (JSON) │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Next.js API Routes (Edge) │ │
│ │ /api/chat /api/flashcards /api/quiz │ │
│ └────────────────────────┬────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ MiMo V2.5 Pro API Client │ │
│ │ Streaming SSE · reasoning_content · api-key auth │ │
│ │ Endpoint: token-plan-sgp.xiaomimimo.com/v1 │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Token Tracker (client-side) │ │
│ │ Per-session stats · Cache hit rate · Avg/call │ │
│ └─────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
| Feature | Description | Streaming |
|---|---|---|
| 💬 Chat | Ask questions, get explanations with reasoning | SSE streaming |
| 📇 Flashcards | Auto-generated study cards with spaced repetition | JSON response |
| 📝 Quiz | Adaptive quizzes with explanations | JSON response |
| 📋 Summarize | Paste content, get study-optimized summaries | SSE streaming |
| 📊 Dashboard | Real-time token consumption tracking | Client-side |
- Reasoning content — Chat responses include
reasoning_contentshowing the model's step-by-step thinking process, which helps students understand how to solve problems - SSE streaming quality — Real-time token-by-token output for natural conversation flow without buffering
- Structured output — MiMo reliably produces valid JSON for flashcard and quiz generation without schema enforcement
- Chinese/Malay support — StudyPal works in 亚洲 languages without quality degradation
- Cost efficiency — Token Plan pricing makes it viable for student use (~$0.20/M cache hit)
Per-feature estimated consumption:
- Chat message: ~800 tokens (400 prompt + 400 completion)
- Flashcard set (8 cards): ~600 tokens
- Quiz (5 questions): ~500 tokens
- Summarize (1000 words): ~1200 tokens
Daily estimate for active student: 20K-50K tokens/day
# Clone and install
git clone https://github.com/YOUR_USERNAME/mimo-studypal.git
cd mimo-studypal
npm install
# Set environment
echo "MIMO_API_KEY=your-token-plan-key" > .env.local
# Run dev server
npm run dev
# Open http://localhost:3000
# Run tests
npm test
# Build for production
npm run build# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod
# Set environment variable
vercel env add MIMO_API_KEYSSE streaming chat with MiMo.
{ "messages": [{"role": "user", "content": "..."}], "topic": "optional" }Generate flashcards for a topic.
{ "topic": "Machine Learning", "count": 8, "difficulty": "mixed" }Generate a quiz.
{ "topic": "Calculus", "count": 5, "difficulty": "mixed" }SSE streaming content summarization.
{ "content": "paste text here...", "topic": "optional" }- Frontend: Next.js 14, React 18, TypeScript 5.4, Tailwind CSS 3.4
- State: Zustand (client-side)
- Animations: Framer Motion
- AI: Xiaomi MiMo V2.5 Pro via Token Plan API
- Auth:
api-keyheader (NOTAuthorization: Bearer) - Streaming: Server-Sent Events (SSE) with
reasoning_content - Deploy: Vercel Edge Functions
mimo-studypal/
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ ├── chat/route.ts # SSE streaming chat
│ │ │ ├── flashcards/route.ts # Flashcard generation
│ │ │ ├── quiz/route.ts # Quiz generation
│ │ │ └── summarize/route.ts # SSE streaming summary
│ │ ├── dashboard/page.tsx # Token stats
│ │ ├── flashcards/page.tsx # Flashcard viewer
│ │ ├── quiz/page.tsx # Quiz interface
│ │ ├── page.tsx # Main chat page
│ │ ├── layout.tsx # Root layout
│ │ └── globals.css # Tailwind + custom styles
│ ├── components/ # Reusable components
│ ├── hooks/
│ │ └── useTokenTracker.ts # Token consumption hook
│ └── lib/
│ ├── mimo.ts # MiMo API client (SSE)
│ ├── prompts.ts # System prompts per feature
│ └── store.ts # Zustand state management
├── tests/ # Jest + React Testing Library
├── docs/ # Documentation
├── package.json
├── next.config.js
├── tailwind.config.js
├── tsconfig.json
└── README.md
MIT License — see LICENSE for details.
Built with Xiaomi MiMo V2.5 Pro via Token Plan API
token-plan-sgp.xiaomimimo.com/v1