Real-time Tesla vehicle monitoring and security alerts via Mobile Push & Telegram
SentryGuard is currently 100% free and open-source. This project is run on a non-profit basis and relies entirely on community donations to cover operational costs (hosting, infrastructure, API fees).
π― Our Commitment:
- β Currently free - no premium features, no paid tiers
- β Transparent costs - detailed expense reports available on request
- β Community-driven - funded by Tesla owners, for Tesla owners
- β Open-source - audit the code, contribute, or self-host
β οΈ Sustainability Notice:
If donations no longer cover operational expenses, the service may close, become paid at actual cost (~$0.50/user), or be limited to current users. Your support keeps it free and open for everyone!Every contribution helps keep SentryGuard running and improves security monitoring for the entire Tesla community! π
See SentryGuard in action! Watch our demo video to understand how the platform works.
Click the image above to watch the demo video on YouTube
SentryGuard is a comprehensive security monitoring solution for Tesla vehicles. It tracks your vehicle's Sentry Mode status and sends instant push notifications to your mobile phone (iOS & Android) and Telegram alerts when suspicious activity is detected.
- π± Native Mobile App (iOS & Android) - React Native / Expo application with live vehicle dashboard, alert history, dark/light themes, and bilingual support (FR/EN)
- π Instant Push Notifications - High-priority alerts with sound delivered straight to your phone when an event is detected
- π¬ Telegram Integration - Instant alerts and interactive control buttons via Telegram deep linking (no manual chatId setup)
- π Tesla OAuth Authentication - Official, secure authentication powered by Tesla with deep-link support
- π Multi-Vehicle Support - Monitor and configure all your Tesla vehicles from a single account
- π Real-time Telemetry - Detect Sentry Mode events and intrusion attempts even when Sentry Mode is turned off to save battery
- π¨ Break-in Offensive Response - Automatically honk the horn or trigger boombox sounds when a break-in is detected (configurable per vehicle via mobile, web, or Telegram)
- π Responsive WebApp - Next.js web portal with SSR and clean, modern interface
- π Secure by Design - End-to-end token encryption (AES-256-GCM), server-side session management, and Cloudflare WAF protection
This is an Nx monorepo containing:
apps/api- NestJS backend API with TypeORM + PostgreSQLapps/webapp- Next.js frontend with App Router (SSR & SEO-optimized)apps/mobile- Expo / React Native mobile app for iOS, Android and Expo Weblibs/- Shared domain libraries (@sentryguard/telegram-domain,@sentryguard/beta-domain)
Detailed mobile documentation: apps/mobile/README.md
Mobile (iOS & Android):
- React Native & Expo
- React Navigation (native stack + pager)
- TanStack Query (React Query)
- Native Push Notifications (
expo-notifications) - Secure Storage (
expo-secure-store/ Keychain) - i18next & react-i18next (FR/EN)
- EAS (Expo Application Services)
Backend:
- NestJS - Node.js framework
- TypeORM - ORM with PostgreSQL
- Telegraf - Telegram Bot API
- Tesla Fleet API & Tesla Command Proxy
- Kafka & Fleet Telemetry TLS Ingest
Frontend (Web):
- Next.js - React framework with SSR
- React - UI library
- Tailwind CSS - Styling
- TypeScript - Type safety
- Download the App: Get SentryGuard on iOS (App Store) or Android (Google Play).
- Login with Tesla: Sign in securely with your Tesla account via official OAuth.
- Automated Setup: Grant push notification permissions, detect your vehicles, and pair your Tesla virtual key in a few taps.
- Instant Alerts: Receive immediate, high-priority push notifications for door dings, scratches, or unauthorized handle pulls.
- Manage Vehicles & Offensive Response: Configure horn/boombox break-in responses and alerts directly from the vehicle details screen.
π‘ Self-hosting? You can connect the official store app to your own server: on the mobile login screen, tap the shield logo 5 times to enter your custom API URL. See the Self-Hosting Guide.
- Login with Tesla: Visit the web application and authenticate.
- Configure Vehicles: Sync your fleet and activate telemetry monitoring for each vehicle.
- Link Telegram (Optional): Head to the Telegram section, generate your linking token, and start the SentryGuard bot.
- Receive Dual-Channel Alerts: Get alerts in your Telegram chat and toggle offensive responses with inline buttons.
# Start Expo Metro bundler (:8081)
npx nx start mobile
# Run directly on iOS simulator or Android emulator
npx nx run-ios mobile
npx nx run-android mobile
# Run Expo Web (:3002)
npx nx serve mobile
# Check mobile types
npx nx typecheck mobilenpx nx serve apinpx nx serve webapp# API
npx nx build api
# WebApp
npx nx build webapp
# Mobile bundle export
npx nx export mobile# API tests
npx nx test api
# WebApp tests
npx nx test webapp
# All tests
npx nx run-many -t testnpx nx lint api
npx nx lint webapp
npx nx run-many -t lintSentryGuard/
βββ apps/
β βββ api/ # NestJS Backend
β β βββ src/
β β β βββ app/
β β β β βββ auth/ # Tesla OAuth & session management
β β β β βββ telemetry/ # Vehicle telemetry & commands
β β β β βββ alerts/ # Alert handlers & break-in offensive response
β β β β βββ offensive-response/ # Offensive response API endpoints & config
β β β β βββ notifications/ # Expo mobile push notifications
β β β β βββ telegram/ # Telegram bot
β β β βββ entities/ # TypeORM entities
β β β βββ config/ # Centralized configuration
β β β βββ migrations/ # Database migrations
β β β βββ common/ # Shared utilities
β β βββ env.example
β β
β βββ webapp/ # Next.js Frontend (SSR)
β β βββ src/
β β β βββ app/ # Next.js pages (App Router)
β β β βββ components/ # React components & store badges
β β β βββ features/ # Domain features (Clean Architecture)
β β β βββ core/ # API client, i18n, query provider
β β βββ tailwind.config.js
β β
β βββ mobile/ # React Native / Expo Mobile App (iOS & Android)
β βββ src/
β β βββ core/ # Navigation, theme, session, API client
β β βββ features/ # Domain features (Clean Architecture)
β β βββ screens/ # Dashboard, Alerts, Vehicle detail, Settings
β β βββ locales/ # FR/EN translations
β βββ app.json # Expo configuration & app permissions
β βββ eas.json # EAS Build & Store Submit profiles
β
βββ libs/ # Shared domain libraries
β βββ beta/domain/ # Tesla scopes & error codes
β βββ telegram/domain/ # Telegram-linking use-cases
β
βββ nx.json # Nx configuration
βββ package.json- Stores Tesla OAuth tokens (encrypted)
- User profile information
- Vehicle details (VIN, model, name)
- Telemetry configuration status
- Break-in offensive response per vehicle (Disabled / Honk / Fart)
- Link tokens for deep linking
- Chat IDs for sending alerts
- Mute status and duration
- Native Expo push tokens per device (iOS / Android)
- Notification preferences (Telegram vs Mobile Push toggles, critical-only filter)
- Token Encryption: All Tesla access tokens are encrypted using AES-256-GCM with integrity verification before storage
- Secure Communication: HTTPS only in production
- Differentiated Rate Limiting: Endpoints protected with adaptive rate limits (30-200 req/min depending on sensitivity)
- Centralized configuration in
apps/api/src/config/throttle.config.ts - No magic numbers - all limits defined as named constants
- Centralized configuration in
- OAuth 2.0: Secure authentication flow with Tesla
- No Plaintext Secrets: All sensitive data encrypted
For detailed security information, see SECURITY.md
SentryGuard is designed to work seamlessly with Cloudflare's infrastructure:
- SSL/TLS: Cloudflare provides automatic HTTPS with flexible SSL options
- DDoS Protection: Built-in protection against DDoS attacks
- Rate Limiting: Additional edge-level rate limiting complements API-level controls
- Caching: Static assets cached at Cloudflare's edge network
- Analytics: Real-time analytics and insights
- Add your domain to Cloudflare
- Configure DNS records:
api.yourdomain.comβ Your API server IPyourdomain.comβ Your webapp server IP
- Enable Cloudflare Proxy (orange cloud)
- SSL/TLS Settings: Set to "Full (strict)" mode
- Firewall Rules: Configure WAF rules for additional security
SentryGuard is part of the Cloudflare Project Alexandria program, supporting open-source projects with Cloudflare's enterprise features.
Contributions are welcome! Please read our Contributing Guide and Code of Conduct before submitting a Pull Request.
Copyright (C) 2025 Anas Barghoud
This project is licensed under the GNU Affero General Public License v3.0, either version 3 of the License or (at your option) any later version - see the LICENSE file for details.
We chose AGPL-3.0 to ensure that:
- The software remains free and open source
- Any modifications or improvements are shared with the community
- Network usage (SaaS) requires source code disclosure
- The project benefits from community contributions
SentryGuard is not affiliated with, endorsed by, or connected to Tesla, Inc. Tesla and the Tesla logo are trademarks of Tesla, Inc.
Use this software at your own risk. The authors are not responsible for any damage or issues that may arise from using this software.
- Issues: GitHub Issues
- Contributing: CONTRIBUTING.md
- Security: SECURITY.md
- Self-hosting: SELF_HOSTING.md β Complete Docker deployment guide
- Changelog: CHANGELOG.md β Read before updating a self-hosted install; breaking changes are listed there
- Tesla for the Fleet API
- Telegram for the Bot API
- Cloudflare for Project Alexandria support
- Nx team for the amazing monorepo tools
- NestJS and Next.js communities
- All our contributors
If you find SentryGuard useful, please consider giving it a star β
- β Active Development: Regular updates and improvements
- β Community Driven: Open to contributions
- β Production Ready: Used by real Tesla owners
- β Well Documented: Comprehensive setup guides
Made with β€οΈ for Tesla owners who care about their vehicle's security






