Configuration Guide
Every tenant is powered by a SiteConfig preset that controls all domain-specific behavior — from creator categories to AI prompts.
SiteConfig Structure
The SiteConfig interface defines all configuration for a single tenant. Presets are stored as TypeScript files in packages/shared/src/config/presets/ and can be overridden at runtime via the Firestore-backed ConfigProvider.
interface SiteConfig {
domainId: string; // Unique tenant identifier
identity: SiteIdentity; // Branding and URLs
seo: SiteSeo; // SEO metadata
categories: CategoryConfig[]; // Creator categories
topics: TopicConfig[]; // Subject matter topics
quickTopics: QuickTopicConfig[];
search: SearchConfig; // Search and discovery
ai: AiConfig; // AI prompt templates
enrichment: EnrichmentConfig;
onboarding: OnboardingConfig;
collections: CollectionConfig[];
regions: RegionConfig[];
contentTypes: Record<string, string>;
defaults: CreatorDefaults;
community?: CommunityConfig; // Forum reactions, tags
moderation?: ModerationConfig; // Content moderation
video?: VideoConfig; // Video publishing rules
commerce?: CommerceConfig; // Affiliate programs
}Identity & Branding
The identity section controls your platform's name, tagline, URLs, and hero section content.
identity: {
name: "YourPlatform",
tagline: "Discover Amazing Creators",
description: "The premier creator discovery platform for...",
url: "https://yourplatform.com",
email: "hello@yourplatform.com",
twitterHandle: "@yourplatform",
locale: "en_US",
missionStatement: "We connect communities with creators...",
heroTitle: "Discover {highlight}Amazing Creators{/highlight}",
heroCta: "Start exploring today",
appUrl: "https://app.yourplatform.com",
}Categories
Categories define the types of creators in your platform. Each category has an ID, display label, color scheme, and optional gradient for profile banners.
categories: [
{
id: "scholar",
label: "Scholar",
colorClasses: "bg-blue-100 text-blue-700",
icon: "📚",
gradient: "from-blue-600 to-blue-800",
avatarGradient: "from-blue-400 to-blue-600",
pillColors: {
bg: "bg-blue-50",
text: "text-blue-700",
border: "border-blue-200",
},
},
{
id: "educator",
label: "Educator",
colorClasses: "bg-green-100 text-green-700",
icon: "🎓",
gradient: "from-green-600 to-green-800",
},
// ... more categories
]Topics
Topics represent subject matter areas. They're used for content tagging, search filtering, and onboarding interest selection.
topics: [
{ id: "theology", label: "Theology", icon: "📖" },
{ id: "history", label: "History", icon: "🏛️" },
{ id: "science", label: "Science & Faith", icon: "🔬" },
],
quickTopics: [
{ id: "theology", name: "Theology" },
{ id: "history", name: "History" },
]AI Configuration
The ai section provides prompt templates for bio generation, content recommendations, and creator enrichment. Use placeholders like {name} and {category}.
ai: {
bioSystemPrompt: "You are an expert biographer for...",
bioUserPromptTemplate: "Write a brief bio for {name}, a {category}...",
recommendationSystemPrompt: "Recommend content based on...",
enrichmentPromptTemplate: "Research {name} and find...",
profileResearchSystemPrompt: "Research creators in...",
profileGenerationTemplate: "Generate {count} profiles for {category} in {region}",
defaultBioFallback: "{name} is a respected {category}...",
defaultFullBioFallback: "{name} is a creator on our platform...",
}Community Configuration
Configure forum reactions, community tags, and premium gating rules.
community: {
reactionTypes: [
{ type: "heart", emoji: "❤️", label: "Love" },
{ type: "insightful", emoji: "💡", label: "Insightful" },
{ type: "amen", emoji: "🙏", label: "Amen" },
],
defaultReactionType: "heart",
communityTags: [
{ id: "discussion", label: "Discussion", group: "general" },
{ id: "question", label: "Question", group: "general" },
],
premiumGating: {
features: {
createPost: true, // true = free users CAN do this
createReply: true,
voteOnPosts: true,
reactToPosts: false, // false = premium only
joinChannels: false,
// ... more features
},
followLimit: 5, // 0 = unlimited
upgradeCta: "Upgrade to Premium",
upgradeUrl: "/premium",
},
}Runtime Config Provider
For server-side apps, register a ConfigProvider to load presets from Firestore at runtime. This allows config changes without code deployment.
import { registerConfigProvider } from "@lamma/shared";
const provider = {
getConfig: (domainId: string) => firestoreCache.get(domainId),
getAllDomainIds: () => Array.from(firestoreCache.keys()),
};
registerConfigProvider(provider);Client apps use the NEXT_PUBLIC_SITE_PRESET environment variable to select which preset to load at build time.