General
What is TrailBase?
What is TrailBase?
Why should I use TrailBase instead of Firebase or Supabase?
Why should I use TrailBase instead of Firebase or Supabase?
- Single executable: No complex deployments or microservices to manage
- Sub-millisecond latencies: Fast enough to eliminate the need for dedicated caches
- SQLite-based: Predictable performance with no network latency to database
- Open source with copyleft license: Free to use with OSL-3.0
- Built-in WebAssembly runtime: Extend functionality with custom server-side logic
- Geospatial support: First-class support for geometric/geospatial data and querying
- Easy self-hosting: Deploy anywhere without worrying about dependencies
What does 'single-executable' mean?
What does 'single-executable' mean?
Is TrailBase production-ready?
Is TrailBase production-ready?
- Test thoroughly in your specific use case
- Be prepared to handle potential breaking changes
- Join our community to stay updated on releases
- Consider the alpha status when planning mission-critical deployments
Installation & Deployment
How do I install TrailBase?
How do I install TrailBase?
What are the system requirements?
What are the system requirements?
- Operating System: Linux (x64, arm64), macOS (x64, arm64), or Windows (x64)
- Memory: 512MB RAM minimum, 1GB+ recommended
- Disk: 50MB for the binary, plus storage for your data
- Architecture: x86_64 or aarch64 (arm64)
Can I deploy TrailBase to cloud platforms?
Can I deploy TrailBase to cloud platforms?
- Cloud VMs: AWS EC2, Google Compute Engine, DigitalOcean Droplets, etc.
- Container platforms: Kubernetes, Docker Swarm, ECS, Cloud Run
- Platform-as-a-Service: Fly.io, Railway, Render
- On-premises: Any Linux, macOS, or Windows server
Features & Capabilities
Does TrailBase support realtime data synchronization?
Does TrailBase support realtime data synchronization?
- Server-Sent Events (SSE): Default realtime protocol
- WebSockets: Available when compiled with the “ws” feature
- Filtered subscriptions: Subscribe only to changes matching specific criteria
- Record-level granularity: Track changes to specific tables or views
What authentication methods are supported?
What authentication methods are supported?
- Email/Password: Traditional credential-based auth with email verification
- OAuth providers: Google, GitHub, Discord, GitLab, Microsoft, Twitch, Yandex, and Apple
- OIDC: Custom OpenID Connect providers
- PKCE flow: For mobile and desktop applications
- Session management: JWT-based authentication with refresh tokens
Can I use my own custom logic with TrailBase?
Can I use my own custom logic with TrailBase?
- Write custom HTTP endpoints
- Implement background jobs
- Create custom SQLite extension functions
- Use JavaScript, TypeScript, or Rust for guest code
Does TrailBase support geospatial data?
Does TrailBase support geospatial data?
- GeoJSON support: APIs automatically recognize geometry columns and work with GeoJSON
- Spatial queries: Filter using
@within,@intersects, and@containsoperators - LiteGIS extension: In-house GEOS SQLite extension for spatial operations
- WKB/WKT formats: Internal storage in Well Known Binary, queries in Well Known Text
- Spatial indexing: Create indexes to accelerate geometric relationship queries
Can I use TrailBase with multiple databases?
Can I use TrailBase with multiple databases?
- Each Record API can be backed by tables/views in independent databases
- Helps with physical isolation and locking bottleneck avoidance
- Config-driven database lifecycle management
- Per-database file upload and migration management
- SQLite
JOINs can cross database boundaries
FOREIGN KEYs and TRIGGERs cannot cross DB boundaries due to SQLite limitations.Data & APIs
What database does TrailBase use?
What database does TrailBase use?
- The most widely deployed database engine in the world
- ACID-compliant with full transaction support
- Extremely fast for read-heavy workloads
- Serverless and requires no configuration
- Highly reliable with extensive testing
Are the APIs automatically generated?
Are the APIs automatically generated?
- Create, Read, Update, Delete operations
- List with filtering, sorting, and pagination
- Configurable access control rules
- JSON schema validation
- OpenAPI specification output
How do I handle file uploads?
How do I handle file uploads?
- Define
BLOBcolumns in your tables - APIs automatically handle multipart/form-data uploads
- Files are stored in the filesystem with references in the database
- Support for single and multiple file columns
- Image preview in admin UI
- Per-database file lifecycle management
Can I use SQL views with TrailBase?
Can I use SQL views with TrailBase?
- All CRUD operations work with views (where applicable)
- Complex joins and aggregations
- Foreign key expansion support
- Computed columns with type inference
- Same access control as table-backed APIs
GROUP BY.Development & Customization
Do I need to learn Rust to use TrailBase?
Do I need to learn Rust to use TrailBase?
- Admin UI for visual configuration
- SQL for schema definition
- Standard REST APIs for client applications
- WebAssembly for custom logic (JavaScript, TypeScript, or Rust)
What client libraries are available?
What client libraries are available?
- JavaScript/TypeScript: npm package
trailbase - Dart/Flutter: pub.dev package
trailbase - Rust: crates.io package
trailbase-client - C#/.NET: NuGet package
TrailBase - Swift: Available in the repository
- Kotlin: Maven package
trailbase-client - Go: Available in the repository
- Python: PyPI package
trailbase
Can I migrate my schema with TrailBase?
Can I migrate my schema with TrailBase?
- Place SQL migration files in
traildepot/migrations/ - Migrations are automatically applied on startup
- Reload migrations with
SIGHUPsignal (no restart needed) - Per-database migration directories in multi-DB setups
- Admin UI provides SQL editor for quick changes (not recommended for production)
Is there an admin interface?
Is there an admin interface?
/_/admin/:- Visual database schema editor
- Data browser and editor
- Record API configuration
- User management
- OAuth provider setup
- SQL query editor
- Logs and analytics
- Schema visualization (ERD)
- Access from any browser - mobile responsive
Performance & Scaling
How fast is TrailBase?
How fast is TrailBase?
- p50 latencies often under 0.5ms
- p99 latencies typically under 5ms
- No network latency to database
- Fast enough to eliminate need for dedicated caches
How does TrailBase scale?
How does TrailBase scale?
- Vertical scaling: SQLite performs excellently on modern hardware
- Read-heavy workloads: Multiple concurrent readers with no contention
- Single-writer model: SQLite’s write serialization is the main scaling constraint
- Multi-DB support: Distribute writes across independent databases
- Efficient resource usage: Low memory footprint and CPU overhead
What are the limitations of SQLite?
What are the limitations of SQLite?
- Single writer: Only one write transaction at a time per database
- File-based: Database is a single file (use multi-DB for isolation)
- Size limits: Practical limit around 140TB (far more than most need)
- Concurrent writes: Write transactions are serialized
Security & Licensing
What license is TrailBase released under?
What license is TrailBase released under?
- Open source and free to use
- Copyleft license ensuring modifications are shared
- Your application code is NOT affected by copyleft
- Only modifications to TrailBase itself must be released
- Client libraries are dual-licensed under Apache-2.0
How do I report security vulnerabilities?
How do I report security vulnerabilities?
- Commit version where the issue exists
- Proof of concept
- Steps to reproduce
- Recommended fixes (if any)
Is my data secure with TrailBase?
Is my data secure with TrailBase?
- Password hashing: Argon2 or bcrypt algorithms
- JWT authentication: Secure token-based auth
- Access control: Row-level security rules per API
- CORS support: Configurable cross-origin policies
- Rate limiting: Protection against brute force and abuse
- HTTPS support: TLS encryption for data in transit
Community & Support
How do I get help with TrailBase?
How do I get help with TrailBase?
- Documentation: trailbase.io
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Community Q&A and discussions
- Discord: Join the TrailBase Discord community
- Email: For security issues only: [email protected]
How can I contribute to TrailBase?
How can I contribute to TrailBase?
- Report bugs and suggest features on GitHub
- Submit pull requests with fixes or improvements
- Improve documentation
- Help answer questions in the community
- Share your TrailBase projects and examples
Is there a roadmap for future features?
Is there a roadmap for future features?
Migration & Integration
Can I migrate from Firebase to TrailBase?
Can I migrate from Firebase to TrailBase?
- Database: Export Firebase data and import into SQLite
- Authentication: TrailBase supports Auth0 user imports (can be extended)
- APIs: You’ll need to map Firebase collections to TrailBase Record APIs
- Realtime: Both support realtime subscriptions with similar concepts
- Functions: Migrate Cloud Functions to WASM components
Can I export my data from TrailBase?
Can I export my data from TrailBase?
- Your data is stored in standard SQLite format
- Use any SQLite tool to access the database directly
- Export via SQL queries or SQLite
.dump - REST APIs for programmatic export
- Standalone SQLite extensions available separately
Can I use TrailBase with my existing frontend framework?
Can I use TrailBase with my existing frontend framework?
- React, Vue, Angular, Svelte, Solid, etc.
- Flutter and React Native for mobile
- Desktop frameworks (Electron, Tauri, etc.)
- Server-side rendering (Next.js, Nuxt, SvelteKit, etc.)