A location-based notification system that automatically sends voice calls and text messages to contacts when you arrive at specific destinations. Perfect for letting friends, family, or business contacts know when you've safely reached your destination.
- Automated Voice Calls: Send pre-recorded or custom voice messages via Twilio
- Location-Based Alerts: Trigger notifications based on GPS coordinates and radius
- Contact Management: Organize contacts into groups for easy notification management
- Multi-Interface Support: Web app and desktop GUI (PyQt6) interfaces
- Business & Leisure Modes: Different notification templates for different contexts
- Mobile-responsive design with iOS PWA support
- Business alert system for professional notifications
- Leisure alerts for personal contacts
- Contact and group management
- Custom message templates with humorous pre-built options
- PyQt6-based GUI for desktop users
- Full contact and location management
- Real-time location monitoring
- Backend: Python 3.12, Flask
- Frontend: HTML5, Bootstrap 5, JavaScript
- GUI Framework: PyQt6
- Voice/SMS Service: Twilio API
- Location Services: GeoPy, geographiclib
- Deployment: Gunicorn WSGI server, ngrok for development
- Data Storage: JSON files for contacts and groups
- Python 3.12+
- Twilio account with phone number
- Git
-
Clone the repository:
git clone <repository-url> cd OnArrival
-
Create and activate virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables: Create a
.envfile in the root directory:TWILIO_ACCOUNT_SID=your_twilio_account_sid TWILIO_AUTH_TOKEN=your_twilio_auth_token TWILIO_PHONE_NUMBER=your_twilio_phone_number PYTHONANYWHERE_DOMAIN=your_domain.pythonanywhere.com # Optional
-
Start the web server:
python wsgi.py
-
Access the interface:
- Open your browser to
http://localhost:5000 - For mobile testing, use ngrok tunnel (configured automatically)
- Open your browser to
-
Using the Web Interface:
- Business Mode: Send professional notifications with business name
- Leisure Mode: Send personal alerts to contact groups
- Contacts: Manage your contact list and groups
-
Launch the GUI:
python src/main.py
-
Features:
- Visual contact management
- Location monitoring setup
- Message template customization
The system comes with default locations that can be customized:
- California: Covers major California destinations
- Washington DC: Metro area coverage
The system uses configurable message templates stored in config/message_templates.json:
- Basic Arrival: Professional arrival notification
- Formal Arrival: Formal business notification
- Casual Arrival: Friendly personal notification
- Custom Messages: Create your own templates via the web interface
Templates can be customized by editing the JSON configuration file.
Organize contacts into groups for bulk notifications:
- Create custom groups via web interface
- Assign contacts to multiple groups
- Send group-specific messages
OnArrival/
βββ src/
β βββ gui/ # PyQt6 desktop interface
β βββ models/ # Data models (Contact, Location, Group)
β βββ services/ # Core services (Notification, Location, Storage)
β βββ static/ # Web assets (CSS, JS, images)
β βββ templates/ # HTML templates
β βββ main.py # Desktop app entry point
β βββ web_app.py # Flask web application
βββ contacts.json # Contact storage
βββ groups.json # Group storage
βββ requirements.txt # Python dependencies
βββ wsgi.py # WSGI entry point
βββ README.md
GET /- Main web interfacePOST /api/send_leisure- Send leisure alertsPOST /api/send_business- Send business alertsGET/POST /api/groups- Manage contact groups
# Install development dependencies
pip install -r requirements.txt
# Run with hot reload
python src/web_app.py- Models go in
src/models/ - Business logic in
src/services/ - Web routes in
src/web_app.py - GUI components in
src/gui/
- Configure production environment variables
- Use Gunicorn for WSGI serving:
gunicorn --bind 0.0.0.0:8000 wsgi:application
The project is configured for PythonAnywhere deployment:
- Update
PYTHONANYWHERE_DOMAINin.env - Upload files to PythonAnywhere
- Configure WSGI file path
- Twilio Authentication: Verify credentials in
.envfile - Import Errors: Ensure virtual environment is activated
- PyQt6 Issues: Install system Qt6 libraries if needed
- Phone Number Format: Use E.164 format (+1XXXXXXXXXX)
- Check console output for Twilio API responses
- Web server logs show request/response details
- Desktop app prints GUI events to terminal
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is for personal/educational use. Twilio usage subject to their terms of service.
- Built with Twilio for voice/SMS services
- Uses Flask for web framework
- PyQt6 for desktop GUI
- Bootstrap for responsive web design