How aaliyahussain27/smartflame works
SmartFlame is an Android emergency fire-reporting app. Its principal workflow guides a bystander from triggering an alert through GPS location resolution, nearest-station dispatch, photo proof, OTP verification, and final confirmation. The README documents a shared EmergencyViewModel and EmergencyFlowState for that flow. The source excerpts contain no application code, so screen-to-screen links reflect the documented flow; implementation-level calls and data wiring cannot be verified.
Components 21
Emergency Reporting
- Home
app/src/main/java/com/example/firesafe/ui/screens/HomeScreen.kt - Location Detecting
app/src/main/java/com/example/firesafe/ui/screens/LocationDetectingScreen.kt - Alert Sent
app/src/main/java/com/example/firesafe/ui/screens/AlertSentScreen.kt - Photo Proof
app/src/main/java/com/example/firesafe/ui/screens/PhotoProofScreen.kt - Phone Verification
app/src/main/java/com/example/firesafe/ui/screens/PhoneVerificationScreen.kt - Final Confirmation
app/src/main/java/com/example/firesafe/ui/screens/FinalConfirmationScreen.kt - Help
app/src/main/java/com/example/firesafe/ui/screens/HelpScreen.kt - History
app/src/main/java/com/example/firesafe/ui/screens/HistoryScreen.kt
Location and Dispatch
- Stations
app/src/main/java/com/example/firesafe/ui/screens/StationsScreen.kt - GPS Location
app/src/main/java/com/example/firesafe/data/repository/impl/GPSLocationRepository.kt - Location Repository
app/src/main/java/com/example/firesafe/data/repository/LocationRepository.kt - Station Repository
app/src/main/java/com/example/firesafe/data/repository/FireStationRepository.kt - Alert Repository
app/src/main/java/com/example/firesafe/data/repository/AlertRepository.kt - OTP Repository
app/src/main/java/com/example/firesafe/data/repository/OtpRepository.kt
App Coordination
- Main Activity
app/src/main/java/com/example/firesafe/MainActivity.kt - Navigation
app/src/main/java/com/example/firesafe/Navigation.kt - Emergency ViewModel
app/src/main/java/com/example/firesafe/viewmodel/EmergencyViewModel.kt - Emergency Flow State
app/src/main/java/com/example/firesafe/viewmodel/EmergencyFlowState.kt
Other components
- Bystander
- CameraX
- OTP Service
Connections 16
- Bystander → Home: triggers
README.md - Home → Location Detecting: starts flow
README.md - Location Detecting → Alert Sent: resolves location
README.md - Alert Sent → Photo Proof: continues report
README.md - Photo Proof → Phone Verification: continues report
README.md - Phone Verification → Final Confirmation: verifies reporter
README.md - Location Detecting → GPS Location: detects location
README.md - Alert Sent → Station Repository: shows nearest station
README.md - Alert Sent → Alert Repository: dispatches alert
- Photo Proof → CameraX: captures proof
README.md - Phone Verification → OTP Repository: requests verification
README.md - OTP Repository → OTP Service: sends OTP
- Stations → Station Repository: looks up stations
- Main Activity → Navigation: starts navigation
- Navigation → Emergency ViewModel: shares state
README.md - Emergency ViewModel → Emergency Flow State: tracks flow
README.md