How shounakpatra/solus works
Solus is an offline-first Android AI studio. A user selects or downloads a local model, then chats, speaks, generates images, or searches indexed documents; responses can be presented as text or speech. Separate capabilities include a local OpenAI-compatible API, persistent memory/workspaces, and web search. The graph groups the app’s user-facing flows, inference engines, knowledge features, and model/storage services. Relationships are limited to those documented in the README or visible in supplied excerpts; several implementation details were not sampled.
Main entry points: ChatInferenceManager.kt Chat inference · RagManager.kt Document RAG · MainActivity.kt App entry · VoiceConversationController.kt Voice conversation
Components 25
App experience
- App entry
app/src/main/java/com/shounak/localmeshai/MainActivity.kt - Chat inference
app/src/main/java/com/shounak/localmeshai/ai/ChatInferenceManager.kt - Response formatting
app/src/main/java/com/shounak/localmeshai/ai/InferenceResponseController.kt - Vision inference
app/src/main/java/com/shounak/localmeshai/ai/VisionInferenceManager.kt - Voice conversation
app/src/main/java/com/shounak/localmeshai/ai/voice/VoiceConversationController.kt - Speech synthesis
app/src/main/java/com/shounak/localmeshai/ai/tts/TinyVocaManager.kt
Inference engines
- Image generation
app/src/main/java/com/shounak/localmeshai/ai/image/bonsai/BonsaiPipeline.kt - llama.cpp engine
app/src/main/java/com/shounak/localmeshai/ai/LlamaCppEngine.kt - Native backend
app/src/main/cpp/llama-jni.cpp
Knowledge and tools
- Document RAG
app/src/main/java/com/shounak/localmeshai/rag/RagManager.kt - Semantic embeddings
app/src/main/java/com/shounak/localmeshai/rag/embedding/SemanticEmbeddingEngine.kt - ONNX embeddings
app/src/main/java/com/shounak/localmeshai/rag/embedding/OnnxBertEmbeddingEngine.kt - Vector store
app/src/main/java/com/shounak/localmeshai/rag/store/RagVectorStore.kt - Persistent workspaces
app/src/main/java/com/shounak/localmeshai/rag/workspace/PersistentWorkspaceManager.kt - Web search
app/src/main/java/com/shounak/localmeshai/ai/tools/DuckDuckGoSearchEngine.kt - Persistent memory
app/src/main/java/com/shounak/localmeshai/memory/PersistentMemoryManager.kt
Models and storage
- Model manager
app/src/main/java/com/shounak/localmeshai/ui/screens/ModelManagerScreen.kt - Model downloads
app/src/main/java/com/shounak/localmeshai/services/ModelDownloadService.kt - Model artifacts
app/src/main/java/com/shounak/localmeshai/utils/ModelArtifactStorage.kt - Chat history
app/src/main/java/com/shounak/localmeshai/data/ChatSessionRepository.kt - App settings
app/src/main/java/com/shounak/localmeshai/utils/AppSettings.kt
Local services
- OpenAI-compatible API
app/src/main/java/com/shounak/localmeshai/services/LocalOpenAiServerService.kt
Other components
- Android user
- LAN or local client
- Model and search sources
Connections 28
- Android user → App entry: uses
README.md - App entry → Chat inference: starts chat
- Chat inference → llama.cpp engine: runs GGUF
README.md - llama.cpp engine → Native backend: calls JNI
- Chat inference → Response formatting: formats stream
app/src/main/java/com/shounak/localmeshai/ai/ChatInferenceManager.kt - App entry → Vision inference: submits vision
- Android user → Voice conversation: speaks
README.md - Voice conversation → Chat inference: requests answers
- Voice conversation → Speech synthesis: speaks response
README.md - Android user → Image generation: requests image
README.md - Android user → Document RAG: adds documents
README.md - Document RAG → Semantic embeddings: creates vectors
app/src/main/java/com/shounak/localmeshai/rag/RagManager.kt - Semantic embeddings → ONNX embeddings: uses engine
app/src/main/java/com/shounak/localmeshai/rag/RagManager.kt - Document RAG → Vector store: stores index
- Document RAG → Persistent workspaces: persists workspace
README.md - Document RAG → Chat inference: supplies context
- Chat inference → Web search: may search
README.md - Chat inference → Persistent memory: uses memory
README.md - Chat inference → Chat history: saves chats
- Android user → Model manager: manages models
README.md - Model manager → Model downloads: requests download
- Model downloads → Model and search sources: fetches weights
README.md - Model downloads → Model artifacts: publishes files
- Chat inference → Model artifacts: loads model
app/src/main/java/com/shounak/localmeshai/ai/ChatInferenceManager.kt - LAN or local client → OpenAI-compatible API: sends requests
README.md - OpenAI-compatible API → Chat inference: dispatches inference
- Android user → App settings: configures features
README.md - Web search → Model and search sources: queries web