How UFOBeep Works
A deep dive into the technology, architecture, and algorithms that power real-time UFO sighting alerts
The Concept
UFOBeep is a real-time alert network that notifies nearby users when someone reports a UFO sighting. Think of it as a βNOWβ button for the sky - when something unexplained appears, witnesses can immediately alert others in a 50-mile radius to look up and verify.
The key innovation is immediate proximity alerts. Traditional UFO reporting happens hours or days after the fact. UFOBeep enables real-time community verification while the object is still visible.
How Alerts Work
πStep 1: Witness Reports a Sighting
User opens the app, captures photo/video (optional), and hits βBeep Nowβ. The app records:
- GPS coordinates (latitude/longitude)
- Precise timestamp (UTC)
- Compass bearing and altitude
- Device sensors (if available)
π€Step 2: Automatic Enrichment
Our backend immediately enriches the report with real-time environmental data:
Cloud cover, visibility, wind, temperature from OpenWeather API
All planes in the sky from OpenSky Network
Visible satellites from CelesTrak TLE data
Sun, moon, planets, bright stars positions
Gemini AI provides intelligent analysis and summaries of sighting reports for better understanding
πStep 3: Push Notifications
Firebase Cloud Messaging sends push notifications to all users within a 50-mile radius:
βUFO Sighting Alert! πΈ
12.3 miles SW from you
Tap to view and verifyβ
Users can tap the notification to see the full details, photos, and join the live discussion.
π₯Step 4: Community Verification
Multiple witnesses can confirm or provide additional details in real-time. The app shows:
- How many nearby users saw it
- Different photos/videos from multiple angles
- Live comment thread for discussion
- Distance and bearing from each witness
Technology Stack
π± Mobile App
- Flutter: Cross-platform (iOS & Android)
- Dart: Modern, fast, type-safe
- Riverpod: State management
- GoRouter: Navigation
- Dio: HTTP client
- Firebase Messaging: Push notifications
- Geolocator: GPS & location services
- Camera/ImagePicker: Media capture
βοΈ Backend API
- FastAPI: Python web framework
- PostgreSQL: Primary database
- PostGIS: Geospatial queries
- Firebase Admin: Push notification server
- MinIO: S3-compatible media storage
- Redis: Caching layer
- JWT: Authentication
- Nginx: Reverse proxy
π Website
- Next.js 14: React framework
- TypeScript: Type safety
- Tailwind CSS: Styling
- next-intl: 22 languages
- React Leaflet: Interactive maps
π Data Sources
- OpenWeather: Real-time weather
- OpenSky Network: Aircraft tracking
- CelesTrak: Satellite TLE data
- Skyfield: Celestial calculations
- Community: User-submitted sighting reports
π¨βπ» Development
- Built by: Mike (creator) with AI assistance
- Claude Code: Primary development AI
- ChatGPT: Mathematical analysis & consulting
- Gemini AI: In-app report summaries for brevity & readability
- Open Source: Full codebase on GitHub
System Architecture
βββββββββββββββββββ
β Mobile App β
β (Flutter) β
ββββββββββ¬βββββββββ
β HTTPS/JWT
βββββββββββββββββββββββ
β β
ββββββββββΌβββββββββ βββββββββΌβββββββββ
β FastAPI β β Firebase β
β Backend β β Cloud β
β (Python) β β Messaging β
ββββββββββ¬βββββββββ ββββββββββββββββββ
β
ββββββ΄βββββ
β β
βββββΌβββ ββββΌββββ
β Post β β MinIOβ
β greSQL β β (S3) β
β+PostGISβ ββββββββ
ββββββββββ
External APIs:
ββ OpenWeather (weather data)
ββ OpenSky Network (aircraft)
ββ CelesTrak (satellites)
ββ Astronomical calculations (Skyfield)Key Design Decisions
- PostGIS for geospatial queries: Efficiently finds all users within 50-mile radius using spatial indexes
- Firebase for push notifications: Reliable delivery across iOS & Android with minimal setup
- MinIO for media storage: S3-compatible, self-hosted, cost-effective for photos/videos
- Real-time enrichment: All environmental data captured at exact moment of sighting, not retroactively
Network Density & Coverage
How many users does UFOBeep need for the network to be effective? We did the math.
Using Poisson distribution and real US population density data, we calculated the minimum number of users needed for reliable proximity alerts. The analysis accounts for urban clustering, notification reach rates, and the 50-mile alert radius.
Read the Full Mathematical Analysis βOpen Source
UFOBeep is open source and available on GitHub. The entire codebase - mobile app, backend API, website, and data processing scripts - is publicly available.
View on GitHub β