Better-T-Stack supports multiple database systems with automatic ORM configuration and optional managed hosting setup.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/amanvarshney01/create-better-t-stack/llms.txt
Use this file to discover all available pages before exploring further.
Database Types
SQLite
Lightweight, server-less, embedded relational database.Best For:
- Development and prototyping
- Small to medium applications
- Edge deployments (with Turso)
- Applications with simple data needs
- Drizzle (recommended)
- Prisma
PostgreSQL
Powerful, open source object-relational database system.Best For:
- Production applications
- Complex queries and transactions
- Applications requiring ACID compliance
- Large-scale data management
- Drizzle (recommended)
- Prisma
- Neon
- Supabase
- Prisma Postgres
MySQL
Popular open-source relational database system.Best For:
- Traditional web applications
- Teams with MySQL experience
- WordPress-adjacent projects
- Wide hosting compatibility
- Drizzle (recommended)
- Prisma
- PlanetScale
MongoDB
Open-source NoSQL database that stores data in JSON-like documents (BSON).Best For:
- Flexible schema requirements
- Document-oriented data
- Rapid iteration
- Hierarchical data structures
- Mongoose (recommended)
- Prisma
- MongoDB Atlas
ORM Options
Better-T-Stack automatically configures your chosen ORM with the selected database.- Drizzle
- Prisma
- Mongoose
- None
Lightweight and performant TypeScript ORM.Features:
- Type-safe queries
- Zero runtime overhead
- SQL-like syntax
- Excellent TypeScript inference
- Migration support
- Performance-critical applications
- Developers who prefer SQL
- Edge deployments
- Workers runtime
- SQLite
- PostgreSQL
- MySQL
- Workers runtime (default)
- Any SQL database (recommended)
Database + ORM Compatibility Matrix
| Database | Drizzle | Prisma | Mongoose |
|---|---|---|---|
| SQLite | ✅ Recommended | ✅ | ❌ |
| PostgreSQL | ✅ Recommended | ✅ | ❌ |
| MySQL | ✅ Recommended | ✅ | ❌ |
| MongoDB | ❌ | ✅ | ✅ Recommended |
| None | N/A | N/A | N/A |
Managed Database Setup
During project creation, you can optionally set up managed database hosting:SQLite Hosting
SQLite Hosting
Turso (Recommended)
- Edge-replicated SQLite
- Global distribution
- HTTP-based access
- Generous free tier
- Cloudflare Workers integration
- Edge-native SQLite
- Serverless pricing
PostgreSQL Hosting
PostgreSQL Hosting
Neon
- Serverless Postgres
- Branch databases
- Auto-scaling
- Generous free tier
- Postgres + Auth + Storage
- Real-time subscriptions
- Built-in REST API
- Full-featured platform
- Managed by Prisma
- Optimized for Prisma ORM
- Connection pooling
MySQL Hosting
MySQL Hosting
PlanetScale
- Serverless MySQL
- Database branching
- Non-blocking schema changes
- Built-in vitess
MongoDB Hosting
MongoDB Hosting
MongoDB Atlas
- Official managed MongoDB
- Global clusters
- Automatic backups
- Free tier available
Local Development
Local Development
Docker
- Run any database locally
- Consistent environments
- Easy setup with docker-compose
- Included in project scaffold
- Manual database setup
- Use existing database
- Custom configuration
Runtime Compatibility
Backend Compatibility
Automatic Configuration:
- Convex backend: No database/ORM needed (built-in data layer)
- No backend: No database configuration
- All other backends: Full database support
Choosing Your Database
Assess Your Data Model
- Relational data: SQLite, PostgreSQL, MySQL
- Document/flexible schema: MongoDB
- Simple key-value: SQLite
Consider Your Scale
- Prototype/MVP: SQLite
- Production: PostgreSQL
- High traffic: PostgreSQL or MySQL
- Flexible schema: MongoDB
Check Runtime Constraints
- Workers runtime: SQLite, PostgreSQL, or MySQL (HTTP-based)
- Node/Bun: Any database
Schema Examples
Next Steps
Authentication
Add user authentication to your database
Deployment
Deploy your database and application