How hoosammr/helloaiworld works
AI Hello World is a small Android Compose demonstration of a hand-weighted neuron choosing contrasting text for a user-selected RGB background. The user adjusts color sliders; the screen forwards values to the ViewModel, which asks the repository for a prediction and exposes updated state for rendering. The repository delegates to the neuron, which normalizes channels and returns sigmoid confidence. The README documents Hilt wiring; sampled code confirms the providers, but no external service or persistent store is present.
Main entry points: ColorViewModel.kt Color ViewModel · ColorRepositoryImpl.kt Repository implementation · ColorScreen.kt Color screen · MainActivity.kt MainActivity
Components 9
Android app
- MainActivity
app/src/main/java/com/meray/aihelloworld/MainActivity.kt - Compose theme
app/src/main/java/com/meray/aihelloworld/ui/theme/Theme.kt - Hilt providers
app/src/main/java/com/meray/aihelloworld/di/AppModule.kt
Color experience
- Color screen
app/src/main/java/com/meray/aihelloworld/presentation/ColorScreen.kt - Color ViewModel
app/src/main/java/com/meray/aihelloworld/presentation/ColorViewModel.kt
Prediction core
- Repository contract
app/src/main/java/com/meray/aihelloworld/domain/repository/ColorRepository.kt - Repository implementation
app/src/main/java/com/meray/aihelloworld/data/repository/ColorRepositoryImpl.kt - Color neuron
app/src/main/java/com/meray/aihelloworld/domain/ColorNeuron.kt
Other components
- User
Connections 11
- User → Color screen: adjusts sliders
- MainActivity → Compose theme: applies theme
- MainActivity → Color screen: shows screen
- Color screen → Color ViewModel: sends RGB
- Color ViewModel → Repository contract: requests prediction
- Repository implementation → Repository contract: implements
- Repository implementation → Color neuron: calls predict
- Color ViewModel → Repository implementation: invokes contract
- Color ViewModel → Color screen: publishes UI state
- Hilt providers → Repository implementation: provides repository
- Hilt providers → Color neuron: provides neuron