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-..."
Security Note
Never commit your .env file to GitHub. It is already added to .gitignore.
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):
- Edit
packages/core/prisma/schema.prisma. - 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
.envfile:RESEND_API_KEY="re_..." # OR MAILGUN_API_KEY="key-..." - Centralized Service: The
sendEmailfunction located inpackages/coreis 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."
});
Security Note
Make sure to use a verified domain (e.g., hello@yourdomain.com) as the email sender in the Production environment.