AI-Powered Shark Alerts Powered by 5G Network Slicing
Real-Time Shark Detection and Alert System for Australian Beaches
Surfers. is an AI-powered shark detection system leveraging 5G network slicing and CAMARA APIs (Linux Foundation open source project) to provide proactive shark detection alerts to beachgoers. The system integrates AI-driven drone surveillance with 5G network capabilities to enable surfers and other beach visitors to receive timely alerts when sharks are detected in their vicinity.
✨ AI-Powered Detection - Advanced drone surveillance with real-time shark detection
📡 5G Network Slicing - Ultra-low latency video streaming via dedicated network slices
📍 Smart Geofencing - Automatic location tracking via CAMARA Geofencing API (Linux Foundation)
🚨 Real-Time Alerts - Instant push notifications based on proximity and geofence entry
🌐 Multi-Device Support - Smartwatch, phone, and fitness band compatibility
🗺️ Interactive Maps - Real-time visualization of beaches, geofences, and detections
📊 Comprehensive Dashboard - Live metrics, 5G slice monitoring, and detection analytics
┌─────────────────────────────────────────────────────────────────────┐
│ Admin Web Portal (React) │
│ ┌─────────────────────────────────┐ │
│ │ User Management │ │
│ │ Beach & Geofence Management │ │
│ │ Dashboard & Analytics │ │
│ └─────────────────────────────────┘ │
└──────────────────────────────┬──────────────────────────────────────┘
│
┌──────────────────────────────▼──────────────────────────────────────┐
│ Mobile App (React) │
│ ┌─────────────────────────────────┐ │
│ │ Device Registration │ │
│ │ Beach Subscription │ │
│ │ Alert Reception │ │
│ └─────────────────────────────────┘ │
└──────────────────────────────┬──────────────────────────────────────┘
│
┌──────────┴──────────┐
│ API Gateway │
│ (Port 8000) │
└──────────┬──────────┘
│
┌──────────────────────┼──────────────────────┐
│ │ │
┌───────▼────────┐ ┌──────────▼─────────┐ ┌─────────▼───────┐
│ User Service │ │ Device Service │ │ Geofence Service│
│ (8001) │ │ (8002) │ │ (8003) │
└────────────────┘ └────────────────────┘ └─────────────────┘
│ │ │
│ ┌─────────▼──────────┐ │
│ │ Notification Svc │ │
│ │ (8004) │ │
│ └─────────┬──────────┘ │
│ │ │
│ ┌─────────▼──────────┐ │
│ │ Shark Detection │ │
│ │ (8005) │ │
│ └─────────┬──────────┘ │
│ │ │
└──────────────────────┼──────────────────────┘
│
┌──────────▼──────────┐
│ MongoDB Database │
└─────────────────────┘
│
┌──────────────────────┼──────────────────────┐
│ │ │
┌───────▼────────┐ ┌──────────▼─────────┐ ┌─────────▼────────┐
│ CAMARA │ │ CAMARA Location │ │ Quality on Demand│
│ Geofencing │ │ Retrieval API │ │ (5G Slice) API │
│ API │ │ │ │ │
└────────────────┘ └────────────────────┘ └──────────────────┘
- Admin Setup: Creates beaches and geofences → Saved to MongoDB
- User Subscription: Mobile app registers → Backend subscribes to CAMARA API with callback URL
- Geofence Entry: User enters geofence → CAMARA sends callback → Backend tracks location
- Shark Detection: Drone detects shark → Requests 5G slice → Streams video → Finds users in geofences → Sends alerts
For detailed architecture diagrams and flow explanations, see Architecture Documentation.
The system is built using a microservices architecture with 7 backend services:
| Service | Port | Description |
|---|---|---|
| API Gateway | 8000 | Central entry point for all API requests, request routing, and authentication |
| User Service | 8001 | User authentication, registration, and beach management |
| Device Service | 8002 | Device registration, CAMARA API subscription management, and location tracking |
| Geofence Service | 8003 | Geofence CRUD operations, location checking, and geofence analytics |
| Notification Service | 8004 | Real-time push notifications, WebSocket connections, and alert broadcasting |
| Shark Detection Service | 8005 | Shark detection processing, 5G slice requests, and alert triggering |
| Drone Service | 8006 | Drone fleet management, status tracking, and maintenance scheduling |
- Routes requests to appropriate microservices
- Handles authentication and authorization
- Manages WebSocket connections
- Provides unified API endpoint
- User registration and authentication (JWT-based)
- Beach creation and management (latitude, longitude, name)
- User profile management
- Emergency contact management
- Device registration (smartwatch, phone, fitness band)
- CAMARA Geofencing API integration (Linux Foundation open source project)
- Device location tracking
- Subscriber management (phone number, IMEI, IMSI)
- Beach subscription management
- Geofence creation (center point + radius)
- Real-time location checking
- Geofence-to-beach associations
- Geofence entry/exit tracking
- Distance calculations
- Real-time push notifications via WebSocket
- Push notification delivery (FCM integration)
- Notification history and read status
- Device subscription management
- Alert broadcasting to subscribed users
- Receives shark detection reports from drones
- Integrates with CAMARA Location Retrieval API
- Requests dedicated 5G network slices via Quality on Demand API
- Coordinates video streaming from drones
- Identifies users in nearby geofences
- Triggers alert distribution
- Drone fleet management
- Drone status tracking (in_flight, charging, maintenance)
- Battery level monitoring
- Flight time tracking
- 5G slice information management
- Maintenance scheduling
CAMARA (Common API Management and Real-time Analytics) is an open source project within the Linux Foundation that defines, develops, and tests APIs for Telco network capabilities exposed through APIs. The following CAMARA APIs are made available for this hackathon by Telstra in conjunction with Nokia:
- Purpose: Subscribe devices to geofence areas for automatic location tracking
- Used By: Device Service
- Flow: When user subscribes to a beach, backend creates CAMARA subscription with phone number, geofence coordinates, and callback URL
- Purpose: Retrieve precise device/drone location information
- Used By: Shark Detection Service
- Flow: When drone detects shark, service retrieves precise location for proximity calculations
- Purpose: Request dedicated 5G network slices for high-bandwidth, low-latency video streaming
- Used By: Shark Detection Service
- Flow: On shark detection, service requests dedicated 5G slice with specified bandwidth, latency, and QoS parameters for real-time video streaming
- Docker and Docker Compose installed
- Node.js 16+ (for local development)
- MongoDB (or use Docker)
- Git
-
Clone and start services:
git clone <repository-url> cd shark-detection-system docker-compose up -d
-
Access the applications:
- 🌐 Web Portal: http://localhost:3000
- 📱 Mobile App: http://localhost:3001
- 🔌 API Gateway: http://localhost:8000
-
Test CAMARA geofencing integration:
./scripts/test-camara-geofencing.sh
-
Seed initial data (optional):
npm install npm run seed
-
Setup environment:
./scripts/setup-local-dev.sh
-
Start services individually:
# Terminal 1: MongoDB mongod # Terminal 2: Services cd services/api-gateway && npm start cd services/user-service && npm start cd services/device-service && npm start # ... (start other services) # Terminal 3: Frontend cd frontend/web-portal && npm start
-
Package for deployment:
./package-for-deployment.sh
-
Transfer to Ubuntu VM:
scp shark-detection-system-*.tar.gz user@your-vm-ip:/tmp/ -
Deploy on VM:
ssh user@your-vm-ip tar -xzf /tmp/shark-detection-system-*.tar.gz cd shark-detection-system-* # Configure environment cp config/production.env.example config/production.env nano config/production.env # Add your credentials # Deploy sudo docker compose -f docker-compose.prod.yml up -d --build # Seed data sudo npm install sudo npm run seed
-
Access:
- Web Portal: http://your-vm-ip:3000
- Admin Login:
admin/ (see config)
📖 For detailed deployment instructions: See DEPLOYMENT.md
🚀 For quick deployment: See QUICK_DEPLOY.md
- START_HERE.md - First steps for new users and developers
- USER_GUIDE.md - Complete user manual with feature walkthroughs
- DEMO_GUIDE.md - Demo scenarios and walkthroughs
- ARCHITECTURE.md - Comprehensive system architecture with diagrams
- High-level architecture diagrams
- Component interactions
- Data flow diagrams
- API integration details
- PROJECT_SUMMARY.md - Project overview and technology stack
- DEPLOYMENT.md - Complete cloud deployment guide
- Ubuntu VM setup
- Docker configuration
- Reverse proxy setup (Caddy)
- SSL certificates
- Troubleshooting
- QUICK_DEPLOY.md - Fast deployment script (10 minutes)
- config/README.md - Environment variable configuration guide
- caddy/README.md - Reverse proxy setup documentation
- Runtime: Node.js with Express.js
- Database: MongoDB (with Mongoose ODM)
- Message Queue: Kafka (for asynchronous processing)
- Caching (Optional/Future): Redis - Reserved for future features (caching, rate limiting, session storage)
- Real-time: WebSocket (Socket.io)
- Authentication: JWT (JSON Web Tokens)
- Framework: React 18
- Styling: Tailwind CSS
- Maps: React Leaflet + OpenStreetMap
- State Management: React Context API
- Routing: React Router
- 5G APIs: CAMARA APIs (Linux Foundation open source project, made available by Telstra in conjunction with Nokia)
- Geofencing Subscriptions API
- Location Retrieval API
- Quality on Demand API (5G Network Slicing)
- Notifications: FCM (Firebase Cloud Messaging)
- Containerization: Docker
- Orchestration: Docker Compose
- Reverse Proxy: Caddy
- Version Control: Git
Administrators create beaches with coordinates and then create geofences around them using radius and center point (latitude, longitude). All data is persisted in MongoDB.
When users subscribe to alerts for a beach:
- Mobile app sends registration with phone number and beach selection
- Backend retrieves all geofences for that beach
- For each geofence, backend calls CAMARA API to subscribe
- CAMARA API monitors device location and sends callbacks on geofence entry/exit
- When new beaches are added, existing subscribers receive notifications to subscribe
- When new geofences are added to already-subscribed beaches, mobile app automatically subscribes via CAMARA API
- CAMARA API automatically detects when users enter geofence areas
- Callbacks are sent to backend notification service
- Backend updates database to track which users are currently in geofences
- This information is used to determine who should receive shark alerts
When a drone detects a shark:
- Drone reports detection with location, shark type, size, and image
- Service uses CAMARA Location API to get precise drone location
- Service requests dedicated 5G network slice via Quality on Demand API
- Once slice is allocated, drone streams high-quality video via 5G
- System queries geofence service to find users in nearby geofences
- Push notifications are sent to identified users based on device type
All sensitive credentials are stored in environment files:
- Development:
config/development.env(gitignored) - Production:
config/production.env(gitignored) - Templates:
config/*.env.example(included in repo)
Required Configuration:
- MongoDB connection string
- JWT secret keys
- CAMARA API credentials (provided by Telstra)
- Push notification service keys
- Domain/IP settings
See config/README.md for detailed configuration guide.
Default Login:
- Username:
admin - Password: (see
config/production.env.example)
⚠️ Important: Change default credentials before production use!
POST /api/users/register- Register new userPOST /api/users/login- User loginPOST /api/users/logout- User logout
POST /api/devices/register- Register device/subscriberGET /api/devices- List all devicesGET /api/devices/:deviceId- Get device detailsPOST /api/devices/:deviceId/location- Update device locationPOST /api/devices/:deviceId/subscribe-beach- Subscribe to beach
POST /api/geofences- Create geofenceGET /api/geofences- List all geofencesPOST /api/geofences/check-location- Check if location is in geofencePUT /api/geofences/:id/deactivate- Deactivate geofence
POST /api/notifications/send- Send notificationGET /api/notifications/user/:userId- Get user notificationsPUT /api/notifications/:id/read- Mark notification as read
POST /api/sharks/report- Report shark detection (from drone)GET /api/sharks/detections- Get shark detection historyGET /api/sharks/stats- Get detection statistics
POST /api/beaches- Create beach (admin only)GET /api/beaches- List all beachesGET /api/beaches/:id- Get beach details
This project was developed for a hackathon demonstration showcasing 5G network slicing, CAMARA API integration, and real-time IoT alert systems.
For questions, improvements, or issues:
- Check the Documentation for detailed guides
- Review troubleshooting sections in DEPLOYMENT.md
- Open an issue for bugs or feature requests
This project was developed for a hackathon demonstration organized by Telstra in conjunction with Nokia, showcasing AI-powered shark detection leveraging 5G network slicing and CAMARA APIs (Linux Foundation open source project). See individual components for their respective licenses.
This project was developed for a hackathon organized by Telstra in conjunction with Nokia.
- CAMARA Project (Linux Foundation) - Open source project defining Telco network APIs
- Telstra - Hackathon organizer and provider of CAMARA APIs access
- Nokia - Co-organizer and collaborator in making CAMARA APIs available
- OpenStreetMap - Mapping services
- React & Node.js communities - Excellent frameworks
Real-Time Shark Alerts Powered by 5G Network Slicing