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

Typography

Typography components and fonts

CRITICAL: Always use typography components (H1-H6, P1-P4) instead of raw HTML elements (<h1>, <p>).

Typography Components

Headings

Import from @/components/navigation/common/heading:

import { H1, H2, H3, H4, H5, H6 } from "@/components/navigation/common/heading";

<H1>Page Title</H1>
<H2>Section Title</H2>

Paragraphs

Import from @/components/navigation/common/paragraph:

import { P1, P2, P3, P4 } from "@/components/navigation/common/paragraph";

<P1>Body text with standard sizing.</P1>
<P3>Muted helper text (has built-in opacity).</P3>

Heading Components

ComponentUse CaseDefault Color
H1Page titlesforeground
H2Major sectionsforeground
H3Subsectionsforeground
H4Minor headingsforeground
H5Small headingsforeground
H6Labels, badgesforeground

Example Usage

<H1>Welcome to Dashboard</H1>
<H2>Recent Activity</H2>
<H3>This Week</H3>
<H6>Status Badge</H6>

Paragraph Components

ComponentUse CaseDefault Color
P1Body text (base)foreground
P2Smaller body textforeground
P3Muted helper textBuilt-in 60% opacity
P4Extra small textBuilt-in 60% opacity

Muted Text

P3 and P4 have built-in 60% opacity for muted text:

<P1>Primary body text</P1>
<P3>This text is automatically muted</P3>
<P4>Very small muted text</P4>

For other components, manually add text-muted-foreground:

<H6 className="text-muted-foreground">Muted heading</H6>
<P1 className="text-muted-foreground">Muted paragraph</P1>

Before/After Examples

❌ Avoid

// Never use raw HTML elements with text classes
<span className="text-lg font-semibold">
  {t("features.cards.modular.badge")}
</span>

<p className="text-sm text-muted-foreground">
  Helper text here
</p>

<h1 className="text-3xl font-bold">
  Page Title
</h1>

✅ Prefer

// Use typography components
<H6>{t("features.cards.modular.badge")}</H6>

<P3>Helper text here</P3>

<H1>Page Title</H1>

Custom Styling

Override styles when needed using className:

<H2 className="text-primary">Primary colored heading</H2>
<P1 className="italic">Italicized text</P1>
<P3 className="uppercase tracking-wide">Uppercase helper</P3>

Font Configuration

Fonts are configured in src/config/fonts.ts:

import { Inter, Poppins } from "next/font/google";

export const fontSans = Inter({
  subsets: ["latin"],
  variable: "--font-sans",
});

export const fontHeading = Poppins({
  subsets: ["latin"],
  variable: "--font-heading",
  weight: ["600", "700"],
});

These fonts are applied via CSS variables:

  • --font-sans - Body text (Inter)
  • --font-heading - Headings (Poppins)

Text Utilities

Useful Tailwind utilities for text:

<P1 className="truncate">                  {/* Truncate with ellipsis */}
<P1 className="line-clamp-2">              {/* Clamp to 2 lines */}
<P1 className="break-words">               {/* Break long words */}
<P1 className="uppercase">                 {/* Transform case */}
<P1 className="tracking-wide">             {/* Letter spacing */}
<P1 className="leading-relaxed">           {/* Line height */}

Responsive Typography

Use responsive variants for different screen sizes:

<H1 className="text-2xl md:text-4xl lg:text-5xl">
  Responsive Heading
</H1>

<P1 className="text-sm md:text-base">
  Responsive body text
</P1>

Best Practices

Always use typography components instead of <h1>, <p>, etc.

They have built-in opacity for helper text

Let the components handle default styling

Match heading levels to content structure (H1 → H2 → H3)

Critical Rule

Never use <h1>, <h2>, <p>, or other raw HTML text elements. Always import and use the typography components (H1-H6, P-P4) for consistent styling.

On this page

Typography Components
Headings
Paragraphs
Heading Components
Example Usage
Paragraph Components
Muted Text
Before/After Examples
❌ Avoid
✅ Prefer
Custom Styling
Font Configuration
Text Utilities
Responsive Typography
Best Practices