Documentation Index
Fetch the complete documentation index at: https://belajarkoding.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Command utama
| Command | Fungsi |
|---|---|
npm run dev | Menjalankan dev server |
npm run build | Build production |
npm run start | Menjalankan hasil build production |
npm run lint | ESLint |
npm run typecheck | TypeScript tanpa emit |
npm test | Seluruh test Vitest sekali jalan |
npm run test:watch | Test dalam watch mode |
npm run e2e | Playwright smoke test |
npm run e2e:headed | Playwright dengan browser terbuka |
npm run env:check | Audit readiness environment variables |
Yang sudah diuji oleh repo ini
Unit dan route tests
Vitest mencakup:- payment providers,
- webhook handlers,
- AI middleware,
- rate limits,
- MDX helpers,
- auth-related hooks,
- route handler penting.
DOM tests
Testing Library dipakai untuk komponen dan hook tertentu seperti form auth, contact form, payment hook, dan subscription hook.End-to-end smoke tests
Playwright dipakai untuk mengecek route publik dasar.GitHub Actions CI
Workflow CI saat ini berjalan padapush dan pull_request ke branch main, lalu mengeksekusi:
npm cinpm run lintnpm run typechecknpm testnpm run buildnpx playwright install --with-deps chromiumnpm run e2e
Checklist sebelum deploy
npm run env:checknpm run lintnpm run typechecknpm testnpm run build- cek
GET /api/health - verifikasi callback auth dan webhook memakai domain production
Checklist deployment production
| Yang dicek | Kenapa penting |
|---|---|
NEXT_PUBLIC_APP_URL benar | Dipakai untuk callback dan order URL |
| Redirect URL Supabase benar | Auth dan reset password tidak akan jalan tanpa ini |
| Webhook URL Midtrans atau Doku benar | Payment tidak akan menyelesaikan subscription tanpa ini |
SUPABASE_SERVICE_ROLE_KEY terpasang | Billing, admin, audit, avatar, dan rate limit persisten membutuhkannya |
EMAIL_FROM valid | Email tidak akan terkirim dengan sender yang belum diverifikasi |
Deployment target
Repo ini paling natural untuk Vercel karena memakai Next.js App Router, tetapi tidak terkunci ke Vercel. Apa pun platformnya, kamu tetap perlu:- env yang benar,
- domain yang benar,
- redirect auth yang benar,
- webhook yang benar.
Monitoring ringan sesudah deploy
Sesudah deploy, cek minimal:- landing page,
- login dan signup,
- dashboard,
- billing flow,
- satu webhook test,
GET /api/health.
Kalau kamu ingin resep test manual per fitur, baca Resep testing. Kalau target deploy utama kamu adalah Vercel, lanjutkan ke Deployment Vercel.