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

# Contributing

> Cara kontribusi ke monorepo — setup, branch, test, dan PR.

Panduan singkat untuk developer baru. Setup cepat: [Quickstart](/quickstart).

## Prasyarat

* [Bun](https://bun.sh) 1.3+
* Postgres lokal atau Neon dev
* File `.env` di root (salin dari `.env.example`)

```bash theme={null}
./thub setup
./thub dev
```

## Struktur kerja

| Perintah                      | Fungsi                        |
| ----------------------------- | ----------------------------- |
| `./thub dev`                  | Web + API + renderer          |
| `./thub doctor`               | Cek env & struktur            |
| `./thub doctor --ci`          | Versi CI (tanpa secret nyata) |
| `bun run lint:ci`             | Lint tooling/scripts          |
| `cd apps/web && bun run test` | Vitest frontend               |
| `cd apps/api && bun run test` | Vitest API                    |

## Branch & commit

* Branch dari `main`: `feat/...`, `fix/...`, `docs/...`
* Commit message: conventional commits (`feat:`, `fix:`, `docs:`)
* PR ke `main` — CI harus hijau

## CI yang harus lulus

| Job       | Perintah lokal                     |
| --------- | ---------------------------------- |
| Lint      | `bun run lint:ci`                  |
| Doctor    | `./thub doctor --ci`               |
| Docs      | `cd apps/docs && bun run validate` |
| Web tests | `cd apps/web && bun run test`      |
| API tests | `cd apps/api && bun run test`      |

Detail: [CI/CD](/guides/ci-cd)

## Setelah ubah frontend

Wajib browser check — lihat [Playwright](/guides/playwright).

## Setelah ubah docs

```bash theme={null}
cd apps/docs
bun run validate
bun run broken-links
```

Tambahkan halaman baru ke `docs.json` navigation.

## Env & secrets

* Shared: `.env` (gitignored)
* Override dev: `.env.development.local`
* Override prod: `.env.production.local`
* Merge: `./thub env merge`

Jangan commit secret. Deploy secrets: [Secrets](/guides/secrets).

## Deploy

* **Production**: manual via GitHub Actions **Deploy Cloudflare** atau `./thub deploy` lokal
* Bukan auto-deploy on merge

## Di mana cari konteks

| Topik             | Lokasi                                   |
| ----------------- | ---------------------------------------- |
| Arsitektur produk | `/architecture/*`                        |
| AI & prompt       | `/ai/*`                                  |
| Layanan eksternal | `/external/*`                            |
| Admin operasional | [Admin playbook](/guides/admin-playbook) |
| Istilah domain    | [Glossarium](/architecture/glossarium)   |

## Repo

[github.com/trisnalesmana/aimentor](https://github.com/trisnalesmana/aimentor)
