How cashewdevs/faunawatch works
FaunaWatch is a Flutter wildlife-reporting and community app with AI-assisted species identification, location-aware reporting, social discovery, and push notifications. The broad user journey spans account access, creating or identifying a wildlife report, and viewing community activity; the tree also shows messaging, profiles, and monitoring features. The map, OAuth, and push setup are documented, but most Dart implementation was not sampled, so those internal connections are shown only where the README supports them or are omitted. The sampled push function has explicit webhook, database, and FCM interactions.
Main entry points: index.ts Notification webhook · app.dart FaunaWatch app · create_post_service.dart Create report · mapbox_map_service.dart Community map
Components 21
Flutter application
- FaunaWatch app
lib/app.dart
Community and reports
- For You feed
lib/features/feed/services/feed_service.dart - Public galleries
lib/features/gallery/services/gallery_service.dart - Direct messages
lib/features/messages/services/messages_service.dart - Create report
lib/features/create_post/services/create_post_service.dart - Community map
lib/features/community_map/services/mapbox_map_service.dart - Report details
lib/features/report_detail/services/report_detail_service.dart
Wildlife tools
- Fauna Lens
lib/features/fauna_lens/services/species_identification_service.dart - AI vision clients
lib/core/services/ai/ai_vision_client.dart - Fauna Guard
lib/features/fauna_guard/services/guard_location_service.dart
Identity and profiles
- Sign-in and registration
lib/features/auth/services/auth_service.dart - Profile setup
lib/features/profile_customization/services/profile_service.dart - Public profiles
lib/features/public_profile/services/public_profile_service.dart
Push delivery
- In-app notifications
lib/features/notifications/services/notifications_service.dart - Device push services
lib/features/push/services/push_messaging_service.dart - Notification webhook
supabase/functions/send-push/index.ts - Push message rules
supabase/functions/send-push/logic.ts
Other components
- App user
- Supabase
- Firebase Cloud Messaging
- Mapbox
Connections 20
- App user → FaunaWatch app: uses
- FaunaWatch app → Sign-in and registration: offers access
- Sign-in and registration → Supabase: OAuth
README.md - App user → Create report: submits sighting
- Create report → Community map: selects location
- Community map → Mapbox: renders map
README.md - App user → Fauna Lens: identifies species
- Fauna Lens → AI vision clients: requests analysis
- App user → For You feed: browses reports
- App user → Public galleries: views gallery
README.md - App user → Public profiles: opens profile
README.md - App user → Direct messages: sends messages
- App user → Fauna Guard: uses monitoring
- In-app notifications → App user: shows updates
- Device push services → Supabase: registers device token
README.md - Supabase → Notification webhook: posts notification event
README.md - Notification webhook → Push message rules: checks and builds
supabase/functions/send-push/index.ts - Notification webhook → Supabase: checks suspension; reads tokens
supabase/functions/send-push/index.ts - Notification webhook → Firebase Cloud Messaging: sends push
supabase/functions/send-push/index.ts - Notification webhook → Supabase: deletes invalid tokens
supabase/functions/send-push/index.ts