An open-source Android client for querying AI relay station account balances.
一个开源的 Android 客户端,用于查询 AI 中转站账户余额。
- 🔍 Multi-provider support — built-in seeds for popular relay stations + unlimited custom endpoints
- 🔐 Local-first & private — login payloads encrypted with Android Keystore AES/GCM, never leave your device
- 🎨 Material 3 + Dynamic Color — adapts to your system theme on Android 12+
- 🌙 Theme modes — light, dark, and system-follow
- 🌍 I18n — English, 简体中文, Français, Deutsch, Русский, 日本語
- 📦 Room local database — persistent provider list and cached balance state
- 🧩 MVVM architecture — Kotlin Coroutines + Flow for clean separation
| Layer | Technology |
|---|---|
| Language | Kotlin 2.1 |
| UI | Jetpack Compose + Material 3 |
| Architecture | MVVM (Coroutines + Flow) |
| Database | Room (SQLite) |
| Preferences | DataStore |
| Encryption | Android Keystore AES/GCM |
| Build | Gradle KTS + Version Catalog |
| SDK | compileSdk 35, minSdk 26 |
# Clone the repository
git clone https://github.com/wmdhs12138/Balance.git
# Open in Android Studio, or build via command line:
./gradlew assembleDebugThe debug APK will be at app/build/outputs/apk/debug/.
app/
├── src/
│ ├── main/
│ │ ├── java/io/github/wmdhs12138/balance/
│ │ │ ├── core/
│ │ │ │ ├── balance/ # Balance fetcher implementations
│ │ │ │ ├── crypto/ # AES/GCM encryption
│ │ │ │ ├── database/ # Room database & DAOs
│ │ │ │ ├── model/ # Domain models
│ │ │ │ ├── net/ # URL utilities
│ │ │ │ ├── preferences/ # DataStore preferences
│ │ │ │ └── repository/ # App container & repositories
│ │ │ ├── feature/
│ │ │ │ ├── login/ # Web login
│ │ │ │ └── main/ # Main screen (Compose)
│ │ │ └── ui/
│ │ │ ├── locale/ # Locale context
│ │ │ └── theme/ # Color, Typography, Theme
│ │ └── res/ # Resources & i18n strings
│ └── test/ # Unit tests
├── schemas/ # Room migration schemas
└── build.gradle.kts
Balance is local-first. All data — provider configurations, cookies, and login payloads — is stored exclusively on your device. Login payloads are further encrypted at rest using Android Keystore-backed AES/GCM. No telemetry, no analytics, no network requests beyond the relay stations you configure.
Backup is explicitly disabled for the app's local database via android:allowBackup="false" on the Room database.
Contributions are welcome! Please feel free to submit a PR.
- For translation contributions, see docs/translations.md.
MIT © 2026 wmdhs12138

