Configuration

🇮🇩 Bahasa Indonesia

Two places, with a strict split:

What Where Committed to Git?
Identity and behaviour: name, texts, languages, prices, sections lib/site-config/site.config.ts yes
Secrets and per-environment values: keys, database, admin emails, URLs environment variables (.env locally, Replit Secrets / .replit [userenv]) never (.env is git-ignored)

site.config.ts

Read by the web app (pages, browser title, analytics tag), the API (emails, prices, promo codes) and the legal pages. Change it, then restart (pnpm dev) or republish.

Field Type Used for
name string Navbar logo alt text, browser title, email sender name (“Name you@domain”), {site} in texts
owner string Footer copyright, default blog author, operator named in the legal pages
defaultLocale "id" | "en" Language on first visit and of all emails/API messages. Visitors can switch in the footer (stored in their browser)
tagline { id, en } Footer text under the name; meta description for search engines
hero.title, hero.highlight, hero.subtitle { id, en } Home page headline (highlight is the coloured second line); title also goes into the browser tab
logo.path, logo.version string File in artifacts/learnspace/public/. Bump version whenever you replace the file (browser caches)
contactEmail string Legal pages, emails
externalLinks { label: { id, en }, href }[] Footer “Links” column; empty array hides it
googleAnalyticsId string G-XXXXXXX adds the Google tag; empty = no analytics. The privacy page mentions analytics only when set
currency "IDR" Price formatting. Midtrans charges in IDR only
sections.blog / workshops / webinars / learningPass boolean Hide navbar links, home sections and related texts for parts you don’t use (routes stay reachable)
learningPass.price number Learning Pass price in Rupiah (server-side: it is what Midtrans charges)
learningPass.promoCode string One promo code (case-insensitive). Empty = promo field hidden and codes refused
learningPass.promoDiscount number Rupiah taken off when the promo code is used
learningPass.workshopDiscountPercent number Discount Learning Pass holders get on paid workshops; 0 = none

Prices are enforced by the server: changing them in the browser does nothing.

Environment variables

Full list with comments: .env.example. Summary:

Required

Variable Purpose
DATABASE_URL PostgreSQL connection string (Replit sets it)
CLERK_SECRET_KEY, CLERK_PUBLISHABLE_KEY Clerk server keys
VITE_CLERK_PUBLISHABLE_KEY Clerk key for the web app (read at build time)

People and addresses

Variable Purpose
PLATFORM_ADMIN_EMAILS Comma-separated. Bootstrap admins: always admin, cannot be demoted from the UI. Must be a verified email of the Clerk account
LEARNING_CONTENT_ADMIN_EMAILS Comma-separated. Creators (content admins)
LEARNING_PASS_PUBLIC_URL Public base URL (https://…, no trailing slash). Email links, Midtrans redirect and notification URLs
VITE_CLERK_PROXY_URL Production only: https://<your domain>/api/__clerk

Optional features (each off until set)

Feature Variables
Payments (Midtrans) MIDTRANS_SERVER_KEY, MIDTRANS_IS_PRODUCTION (true only with production keys)
Email (Resend) RESEND_FROM_EMAIL (verified sender), RESEND_API_KEY (or the Replit Resend connector)
Invitation emails (SMTP) POSTALE_FROM_EMAIL, POSTALE_SMTP_USER, POSTALE_SMTP_PASSWORD, POSTALE_SMTP_HOST (default mail.postale.io)
Discord DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, DISCORD_BOT_TOKEN, DISCORD_GUILD_ID, DISCORD_MEMBER_ROLE_ID, DISCORD_REDIRECT_URI (https)
File uploads PRIVATE_OBJECT_DIR (Replit App Storage; /bucket/prefix)

GET /api/config/features reports { payments, discord, email } so you can check what the server sees.

Tuning

Variable Default Purpose
LOG_LEVEL info API log level (pino)
PAYMENT_RECONCILE_INTERVAL_MINUTES 10 How often unfinished payments are re-checked with Midtrans
PAYMENT_RECONCILE_STALE_MINUTES 30 Age at which a pending payment is re-checked
WEBINAR_REMINDER_INTERVAL_MINUTES 15 How often webinar reminder emails are considered

Where to put them

  • Local: copy .env.example to .env. pnpm dev, pnpm db:push and pnpm db:seed read it.
  • Replit: secrets in Tools → Secrets; non-secret values may also live in .replit under [userenv.shared] (both environments), [userenv.development] or [userenv.production]. Published deployments have their own copy of secrets: check them in the deployment settings.
  • Own server: an EnvironmentFile for systemd, or your host’s secret settings (see 08).