How dheirav/thirsttrap works
ThirstTrap is an offline Android plant diary whose central workflow records pot weights, estimates when a plant reaches its watering trigger, and helps the user log care in a plant timeline. The graph also preserves the documented weighing-round, reminders, offline species catalogue and optional name lookup, places/light readings, photos, and portable backup capabilities. Several feature implementations were not sampled; their presence is based on the README and tree, so uncertain internal links are omitted.
Main entry points: PlantDetailScreen.kt Plant timeline · PlantRepositoryImpl.kt Plant data access · MainActivity.kt App navigation · DashboardScreen.kt Plant dashboard
Components 23
App experience
- App navigation
app/src/main/kotlin/dev/dheirav/thirsttrap/MainActivity.kt - Plant dashboard
app/src/main/kotlin/dev/dheirav/thirsttrap/feature/dashboard/DashboardScreen.kt - Plant timeline
app/src/main/kotlin/dev/dheirav/thirsttrap/feature/plantdetail/PlantDetailScreen.kt - Weighing round
app/src/main/kotlin/dev/dheirav/thirsttrap/feature/weighing/WeighingScreen.kt - Weight guidance
app/src/main/kotlin/dev/dheirav/thirsttrap/feature/weight/WeightScreen.kt - Care logging
app/src/main/kotlin/dev/dheirav/thirsttrap/feature/logevent/LogEventScreen.kt
Plant care model
- Plant repository
core/domain/src/main/kotlin/dev/dheirav/thirsttrap/domain/PlantRepository.kt - Drying prediction
core/domain/src/main/kotlin/dev/dheirav/thirsttrap/domain/Prediction.kt - Weight state
core/domain/src/main/kotlin/dev/dheirav/thirsttrap/domain/WeightRepository.kt
Persistence and backup
- Plant data access
core/data/src/main/kotlin/dev/dheirav/thirsttrap/data/PlantRepositoryImpl.kt - Weight data access
core/data/src/main/kotlin/dev/dheirav/thirsttrap/data/WeightRepositoryImpl.kt - Plant and event tables
core/data/src/main/kotlin/dev/dheirav/thirsttrap/data/dao/PlantDao.kt - Weight readings table
core/data/src/main/kotlin/dev/dheirav/thirsttrap/data/dao/WeightDao.kt - Local Room database
core/data/src/main/kotlin/dev/dheirav/thirsttrap/data/ThirstTrapDatabase.kt
Supporting capabilities
- Adaptive reminders
app/src/main/kotlin/dev/dheirav/thirsttrap/reminder/ReminderWorker.kt - Offline species guide
core/domain/src/main/kotlin/dev/dheirav/thirsttrap/domain/SpeciesCatalogueBundled.kt - Species name lookup
core/data/src/main/kotlin/dev/dheirav/thirsttrap/data/GbifSpeciesLookupService.kt - Places and light
app/src/main/kotlin/dev/dheirav/thirsttrap/feature/locations/LocationsScreen.kt - Plant photos
core/data/src/main/kotlin/dev/dheirav/thirsttrap/data/PhotoStore.kt - Backup import/export
core/data/src/main/kotlin/dev/dheirav/thirsttrap/data/ExportRepositoryImpl.kt
Other components
- Plant owner
- System file picker
- GBIF name service
Connections 21
- Plant owner → App navigation: opens app
- App navigation → Plant dashboard: starts at
app/src/main/kotlin/dev/dheirav/thirsttrap/MainActivity.kt - Plant dashboard → Plant timeline: opens plant
app/src/main/kotlin/dev/dheirav/thirsttrap/MainActivity.kt - Plant owner → Weighing round: weighs pots
- Weighing round → Weight data access: records readings
- Weight guidance → Weight state: reads weight state
core/domain/src/main/kotlin/dev/dheirav/thirsttrap/domain/WeightRepository.kt - Weight data access → Weight readings table: reads and writes
core/data/src/main/kotlin/dev/dheirav/thirsttrap/data/WeightRepositoryImpl.kt - Weight readings table → Local Room database: stores readings
- Weight state → Drying prediction: provides prediction
core/domain/src/main/kotlin/dev/dheirav/thirsttrap/domain/WeightRepository.kt - Plant owner → Care logging: logs care
- Care logging → Plant data access: records events
- Plant timeline → Plant data access: shows timeline
- Plant data access → Plant and event tables: reads and writes
core/data/src/main/kotlin/dev/dheirav/thirsttrap/data/PlantRepositoryImpl.kt - Plant and event tables → Local Room database: stores plants
- Adaptive reminders → Plant repository: reads plant data
app/src/main/kotlin/dev/dheirav/thirsttrap/reminder/ReminderWorker.kt - Plant owner → Offline species guide: browses offline
- Species name lookup → GBIF name service: resolves names
- Plant owner → Places and light: records place light
- Plant timeline → Plant photos: displays photos
app/src/main/kotlin/dev/dheirav/thirsttrap/feature/plantdetail/PlantDetailScreen.kt - Plant owner → Backup import/export: backs up diary
- Backup import/export → System file picker: selects archive