Real-time Tesla vehicle monitoring and security alerts via 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! π
Want to try SentryGuard? We're currently in beta and looking for Tesla owners to test the platform!
Sign up for beta access here:
Help us improve SentryGuard by being an early adopter. Your feedback will shape the future of the platform!
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 Telegram notifications when suspicious activity is detected.
- π Tesla OAuth Authentication - Secure login with your Tesla account
- π± Telegram Integration - Instant alerts via deep linking (no manual chatId setup)
- π Multi-Vehicle Support - Monitor all your Tesla vehicles
- π Real-time Telemetry - Track Sentry Mode, receive a real-time telegram notification when a security event occurs
- π SEO-Friendly WebApp - Next.js with server-side rendering
- π Secure by Design - Encrypted token storage, secure communication
- π¨ Modern UI - Beautiful, responsive interface with Tailwind CSS
This is an Nx monorepo containing:
apps/api- NestJS backend API with TypeORM + PostgreSQLapps/webapp- Next.js 15 frontend with App Router (SEO-optimized)
Backend:
- NestJS - Node.js framework
- TypeORM - ORM with PostgreSQL
- Telegraf - Telegram Bot API
- Tesla Fleet API - Official Tesla API
- Tesla Command Proxy
Frontend:
- Next.js 15 - React framework with SSR
- React 19 - UI library
- Tailwind CSS - Styling
- TypeScript - Type safety
- Visit the webapp and click "Login with Tesla"
- Authenticate with your Tesla account
- You'll be redirected to your dashboard
- Go to the Vehicles page
- Your Tesla vehicles will be automatically synced
- Enable telemetry for each vehicle you want to monitor
- Go to the Telegram page
- Click "Generate Telegram Link"
- Open the link in Telegram
- Your account is now linked!
- Test with "Send Test Message"
- When Sentry Mode is triggered, you'll receive an instant Telegram notification
npx nx serve apinpx nx serve webapp# API
npx nx build api
# WebApp
npx nx build webapp# API tests
npx nx test api
# WebApp tests
npx nx test webappnpx nx lint api
npx nx lint webappSentryGuard/
βββ apps/
β βββ api/ # NestJS Backend
β β βββ src/
β β β βββ app/
β β β β βββ auth/ # Tesla OAuth
β β β β βββ telemetry/ # Vehicle telemetry
β β β β βββ telegram/ # Telegram bot
β β β β βββ zmq/ # ZMQ service
β β β βββ entities/ # TypeORM entities
β β β βββ config/ # Configuration
β β β βββ common/ # Shared utilities
β β βββ env.example
β β
β βββ webapp/ # Next.js Frontend
β βββ src/
β β βββ app/ # Next.js pages (App Router)
β β β βββ dashboard/ # Protected dashboard
β β β βββ callback/ # OAuth callback
β β βββ components/ # React components
β β βββ lib/ # Utilities & hooks
β βββ tailwind.config.js
β
βββ nx.json # Nx configuration
βββ package.json- Stores Tesla OAuth tokens (encrypted)
- User profile information
- Vehicle details (VIN, model, name)
- Telemetry configuration status
- Link tokens for deep linking
- Chat IDs for sending alerts
- Token Encryption: All Tesla access tokens are encrypted 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.
This project is licensed under the GNU Affero General Public License v3.0 - 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
Note: A detailed setup guide with Docker support is coming soon!
- 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