VT implements security measures to protect users, data, and infrastructure from various threats. Our multi-layered security approach combines privacy-first architecture with advanced application security and Better Auth.
- Privacy-First Design: Local data storage, zero server persistence of conversations
- Defense in Depth: Multiple security layers protecting different attack vectors
- Zero Trust: All requests are validated and protected regardless of source
- User-Centric Protection: Security measures that enhance rather than hinder user experience
VTChat implements bot detection and secure authentication focused on privacy and user protection.
- Authentication Bot Detection: Identifies and blocks automated traffic on authentication endpoints
- Industry-Standard Detection: Uses the
isbotlibrary for reliable bot identification - Focused Protection: Targeted protection for login and registration endpoints
- Privacy-First Approach: Minimal data collection while maintaining security
- Modern Session Management: Secure session handling with automatic expiration
- OAuth Integration: Secure authentication with Google, GitHub, and other providers
- Session Isolation: Per-user authentication with proper thread isolation
- Account Linking: Secure linking of multiple OAuth providers to single account
// Enhanced Better Auth integration
- Bot detection for authentication endpoints
- Secure OAuth integration with Google and GitHub
- Session management with automatic expiration
- CORS headers for cross-origin protection// Basic protection for all routes
- HTTPS enforcement for all communications
- Secure session management through Better Auth
- Privacy-first data handling
- User ID + IP tracking// Form submission protection
- Authentication required
- User-specific submission tracking
- Basic rate limiting through application logic- IndexedDB Storage: All conversations stored locally in browser
- Zero Server Persistence: Chat history never leaves user's device
- Multi-User Isolation: Complete data separation on shared devices
- Client-Side Encryption: Sensitive data encrypted in browser storage
- Better Auth Integration: Modern, secure session management
- Secure Headers: CORS, security headers properly configured
- Session Isolation: Per-user authentication with proper isolation
- Graceful Degradation: Continues operation if auth services fail
- Brute Force Protection: Better Auth built-in rate limiting
- Bot Prevention: Detection and blocking of automated requests on auth endpoints
- Privacy Protection: No server-side storage of sensitive conversation data
- Secure Communication: HTTPS enforcement and secure headers
- Input Validation: All user inputs validated and sanitized
- Output Encoding: Proper encoding to prevent XSS attacks
- SQL Injection Prevention: Parameterized queries and ORM protection
- File Upload Security: Restricted file types and size limits
- Secure Deployment: Fly.io with proper security configurations
- Environment Isolation: Separate development, staging, production
- Secret Management: Secure handling of API keys and credentials
- Monitoring Integration: Real-time security event monitoring
- Application Monitoring: Basic security event logging
- Error Tracking: Monitoring authentication and access patterns
- Performance Metrics: Security impact on application performance
- Privacy-First Logging: Minimal data collection focused on security
- Basic Analytics: Understanding general usage patterns
- Privacy-Focused Monitoring: No personal data collection
- Error Analysis: Identifying potential security issues
- Trend Analysis: Long-term security trend monitoring
# Security test suite
bun test apps/web/tests/ # Authentication and security tests
bun run build # Build verification# Bot detection testing on auth endpoints
curl -X POST http://localhost:3000/api/auth/sign-up \
-H "Content-Type: application/json" \
-H "User-Agent: bot-detection-test" \
-d '{"email":"[email protected]","password":"test123"}'
# Authentication testing
curl -I http://localhost:3000/api/feedback# Required security configuration
DATABASE_URL=your_secure_db_url # Encrypted database connection
BETTER_AUTH_SECRET=your_session_secret # Session security
NEXT_PUBLIC_BASE_URL=your_app_url # Application base URL- CORS Configuration: Proper cross-origin resource sharing
- Content Security Policy: XSS and injection prevention
- Security Headers: HSTS, X-Frame-Options, etc.
- API Security: Rate limiting and authentication headers
- GDPR Compliance: User data rights and privacy protection
- Data Minimization: Only collect necessary information
- Consent Management: Clear user consent for data usage
- Right to Deletion: User data removal capabilities
- OWASP Guidelines: Following web application security best practices
- Secure Development: Security-first development methodology
- Regular Updates: Continuous security dependency updates
- Vulnerability Management: Proactive security issue resolution
- Secure CI/CD: Protected deployment pipelines
- Environment Separation: Isolated production environment
- Secret Rotation: Regular API key and credential rotation
- Backup Security: Encrypted backups with access controls
- Security Monitoring: 24/7 automated threat detection
- Incident Procedures: Defined response protocols
- Recovery Plans: Comprehensive disaster recovery
- Communication: User notification for security events
- Better Auth Documentation: Authentication security details
- Security Best Practices: Industry security standards
- Privacy Policy: User privacy commitments
Security Contact: For security concerns or vulnerability reports, please contact our security team through the appropriate channels outlined in our security policy.
Last Updated: June 30, 2025