How harzva/mobilecore works
MobileCore is an on-device model runtime product: users import or install a model, load it, then call local inference and inspect metrics or recommendations. Android adds a verified model catalog, local photo search, and vision/G2D evaluation; iOS provides a native runtime and local API skeleton. The separate TuiMa web game exercises MobileCore from a browser and records scores. Relationships below follow the README and shown source/index references; several Android feature internals were not sampled, so their internal links are intentionally limited.
Main entry points: App.tsx Game App · LocalApiServer.kt Local API · ModelManager.kt Model Manager · MobileCoreService.kt Foreground Service
Components 29
Android Runtime
- Foreground Service
android-app/app/src/main/kotlin/ai/mobilecore/service/MobileCoreService.kt - Local API
android-app/app/src/main/kotlin/ai/mobilecore/network/LocalApiServer.kt - Model Manager
android-app/app/src/main/kotlin/ai/mobilecore/runtime/ModelManager.kt - GGUF Metadata
android-app/app/src/main/kotlin/ai/mobilecore/runtime/GgufMetadataReader.kt - Runtime Bridge
android-app/app/src/main/kotlin/ai/mobilecore/runtime/RuntimeBridge.kt - llama.cpp Backend
android-app/app/src/main/cpp/mobilecore_llama_bridge.cpp
Android Features
- Model Playground
android-app/app/src/main/kotlin/ai/mobilecore/playground/PlaygroundArtifactInstaller.kt - Benchmarks
android-app/app/src/main/kotlin/ai/mobilecore/runtime/BenchmarkScorer.kt - Local Gallery Search
android-app/app/src/main/kotlin/ai/mobilecore/gallery/search/GallerySearchCoordinator.kt - CLIP Runtime
android-app/app/src/main/kotlin/ai/mobilecore/gallery/search/OnnxClipGalleryRuntime.kt - G2D Evaluation
android-app/app/src/main/kotlin/ai/mobilecore/g2d/OxfordPetsG2dRunner.kt - G2D Router
android-app/app/src/main/kotlin/ai/mobilecore/g2d/G2dEngine.kt
iOS App
- SwiftUI App
ios-app/MobileCoreApp/ContentView.swift - Model Manager
ios-app/MobileCoreApp/Models/ModelManager.swift - Local API
ios-app/MobileCoreApp/API/LocalAPIServer.swift - API Router
ios-app/MobileCoreApp/API/OpenAICompatibleRouter.swift - Llama Runtime
ios-app/MobileCoreApp/Runtime/LlamaRuntime.swift - Runtime Metrics
ios-app/MobileCoreApp/Runtime/RuntimeMetrics.swift
TuiMa Game
- Game App
game-web/src/App.tsx - Challenge
game-web/src/pages/Challenge.tsx - Game Board
game-web/src/game/board.ts - Scoring
game-web/src/game/scoring.ts - Device Telemetry
game-web/src/deviceTelemetry.ts - MobileCore Client
game-web/src/mobilecoreClient.ts - Local Submissions
game-web/src/storage.ts - Shared Leaderboard
game-web/src/supabaseLeaderboard.ts
Other components
- Android User
- iOS User
- Web Player
Connections 31
- Android User → Foreground Service: starts service
README.md - Foreground Service → Local API: starts server
android-app/app/src/main/kotlin/ai/mobilecore/service/MobileCoreService.kt - Foreground Service → Model Manager: creates manager
android-app/app/src/main/kotlin/ai/mobilecore/service/MobileCoreService.kt - Local API → Model Manager: manages models
README.md - Model Manager → GGUF Metadata: reads metadata
android-app/app/src/main/kotlin/ai/mobilecore/runtime/ModelManager.kt - Local API → Runtime Bridge: serves inference
README.md - Runtime Bridge → llama.cpp Backend: calls JNI
README.md - Android User → Model Playground: installs model
README.md - Model Playground → Model Manager: places artifacts for
README.md - Android User → Benchmarks: runs benchmarks
README.md - Android User → Local Gallery Search: searches photos
README.md - Local Gallery Search → CLIP Runtime: runs CLIP inference
README.md - Android User → G2D Evaluation: runs evaluation
README.md - G2D Evaluation → G2D Router: routes candidates
- iOS User → SwiftUI App: uses app
README.md - SwiftUI App → Model Manager: imports models
ios-app/MobileCoreApp/MobileCoreApp.swift - SwiftUI App → Local API: starts local API
ios-app/MobileCoreApp/MobileCoreApp.swift - Local API → API Router: routes requests
ios-app/MobileCoreApp/API/LocalAPIServer.swift - API Router → Llama Runtime: runs chat
ios-app/MobileCoreApp/API/OpenAICompatibleRouter.swift - API Router → Model Manager: lists models
ios-app/MobileCoreApp/API/OpenAICompatibleRouter.swift - Llama Runtime → Runtime Metrics: updates metrics
ios-app/MobileCoreApp/Runtime/LlamaRuntime.swift - Web Player → Game App: plays game
README.md - Game App → Game Board: creates game state
game-web/src/App.tsx - Game App → Scoring: calculates score
game-web/src/App.tsx - Game App → Device Telemetry: collects telemetry
game-web/src/App.tsx - Game App → Local Submissions: saves results
game-web/src/App.tsx - Game App → Shared Leaderboard: uploads results
game-web/src/App.tsx - Game App → Challenge: renders challenge
game-web/src/App.tsx - Challenge → Game Board: updates state
game-web/src/pages/Challenge.tsx - Challenge → MobileCore Client: requests inference
game-web/src/pages/Challenge.tsx - MobileCore Client → Local API: calls localhost API
README.md