Templates Overview
Vinoflare offers 9 carefully crafted templates to match different project requirements. Each template comes with TypeScript, testing, linting, and best practices configured out of the box.
Template Comparison
Full-Stack Templates
Full-stack templates include a React frontend with TanStack Router, Vite, and Tailwind CSS. They differ in their API client approach and feature set.
Template | API Client | Database | Auth | Best For |
---|---|---|---|---|
Orval | Orval (OpenAPI) | ✅ | ✅ | Teams preferring OpenAPI-first development |
Orval (No Auth) | Orval (OpenAPI) | ✅ | ❌ | Public-facing apps with data persistence |
Orval (No DB) | Orval (OpenAPI) | ❌ | ❌ | Stateless frontend apps with external APIs |
RPC | Hono RPC | ✅ | ✅ | Rapid development with full type inference |
RPC (No Auth) | Hono RPC | ✅ | ❌ | Quick prototypes with database |
RPC (No DB) | Hono RPC | ❌ | ❌ | Simple frontends with minimal backend |
API-Only Templates
API-only templates provide a Hono REST API server without a frontend. Perfect for microservices or when you have a separate frontend.
Template | Database | Auth | Best For |
---|---|---|---|
API | ✅ | ✅ | Secure microservices with user management |
API (No Auth) | ✅ | ❌ | Public APIs with data persistence |
API (No DB) | ❌ | ❌ | Stateless services, webhooks, proxies |
API Client Comparison
Orval (OpenAPI)
Orval generates typed API clients from OpenAPI schemas. Best for:
- Standards-based development - OpenAPI/Swagger specification
- API documentation - Auto-generated docs from schema
- Cross-team collaboration - Share schemas between teams
- Code generation - Hooks and types generated automatically
Hono RPC
Hono RPC provides end-to-end type inference without code generation. Best for:
- Rapid development - No code generation step needed
- Type inference - Types flow from backend to frontend
- Smaller bundle size - No generated code
- Simpler setup - Less configuration required
Feature Details
Database (Cloudflare D1)
Templates with database include:
- Drizzle ORM for type-safe database queries
- Migration system for schema changes
- Local D1 database for development
- Seed data for quick starts
Authentication (Better Auth)
Templates with auth include:
- Discord OAuth pre-configured
- Session management with secure cookies
- Protected routes on frontend and backend
- User profiles and management
Frontend Stack
All full-stack templates include:
- React 19 with Server Components support
- TanStack Router for type-safe routing
- TanStack Query for data fetching
- Tailwind CSS for styling
- Vite for lightning-fast HMR
Choosing the Right Template
Decision Tree
-
Do you need a frontend?
- ✅ Yes → Continue to step 2
- ❌ No → Choose an API-only template
-
Do you need user data persistence?
- ✅ Yes → Continue to step 3
- ❌ No → Choose a template without database
-
Do you need user authentication?
- ✅ Yes → Choose a template with auth
- ❌ No → Choose a template without auth
-
Which API client approach do you prefer?
- 📋 Standards-based with documentation → Choose Orval
- ⚡ Fast development with type inference → Choose RPC
Common Scenarios
Building a SaaS application → Full Stack with Orval or RPC (with auth & database)
Creating a public tool or documentation site → Full Stack without auth (with database)
Building a static site with API calls → Full Stack without database
Creating a microservice → API only (choose features based on needs)
Building a webhook handler → API only without database
Quick Start Commands
Next Steps
- Explore individual template documentation:
- Read the Quick Start Guide
- Learn about Development Workflow