Logo
Get Started

Configuration

Customize your SaaS, Database, and Theme.

RapidCore is designed to be config-first. Most of the global settings are controlled via environment variables and shared configuration packages.

1. Environment Variables (.env)

The root .env file controls the secrets for all applications.

# Database (Prisma/Supabase)
DATABASE_URL="postgresql://postgres:[PASSWORD]@db.supabase.co:5432/postgres"
DIRECT_URL="postgresql://postgres:[PASSWORD]@db.supabase.co:5432/postgres?pgbouncer=true"

# Auth.js (NextAuth)
NEXTAUTH_URL="http://localhost:3001"
NEXTAUTH_SECRET="[GENERATED_SECRET]"

# AI Provider Keys
OPENAI_API_KEY="sk-..."
ANTHROPIC_API_KEY="sk-ant-..."

2. Theming & UI

RapidCore uses a centralized UI package (packages/ui). To change the primary color or font, you only need to edit one file.

Path: packages/ui/src/globals.css

@theme {
    /* Change your brand colors here */
    --color-primary: hsl(263.4 70% 50.4%);
    --color-primary-foreground: hsl(210 20% 98%);
}

The system uses Tailwind v4, so these variables are automatically available as utility classes (e.g., bg-primary, text-primary-foreground).

3. Database Schema

We use Prisma as our ORM. The schema is defined in packages/core/prisma/schema.prisma.

To add a new model (e.g., Project):

  1. Edit packages/core/prisma/schema.prisma.
  2. Run the migration command:
npx pnpm db:migrate

This will automatically update the TypeScript types in @rapidcore/core.

4. Email Setup (Resend / Mailgun)

To allow your application to send notifications or newsletters, you must connect an email service provider.

  • API Key: Add the key of the service you use to your .env file:
    RESEND_API_KEY="re_..."
    # OR
    MAILGUN_API_KEY="key-..."
    
  • Centralized Service: The sendEmail function located in packages/core is used by all modules.
// apps/web-starter/src/actions/newsletter.ts
import { sendEmail } from "@rapidcore/core";

await sendEmail({
  to: user.email,
  subject: "Welcome!",
  body: "Thank you for joining the RapidCore empire."
});