MiMo Usage is a Next.js application that provides a beautiful, centralized dashboard to monitor your Xiaomi API usage. You can securely log in to multiple Xiaomi accounts, track your token consumption in real-time, generate API keys, and receive quota alerts—all in a sleek interface.
flowchart LR
subgraph Client [Browser]
UI[Next.js Frontend]
end
subgraph Server [Next.js API]
Proxy[API Routes]
Auth[JWT Session]
Xiaomi[Xiaomi API Service]
end
subgraph Database [Upstash]
Redis[(Redis Storage)]
end
subgraph External [Xiaomi Cloud]
MiApi((Mi Platform))
end
UI -->|HTTP Request| Proxy
Proxy -->|Verify JWT| Auth
Auth -->|If Valid| Xiaomi
Xiaomi <-->|Fetch Quotas| MiApi
Xiaomi <-->|Store/Refresh Cookies| Redis
- Multi-Account Support: Add and manage multiple Xiaomi accounts simultaneously.
- Real-time Analytics: Beautiful charts powered by Recharts to track your token usage.
- Secure Authentication: Edge-compatible JWT-based session protection.
- API Key Management: Generate and reset API keys per account natively.
- Dark Mode: Built-in sleek dark theme support.
- Framework: Next.js 16 (App Router, Turbopack)
- Styling: Tailwind CSS v4 & shadcn/ui
- Icons: Phosphor Icons
- Auth: Jose (JWT)
- Database: Upstash Redis (Serverless Session Storage)
-
Install dependencies:
bun install
-
Environment Variables: Create a
.env.localfile based on the.env.local.examplestructure:# Protect your dashboard (optional) DASHBOARD_PASSWORD="YourSuperStrongPassword" # Secret for JWT signing AUTH_SECRET="your-32-byte-hex-string" # Upstash Redis (Required for session storage) UPSTASH_REDIS_REST_URL="https://your-upstash-url.upstash.io" UPSTASH_REDIS_REST_TOKEN="your-upstash-token"
-
Run the development server:
bun run dev
Open http://localhost:3000 with your browser to see the result.
We welcome contributions to MiMo Usage! If you want to add a new feature or fix a bug, please follow these steps:
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/your-username/Mimo-Usage.git - Create a new branch for your feature:
git checkout -b feature/your-feature-name - Make your changes and commit them:
git commit -m "feat: add new feature" - Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request against the
mainbranch of the original repository.
Easily deploy your own instance of MiMo Usage to Vercel with a single click:
