How fcwe1113/transport_alarm works
Transport Alarm is a Flutter app for notifying users as a bus approaches. The visible iOS workflow processes an incoming ping, checks shared alarm state and transit estimates, updates the alarm, and returns notification content; users can also acknowledge a ping to advance or stop it. Native iOS code provides AlarmKit scheduling and a countdown Live Activity, while an Android plugin supports live countdowns. The README and supplied tree do not expose the Flutter feature code, so initial alarm creation and the complete cross-platform workflow cannot be mapped. The backend is represented without inferred internals.
Main entry points: NativePingHandler.swift Ping processing · AppGroup.swift Shared alarm storage · NotificationService.swift Notification service · AlarmKitBridge.swift AlarmKit bridge
Components 16
iOS Alarm Runtime
- iOS app entry
ios/Runner/AppDelegate.swift - AlarmKit bridge
ios/Shared/AlarmKitBridge.swift - AlarmKit scheduler
ios/Shared/AlarmKitScheduler.swift - Notification service
ios/NotificationServiceExtension/NotificationService.swift - Ping processing
ios/NotificationServiceExtension/NativePingHandler.swift - Ping acknowledgement
ios/Runner/PingAcknowledgementHandler.swift
iOS Shared Support
- Shared alarm storage
ios/Shared/AppGroup.swift - Native localization
ios/Shared/NativeLocalization.swift - Transit locale rules
ios/NotificationServiceExtension/NativeTransitLocale.swift - Alarm metadata
ios/Shared/TransportAlarmMetadata.swift
Server and Transit
- Transit ETA provider
ios/NotificationServiceExtension/NativeTransitETAProvider.swift - Alarm worker
backend/src/index.ts
Countdown UI
- iOS Live Activity
ios/AlarmWidgetExtension/AlarmLiveActivity.swift - Android countdown plugin
packages/live_update_countdown/android/src/main/java/dev/fcwe1113/liveupdatecountdown/LiveUpdateCountdownPlugin.java - Android localization
packages/live_update_countdown/android/src/main/java/dev/fcwe1113/liveupdatecountdown/NativeLocalization.java
Other components
- App user
Connections 16
- App user → iOS app entry: uses app
- iOS app entry → AlarmKit bridge: routes calls
ios/Runner/AppDelegate.swift - AlarmKit bridge → AlarmKit scheduler: schedules alarms
ios/Shared/AlarmKitBridge.swift - AlarmKit bridge → Shared alarm storage: reads alarm state
ios/Shared/AlarmKitBridge.swift - AlarmKit scheduler → Alarm metadata: uses metadata
ios/Shared/AlarmKitScheduler.swift - Notification service → Ping processing: processes ping
ios/NotificationServiceExtension/NotificationService.swift - Notification service → Shared alarm storage: gets container
ios/NotificationServiceExtension/NotificationService.swift - Notification service → Native localization: formats fallback
ios/NotificationServiceExtension/NotificationService.swift - Ping processing → Shared alarm storage: reads alarm data
ios/NotificationServiceExtension/NativePingHandler.swift - Ping processing → Native localization: formats messages
ios/NotificationServiceExtension/NativePingHandler.swift - Ping processing → Transit locale rules: uses locale rules
ios/NotificationServiceExtension/NativePingHandler.swift - Ping processing → Alarm worker: sends ping requests
ios/NotificationServiceExtension/NativePingHandler.swift - Ping acknowledgement → Shared alarm storage: updates alarm data
ios/Runner/PingAcknowledgementHandler.swift - Ping acknowledgement → Alarm worker: reschedules or acknowledges
ios/Runner/PingAcknowledgementHandler.swift - iOS Live Activity → Alarm metadata: renders alarm state
ios/AlarmWidgetExtension/AlarmLiveActivity.swift - Android countdown plugin → Android localization: uses localization
packages/live_update_countdown/android/src/main/java/dev/fcwe1113/liveupdatecountdown/LiveUpdateCountdownPlugin.java