Documentation
Documentation
Introduction

Getting Started

Getting StartedInstallationQuick StartProject Structure

Architecture

Architecture OverviewTech StacktRPC MiddlewareDesign Principles

Patterns

Code Patterns & ConventionsFeature ModulesError HandlingType Safety

Database

DatabaseSchema DefinitionDatabase OperationsMigrationsCaching

API

tRPCProceduresRouterstRPC Proxy Setup
APIsOpenAPIREST Endpoints

Auth & Access

AuthenticationConfigurationOAuth ProvidersRolesSession Management
AuthorizationUser RolesPermissions

Routing & i18n

RoutingDeclarative RoutingNavigation
InternationalizationTranslationsLocale Routing

Components & UI

ComponentsButtonsFormsNavigationDialogs
StylesTailwind CSSThemingTypography

Storage

StorageConfigurationUsageBuckets

Configuration

ConfigurationEnvironment VariablesFeature Flags

Templates

Template GuidesCreate New FeatureCreate New PageCreate Database TableCreate tRPC RouterAdd Translations

Development

DevelopmentCommandsAI AgentsBest Practices

Template Guides

Step-by-step guides for scaffolding common structures

Overview

These templates provide step-by-step instructions for creating common structures in the application. Each template is a comprehensive guide that walks you through the entire process with real code examples.

Templates are designed to be:

  • Prescriptive - Follow exact steps to avoid missing critical pieces
  • Comprehensive - Cover all files, configurations, and post-creation tasks
  • Example-driven - Show real code patterns used throughout the codebase
  • Checklist-based - Verify completion with built-in checklists

Available Templates

Core Structure Templates

Create New Feature

Complete feature module using the 5-file pattern with schema, functions, hooks, fields, and prompts

Create New Page

Add a new page with declarative routing, translations, and navigation integration

Create Database Table

Define a Drizzle table with RLS policies, indexes, and proper relationships

Create tRPC Router

Build a type-safe API router with CRUD operations and rate limiting

Add Translations

Add i18n translation keys across all locale files with proper structure

When to Use Each Template

Use new-feature when:

  • Creating a new domain entity (e.g., api-keys, notifications, projects)
  • Need full CRUD operations with forms and dialogs
  • Building a feature that requires database operations and UI

Use new-page when:

  • Adding a new route to the application
  • Creating dashboard pages, settings pages, or public pages
  • Need proper routing with SEO and navigation integration

Use new-table when:

  • Adding a new database entity
  • Need RLS security policies
  • Creating relationships between entities

Use new-router when:

  • Building a new API endpoint
  • Need type-safe server procedures
  • Want to expose REST endpoints via OpenAPI

Use add-translation when:

  • Adding new UI text or messages
  • Creating page-specific translations
  • Need to support multiple languages

Template Workflow

Most features follow this sequence:

  1. Create Database Table - Define data structure
  2. Create Feature Module - Implement business logic
  3. Create tRPC Router - Expose API endpoints
  4. Create Page - Build UI for the feature
  5. Add Translations - Internationalize content

Not all features require all steps. Simple pages may only need steps 4-5, while API-only features may skip step 4.

Template Conventions

All templates follow these conventions:

  • File paths are absolute - Always start from src/
  • Names use consistent casing - kebab-case for files, PascalCase for components, camelCase for functions
  • Checklists are mandatory - Complete all items before considering the work done
  • Examples show real patterns - Code samples come from actual features in the codebase

Getting Help

If you need clarification on any template:

  1. Check the relevant documentation in /docs
  2. Look at existing features in src/features for reference
  3. Review the pattern documentation in /content/docs/patterns

Before starting: Always read the Prerequisites section of each template to ensure you have all the information needed.

On this page

Overview
Available Templates
Core Structure Templates
When to Use Each Template
Use
new-feature when:
Use
new-page when:
Use
new-table when:
Use
new-router when:
Use
add-translation when:
Template Workflow
Template Conventions
Getting Help