> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sertifikasitrainer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin playbook

> Checklist operasional: batch baru dari nol sampai peserta bisa belajar.

Panduan langkah demi langkah untuk admin menyiapkan **satu gelombang training baru**. Asumsikan Anda sudah login sebagai admin di `/admin/home`.

## Checklist cepat

<Steps>
  <Step title="1. Siapkan kursus">
    Buka **Kelola Kursus** (`/admin/manage-kelas`).

    * Buat course baru atau pakai yang sudah ada
    * Tambah chapter + lesson
    * Upload video Mux per lesson (lihat [Alur video](/architecture/alur-video))

    Catat **UUID course** — dipakai di tier.
  </Step>

  <Step title="2. Buat batch">
    Buka **Kelola Batch** (`/admin/batches`).

    * Isi nama, tanggal, lokasi, slug URL
    * Set status **`open`** atau **`published`** agar muncul di `/order`
    * Opsional: gambar, trainer, rundown template
  </Step>

  <Step title="3. Tambah tier">
    Di batch → **Tier Management** atau `/admin/tier-management`.

    | Field        | Isi                                          |
    | ------------ | -------------------------------------------- |
    | Nama & slug  | Mis. `platinum`, `trainer-only`              |
    | Harga        | Integer Rupiah                               |
    | `courseIds`  | UUID kursus yang dibuka (kosong = semua)     |
    | `aiFeatures` | `trainer`, `master`, `branding` sesuai paket |
    | Benefits     | Bullet untuk halaman `/order`                |

    Bisa mulai dari **tier template** lalu override per batch.
  </Step>

  <Step title="4. Sinkron Scalev">
    Di detail batch:

    1. **Ensure Scalev** — buat produk Scalev untuk batch
    2. **Resync** tiap tier — buat varian + harga
    3. Cek **Scalev health** — semua tier hijau

    Kalau gagal: [Tutorial Scalev](/external/scalev), pastikan `SCALEV_*` env benar.\
    Setelah **DB baru** atau ganti API key: [DB baru + Scalev resync](/guides/fresh-db-scalev) atau `./thub scalev resync`.
  </Step>

  <Step title="5. Tes alur publik">
    Tanpa login admin:

    1. Buka `/order` — batch & tier tampil
    2. Klik register → `/register/{batchSlug}/{tierSlug}`
    3. Tes checkout (atau manual mark-paid untuk internal)

    Detail: [Alur pembelian](/architecture/alur-pembelian)
  </Step>

  <Step title="6. Verifikasi akses peserta">
    Setelah bayar, login sebagai peserta:

    * Workspace `/{slug}` terbuka
    * Kursus di `/kelas` sesuai `courseIds`
    * AI Hub sesuai `aiFeatures`
    * Generate dokumen jalan

    Akses tier: [Peta alur produk](/architecture/alur-produk#akses-tier-→-fitur)
  </Step>

  <Step title="7. Opsional: daftar manual">
    Admin bisa tambah peserta manual di **Daftar Peserta** dengan `batchId` + `tierId` — berguna untuk transfer bank / korporat.
  </Step>
</Steps>

## Diagram dependensi

```mermaid theme={null}
flowchart LR
  course["Kursus + video"] --> tier["Tier\ncourseIds"]
  batch["Batch open"] --> tier
  tier --> scalev["Scalev sync"]
  scalev --> order["/order publik"]
  order --> enroll["Enrollment paid"]
  enroll --> access["Kelas + AI + sertifikat"]
```

## Troubleshooting operasional

| Gejala                         | Cek                                                       |
| ------------------------------ | --------------------------------------------------------- |
| Batch tidak di `/order`        | Status batch bukan `open`/`published`                     |
| Checkout error variant         | Jalankan ensure-scalev + resync tier                      |
| Peserta bayar tapi tidak masuk | Webhook Scalev + `payment_sessions` status                |
| Kelas kosong                   | `courseIds` tier salah atau kursus `draft`                |
| AI Hub terkunci                | `aiFeatures` tier kosong — cek default by nama            |
| Video tidak play               | Mux signed token — [Alur video](/architecture/alur-video) |

## Halaman terkait

* [Alur batch & tier](/architecture/alur-batch-tier)
* [Alur auth](/architecture/alur-auth)
* [Glossarium](/architecture/glossarium)
