Documentation
Documentation
Introduction

Getting Started

Getting started
Getting StartedInstallationQuick StartProject Structure

Configuration

Configuration
ConfigurationEnvironment ConfigurationEdge ConfigDatabaseAuth SecretStripeFirebaseStorageGoogle Maps And Cloud Service AccountOAuth ProvidersEmail DeliverySentryFeature Flags

Architecture

Architecture
Architecture OverviewTech StackoRPC MiddlewareDesign Principles

Patterns

Patterns
Code Patterns & ConventionsFeature ModulesError HandlingType Safety

Database

Database
DatabaseSetupSchema DefinitionDatabase OperationsMigrationsCaching
Data Tables

API

oRPCProceduresRoutersoRPC Proxy Setup
APIsOpenAPIREST Endpoints

Auth & Access

AuthenticationConfigurationOAuth ProvidersRolesSession Management
AuthorizationUser RolesPermissions

Routing & i18n

RoutingDeclarative RoutingNavigation
InternationalizationTranslationsLocale Routing

Components & UI

ComponentsButtonsFormsNavigationDialogs
StylesTailwind CSSThemingTypography

Storage

Storage
StorageConfigurationUsageBuckets
Stripe Billing

Extra

Caching

Templates

Templates
Template GuidesCreate New FeatureCreate New PageCreate Database TableCreate oRPC RouterAdd Translations

Development

Development
DevelopmentCommandsAI AgentsBest Practices
Pulling Updates

Styles

Styling with Tailwind CSS

This project uses Tailwind CSS for all styling with a design system based on semantic color tokens and consistent spacing.

Overview

All styling follows these principles:

  1. Use Tailwind utility classes for all styling
  2. Never use arbitrary values (avoid w-[123px])
  3. Use semantic color tokens (primary, secondary, muted, etc.)
  4. Use design system components (H1-H6, P-P4, Section)

Quick Links

Typography

H1-H6 and P-P4 components for consistent text styling

Tailwind CSS

Tailwind configuration, tokens, and utilities

Theming

Light/dark mode and theme customization

Color System

Colors are defined in two places:

  • src/config/color-variants.ts - Semantic colors and reusable component variants
  • tailwind.config.ts - Tailwind theme configuration

Semantic Colors

Use semantic color classes instead of specific colors:

// ✅ Good - semantic colors
<div className="bg-primary text-primary-foreground">
<p className="text-muted-foreground">

// ❌ Bad - arbitrary colors
<div className="bg-blue-500 text-white">
<p className="text-gray-600">

Available Tokens

TokenPurpose
backgroundPage background
foregroundPrimary text
primaryPrimary actions
secondarySecondary actions
mutedMuted backgrounds
muted-foregroundMuted text (60% opacity)
accentAccent highlights
destructiveDestructive actions/errors
borderBorder colors
ringFocus rings

Spacing Scale

Use the Tailwind spacing scale for consistent layout:

<div className="p-4 gap-2">      {/* 16px padding, 8px gap */}
<div className="mt-8 mb-4">      {/* 32px top, 16px bottom */}
<div className="space-y-6">      {/* 24px vertical spacing */}
ClassSize
*-14px
*-28px
*-416px
*-624px
*-832px
*-1248px
*-1664px

Layout Components

Section Component

Use Section for consistent page layouts:

import { Section } from "@/components/section";

<Section variant="default" padding="xl">
  <H1>Page Title</H1>
  <P>Content here</P>
</Section>

Section Variants

VariantDescription
defaultStandard section
center-pageCentered content with max-width
breakoutWider content area
bg-colorFull-width with accent background
full-widthFull-width without padding
main-contentMain page wrapper

Utility Functions

cn() Helper

Use the cn() helper for conditional classes:

import { cn } from "@/lib/utils";

<div className={cn(
  "base-class",
  isActive && "active-class",
  variant === "primary" && "primary-class"
)} />

This combines classes and handles conflicts intelligently using tailwind-merge.

Responsive Design

Tailwind provides responsive prefixes:

<div className="w-full md:w-1/2 lg:w-1/3">
  {/* Full width on mobile, half on tablet, third on desktop */}
</div>

<p className="text-sm md:text-base lg:text-lg">
  {/* Responsive text sizes */}
</p>
PrefixBreakpoint
sm:640px
md:768px
lg:1024px
xl:1280px
2xl:1536px

Best Practices

  1. Use semantic colors - Always use color tokens like primary instead of specific colors
  2. Follow spacing scale - Use the Tailwind spacing scale for consistency
  3. No arbitrary values - Avoid w-[123px] - use design tokens instead
  4. Use typography components - Use H1-H6 and P-P4 instead of raw HTML elements

Never Use Arbitrary Values

Avoid arbitrary Tailwind values like w-[100px] or text-[#ff0000]. Use design tokens and semantic classes for consistency.

On this page

Overview
Quick Links
Color System
Semantic Colors
Available Tokens
Spacing Scale
Layout Components
Section Component
Section Variants
Utility Functions
cn() Helper
Responsive Design
Best Practices