> ## 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.

# Struktur monorepo

> Layout apps, scripts, dan deploy target.

## Folder utama

```
platform-clean/
├── apps/
│   ├── web/          # Vite + React frontend
│   ├── api/          # Hono API, auth, DB, generation
│   ├── renderer/     # DOCX/PPTX + browser worker
│   └── docs/         # Dokumentasi Mintlify (folder ini)
├── scripts/          # deploy, thub CLI, bootstrap
├── deploy/           # nginx, pm2 configs (legacy infra)
├── .env              # Shared secrets (gitignored)
├── .env.example
├── thub              # CLI entry point
└── package.json      # Workspace root
```

## Runtime production

```mermaid theme={null}
flowchart TB
  user["Browser"] --> cf["Cloudflare Workers"]
  cf --> web["Web worker\napp.sertifikasitrainer.com"]
  cf --> api["API worker\n/api/*"]
  api --> neon["Neon Postgres\nvia Hyperdrive"]
  api --> r2["Cloudflare R2"]
  api --> render["Renderer worker"]
```

## Scripts deploy

| Script                   | Target                          |
| ------------------------ | ------------------------------- |
| `scripts/deploy-prod.sh` | Cloudflare production (default) |
| `scripts/deploy-hono.sh` | Legacy VPS Hono                 |
| `scripts/deploy-beta.sh` | Legacy beta                     |

Flow `./thub` default hanya memanggil **deploy-prod**.

## Workspace

Root `package.json` memakai Bun workspaces `apps/*`. Install sekali di root:

```bash theme={null}
bun install
```

## CI

```bash theme={null}
./thub doctor --ci
```

Workflow utama: `.github/workflows/ci.yml` (lint, doctor, validate docs, tests). Deploy manual: `.github/workflows/deploy-cloudflare.yml`.

Lihat juga: [CI/CD GitHub Actions](/guides/ci-cd).
