Documentation Index
Fetch the complete documentation index at: https://tech.illasoft.com/llms.txt
Use this file to discover all available pages before exploring further.
目录说明
代码在仓库根Kira/(注意:大写 K),文档路径继续沿用 /kira-mobile/。
技术栈
| 类别 | 版本 | 说明 |
|---|---|---|
| Kotlin | 2.3.0 | 语言 |
| Compose Multiplatform | 1.9.3 | UI 框架 |
| Android Gradle Plugin | 8.13.2 | |
| Ktor | 3.3.3 | HTTP 客户端(Android OkHttp / iOS Darwin) |
| Koin | 4.1.1 | DI |
| Supabase SDK (jan-tennert) | 3.2.6 | auth-kt、postgrest-kt、compose-auth(仅 Android) |
| Coil | 3.3.0 | 图片加载(+ coil-network-ktor) |
| SQLDelight | 2.2.1 | 本地数据库(已配置,未实际使用) |
| Credentials Manager | 1.5.0 | 原生 Google Sign-In |
| KMP NativeCoroutines | 1.0.0 | iOS Swift interop (StateFlow) |
| Android min SDK | 24 | target SDK 36,Kotlin JVM 11 |
模块结构
架构
MVVM + Clean Architecture:- Presentation —
AuthViewModel(Lifecycle 2.9.6)+AuthState/AuthEventsealed classes - Domain — 接口层(
AuthRepository) - Data — 实现 + API client(
AuthRepositoryImpl、UserApi) - Core — 网络(
ApiClient、SupabaseProvider)+ 配置
MainActivity.initKoin() 组合 appModules。
路由
- 自定义 if-else Composable(无 Voyager / Compose Navigation)
- 当前仅
MainScreen↔LoginScreen两屏切换
已实装的功能
- Google Sign-In(Android Credential Manager 原生 → fallback 到 Supabase Web OAuth)
- Apple Sign-In(iOS 通过 Supabase
ASWebAuthenticationSession) GET /user/profile查询展示 ProfileDto
网络层
ApiClient(shared/commonMain)含 ContentNegotiation + LoggingbaseUrl = "https://api.kira.art"(硬编码;可通过 BuildKonfig 的DEBUG_API_URL/RELEASE_API_URL在local.properties覆盖)- 请求 timeout 30s,连接 timeout 15s
- JWT 自动刷新:Supabase
currentAccessTokenOrNull()→ 401 时refreshCurrentSession()→ 重试 3 次 - 失败:
sessionExpired: SharedFlow<Unit>emit → UI 强制登出
鉴权实现
Android Credential Manager
Deep Link
- Debug:
poisson.art - Release:
kira.art schemes.json+MainActivity.onNewIntent()处理回调
Supabase
- URL:
https://base.kira.art - Anon Key:
sb_publishable_61zxmN9KGCaMgf7qjq4eBQ_tXITHX_f(publishable,可接受硬编码)
环境配置(BuildKonfig + local.properties)
构建 / 发布
- 包名:
com.kira.art - versionCode = 1,versionName = “1.0”
- 无 CI workflow(
.github/workflows/缺失) - 无 Fastlane、无 TestFlight / Play Internal Testing 自动化
- 本地手动构建
尚未实装的能力(路线图)
相较 kira-web,以下模块尚未在移动端实装:- ❌ AI Agent 对话(SSE)/
::::poisson-function消息格式 - ❌ Generator 工作区(图片 / 视频 / 音频)
- ❌ Pixi / Canvas 编辑
- ❌ Feed / Gallery / Timeline / Rewind
- ❌ 移动端 Notification (FCM / APNS)
- ❌ Centrifugo WebSocket
- ❌ i18n 多语言
- ❌ PostHog 埋点
- ❌ Sentry 错误追踪
- ❌ Apple IAP / Google Play Billing
- ❌ CSAM 错误 UI 提示
相关
- Backend API Overview
- Analytics(目前为空,待实装后补)