Skip to content

Customize the SaaS Template

Varity Team Core Contributors Updated March 2026

This tutorial shows you how to take the SaaS Starter template and make it your own. You’ll change the branding, modify navigation, and rename the default data models to match your business.

A scaffolded project from the SaaS Starter template:

Terminal window
varitykit init my-app
cd my-app
npm install
npm run dev

The app name appears in the sidebar, page titles, and landing page.

Edit src/lib/constants.ts:

src/lib/constants.ts
// Before
export const APP_NAME = 'TaskFlow';
// After
export const APP_NAME = 'ClientHub';

That’s it. The name updates everywhere automatically.

The template uses CSS variables for theming. Edit src/app/globals.css:

src/app/globals.css
:root {
/* Default: Blue */
--color-primary-500: #3b82f6;
--color-primary-600: #2563eb;
--color-primary-700: #1d4ed8;
}

Color presets you can use:

Preset500600700
Blue (default)#3b82f6#2563eb#1d4ed8
Purple#8b5cf6#7c3aed#6d28d9
Green#22c55e#16a34a#15803d
Orange#f97316#ea580c#c2410c

Replace the hex values and save. The entire app updates instantly.

Edit NAVIGATION_ITEMS in src/lib/constants.ts to match your app’s structure:

src/lib/constants.ts
// Before (project management)
export const NAVIGATION_ITEMS = [
{ label: 'Dashboard', icon: 'dashboard', path: '/dashboard' },
{ label: 'Projects', icon: 'folder', path: '/dashboard/projects' },
{ label: 'Tasks', icon: 'list', path: '/dashboard/tasks' },
{ label: 'Team', icon: 'people', path: '/dashboard/team' },
{ label: 'Settings', icon: 'settings', path: '/dashboard/settings' },
];
// After (client management)
export const NAVIGATION_ITEMS = [
{ label: 'Dashboard', icon: 'dashboard', path: '/dashboard' },
{ label: 'Clients', icon: 'people', path: '/dashboard/clients' },
{ label: 'Invoices', icon: 'list', path: '/dashboard/invoices' },
{ label: 'Settings', icon: 'settings', path: '/dashboard/settings' },
];

Available icons: dashboard, folder, list, people, settings

Let’s replace the default “Project” model with a “Client” model.

  1. Define the new type

    Edit src/types/index.ts:

    src/types/index.ts
    // Replace Project with Client
    export interface Client {
    id?: string;
    name: string;
    email: string;
    company: string;
    status: 'active' | 'inactive' | 'lead';
    createdAt: string;
    }
    // Keep or modify Task → Invoice
    export interface Invoice {
    id?: string;
    clientId: string;
    amount: number;
    status: 'draft' | 'sent' | 'paid' | 'overdue';
    dueDate: string;
    createdAt: string;
    }
  2. Update collection helpers

    Edit src/lib/database.ts:

    src/lib/database.ts
    import { db } from './varity';
    import type { Client, Invoice } from '../types';
    export const clients = () => db.collection<Client>('clients');
    export const invoices = () => db.collection<Invoice>('invoices');
  3. Update hooks

    In src/lib/hooks.ts, rename useProjects to useClients:

    src/lib/hooks.ts
    import { clients, invoices } from './database';
    import type { Client, Invoice } from '../types';
    export function useClients(): UseCollectionReturn<Client> {
    const [data, setData] = useState<Client[]>([]);
    const [loading, setLoading] = useState(true);
    const [error, setError] = useState<string | null>(null);
    const refresh = useCallback(async () => {
    try {
    setLoading(true);
    setError(null);
    const result = await clients().get();
    setData(result as Client[]);
    } catch (err) {
    setError(err instanceof Error ? err.message : 'Failed to load');
    } finally {
    setLoading(false);
    }
    }, []);
    useEffect(() => { refresh(); }, [refresh]);
    // create, update, remove — same pattern, using clients() instead of projects()
    // ...
    return { data, loading, error, create, update, remove, refresh };
    }
  4. Rename page files

    Terminal window
    mv src/app/dashboard/projects src/app/dashboard/clients
    mv src/app/dashboard/tasks src/app/dashboard/invoices

    Then update the page components to use useClients() and useInvoices() instead of useProjects() and useTasks().

  5. Update status/priority options

    In constants.ts, update the status options:

    export const CLIENT_STATUS_OPTIONS = [
    { value: 'active', label: 'Active' },
    { value: 'inactive', label: 'Inactive' },
    { value: 'lead', label: 'Lead' },
    ] as const;
    export const INVOICE_STATUS_OPTIONS = [
    { value: 'draft', label: 'Draft' },
    { value: 'sent', label: 'Sent' },
    { value: 'paid', label: 'Paid' },
    { value: 'overdue', label: 'Overdue' },
    ] as const;

The landing page is at src/app/page.tsx. Key sections to update:

  • Hero text — Change the headline and subheading
  • Features — Update the feature cards
  • Testimonials — Add your own testimonials or remove the section
  • CTA — Change the call-to-action text and link
Terminal window
npm run build
varitykit app deploy

Your customized app is now live.

What to ChangeWhere to Edit
App namesrc/lib/constants.tsAPP_NAME
Colorssrc/app/globals.css → CSS variables
Navigationsrc/lib/constants.tsNAVIGATION_ITEMS
Data modelssrc/types/index.ts
Collectionssrc/lib/database.ts
Hookssrc/lib/hooks.ts
Pagessrc/app/dashboard/*/page.tsx
Landing pagesrc/app/page.tsx