Quick tutorial: from zero to a live course site

🇮🇩 Bahasa Indonesia

About 30–45 minutes. You end with your own platform online at a Replit address (or your own domain), with sign-in working, one example course, and you as the admin. Payments, email and Discord are optional and can be added later (see 05 Payments, email and Discord).

Prefer your own server? Follow this tutorial up to step 3 for the accounts, then use 08 Deploy on your own server.

What you need

  • A GitHub account (to copy the template) and a Replit account.
  • A Clerk account (free tier is enough to start). Clerk handles sign-in, passwords and email verification.
  • 10 minutes to decide your platform’s name, and a logo (SVG or PNG). The placeholder logo works for now.

Step 1 — Copy the template

  1. Open github.com/firmanhadi21/online-course-template and click Use this template → Create a new repository. Give it your own name (for example my-courses). Private or public, either works.
  2. In Replit, choose Create Repl → Import from GitHub and pick your new repository. Replit reads .replit and sets up Node.js 24 and PostgreSQL.

Step 2 — Add the database

In the Repl, open Tools → Database (PostgreSQL) and create one. Replit puts its address in the DATABASE_URL secret automatically. Nothing else to do.

Step 3 — Create the Clerk application

  1. In the Clerk dashboard click Create application. Name it after your platform. Turn on Email sign-in (and Google if you like).
  2. Open API keys and copy the Publishable key (pk_test_…) and the Secret key (sk_test_…).
  3. In Replit, open Tools → Secrets and add:

    Secret Value
    CLERK_SECRET_KEY sk_test_…
    CLERK_PUBLISHABLE_KEY pk_test_…
    VITE_CLERK_PUBLISHABLE_KEY the same pk_test_…

The test keys are Clerk’s development instance: fine for trying everything out. Step 8 switches to production keys.

Step 4 — Make yourself the admin

Open .replit and replace the placeholder emails with the email you will sign in with:

[userenv.shared]
LEARNING_CONTENT_ADMIN_EMAILS = "you@yourdomain.com"
PLATFORM_ADMIN_EMAILS = "you@yourdomain.com"
MIDTRANS_IS_PRODUCTION = "false"

[userenv.production]
LEARNING_PASS_PUBLIC_URL = "https://your-repl-name.replit.app"
  • PLATFORM_ADMIN_EMAILS — full admins (users, roles, announcements, member emails, Discord).
  • LEARNING_CONTENT_ADMIN_EMAILS — creators (courses, blog, workshops, manual Learning Pass grants).
  • Several people: separate with commas. You can also promote people later from Admin → Users.
  • LEARNING_PASS_PUBLIC_URL is your public address; it is used in email links and payment redirects. Fill in the real one after step 7 if you don’t know it yet.

Step 5 — Name your platform

Edit lib/site-config/site.config.ts:

export const site: SiteConfig = {
  name: "Akademi Data Nusantara",        // brand name everywhere
  owner: "PT Data Nusantara",            // copyright line, default blog author, legal pages
  defaultLocale: "id",                   // "id" or "en": the language of first visit
  tagline: { id: "…", en: "…" },
  hero: { title: { id: "…", en: "…" }, highlight: { id: "…", en: "…" }, subtitle: { id: "…", en: "…" } },
  contactEmail: "halo@datanusantara.id",
  learningPass: { price: 149_000, promoCode: "", promoDiscount: 0, workshopDiscountPercent: 30 },
  // …see 02-configuration.md for every field
};

Replace artifacts/learnspace/public/logo.svg (and favicon.svg) with your own, then set logo.version: "2" so browsers fetch the new file.

Step 6 — Install, create the tables, add the example course

In the Replit Shell:

pnpm install
pnpm db:push     # creates all tables
pnpm db:seed     # optional: adds the example course "Getting Started"

Press Run. The preview shows the home page. Click Sign in, create an account with your admin email, and Creator appears in the navigation bar. Open the example course in the creator editor to see how a course is built (03 Creating courses).

Step 7 — Publish

  1. Click Publish (Deployments) in Replit.
  2. Choose the deployment type:
    • Reserved VM (recommended): the API keeps running, so its background jobs (payment checks, webinar reminders, announcement emails, Discord role sync) run on time.
    • Autoscale is cheaper but can sleep between visitors; background jobs then only run while someone is using the site.
  3. Check that the deployment has the same secrets (Replit copies them; verify CLERK_* and DATABASE_URL).
  4. Publish. Your site is live at https://<name>.replit.app. Put that address in LEARNING_PASS_PUBLIC_URL (step 4) and publish again.

If your published app uses a separate production database (check Tools → Database for a Production tab), make sure its tables exist: Replit offers to apply the development schema when you publish; otherwise run DATABASE_URL=<production url> pnpm db:push once. Courses you made in development are not copied: create (or seed) them on the live site.

Step 8 — Go to production with Clerk and your own domain

  1. In Replit Deployments → Settings → Custom domain, add your domain (e.g. belajar.datanusantara.id) and create the DNS records Replit shows.
  2. In Clerk, create the Production instance for the same application, with that domain. Add the DNS records Clerk asks for. Copy the production keys (pk_live_…, sk_live_…).
  3. Replace the three CLERK_* secrets in the deployment with the live keys, and add VITE_CLERK_PROXY_URL = https://belajar.datanusantara.id/api/__clerk (the API proxies Clerk through your own domain in production).
  4. Set LEARNING_PASS_PUBLIC_URL = https://belajar.datanusantara.id and publish again.

Step 9 — Check it works

  • Home page shows your name, logo and hero text; the browser tab shows your title.
  • Footer language switch changes the whole interface between Bahasa Indonesia and English.
  • Sign up with a new email works, and you receive Clerk’s verification email.
  • Your admin account sees Creator; /admin/users opens.
  • A test course you create and publish appears in Catalogue; a second (non-admin) account can open its free lessons and sees the Learning Pass prompt on exclusive lessons.
  • https://<your-site>/api/config/features shows which optional integrations are on.
  • The privacy policy and terms pages show your name and contact email. Read them and have them reviewed before you take payments.

Next