How taewan-p/gpt_mobile works
Main Components Overview
a) Presentation Layer (UI)
• Compose UI components (in presentation/ui/)
• ViewModels for each screen
• Theme and styling components
b) Domain Layer
• Use cases (implicit from the repository patterns)
• Model definitions and constants
c) Data Layer
• Local Storage (Room Database)
• DataStore for settings
• Network clients for multiple AI platforms
• Repositories
Key Architectural Elements
[Presentation Layer]
• UI Screens (Home, Chat, Settings, Setup)
• ViewModels
• Common Components
• Theme/Navigation
[Domain Layer]
• Models/DTOs
• Repository Interfaces
[Data Layer]
• Local Storage
• Room Database (ChatDatabase)
• DataStore (Settings)
• Network
• API Clients
• Anthropic API
• OpenAI API
• Google Gemini
• Groq
• Ollama
Important Relationships to Highlight
• Use dependency injection flows (shown by the DI modules in the di/ directory)
• Data flow between layers (following clean architecture)
• API communication patterns for different AI platforms
Implementation Details
• Kotlin/Compose based UI components
• Room Database for chat storage
• DataStore for settings
• Repository pattern implementation
• ViewModel/State management
External Dependencies
• AI Platform APIs
• Android Framework components
• Jetpack libraries (Compose, Room, DataStore)