vibes-plug 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/BLUEPRINT.md +125 -0
- package/CHANGELOG.md +195 -0
- package/CONTRIBUTING.md +199 -0
- package/LICENSE +21 -0
- package/README.md +263 -0
- package/SECURITY.md +21 -0
- package/banner.png +0 -0
- package/package.json +25 -0
- package/plugin.json +8 -0
- package/scripts/update_skills.js +75 -0
- package/skills/ai-llm-integration-expert/SKILL.md +162 -0
- package/skills/api-design-expert/SKILL.md +310 -0
- package/skills/app-analyzer-optimizer/SKILL.md +189 -0
- package/skills/asisten_ramah/SKILL.md +41 -0
- package/skills/authentication-identity-expert/SKILL.md +45 -0
- package/skills/auto-doc-updater/SKILL.md +204 -0
- package/skills/bootstrap-to-modern/SKILL.md +87 -0
- package/skills/brainstorming/SKILL.md +353 -0
- package/skills/bun-runtime-expert/SKILL.md +211 -0
- package/skills/ci-cd-devops-architect/SKILL.md +45 -0
- package/skills/cloud-hosting-expert/SKILL.md +244 -0
- package/skills/coderabbit/SKILL.md +192 -0
- package/skills/data-telemetry-expert/SKILL.md +213 -0
- package/skills/database-orm-expert/SKILL.md +294 -0
- package/skills/design-system-architect/SKILL.md +243 -0
- package/skills/e2e-testing-expert/SKILL.md +315 -0
- package/skills/event-driven-architect/SKILL.md +81 -0
- package/skills/firebase-security-expert/SKILL.md +195 -0
- package/skills/fullstack-expert/SKILL.md +202 -0
- package/skills/fullstack-expert/references/api_design_guide.md +466 -0
- package/skills/fullstack-expert/references/devops_infrastructure.md +477 -0
- package/skills/fullstack-expert/references/multi_language_backend.md +528 -0
- package/skills/fullstack-expert/references/system_design_patterns.md +358 -0
- package/skills/fullstack-expert/scripts/api_contract_validator.py +253 -0
- package/skills/fullstack-expert/scripts/architecture_analyzer.py +326 -0
- package/skills/gemini-agent-booster/SKILL.md +135 -0
- package/skills/global-a11y-i18n-expert/SKILL.md +81 -0
- package/skills/go-programming-expert/SKILL.md +295 -0
- package/skills/hig/SKILL.md +188 -0
- package/skills/js-backend-expert/SKILL.md +192 -0
- package/skills/mcp-server-architect/SKILL.md +194 -0
- package/skills/mobile-expo-expert/SKILL.md +186 -0
- package/skills/monday-design-aesthetic/SKILL.md +67 -0
- package/skills/monorepo-architect/SKILL.md +227 -0
- package/skills/mpa-orchestrator/SKILL.md +101 -0
- package/skills/multi-agent-orchestration/SKILL.md +234 -0
- package/skills/multiple-entry-points/SKILL.md +55 -0
- package/skills/mvc-expert/SKILL.md +231 -0
- package/skills/payment-gateway-expert/SKILL.md +45 -0
- package/skills/performance-web-vitals/SKILL.md +332 -0
- package/skills/prd-architect/SKILL.md +191 -0
- package/skills/production-ready-hardener/SKILL.md +469 -0
- package/skills/production-ready-hardener/references/performance_optimization.md +441 -0
- package/skills/production-ready-hardener/references/production_checklist.md +161 -0
- package/skills/production-ready-hardener/references/security_hardening_guide.md +379 -0
- package/skills/production-ready-hardener/scripts/production_readiness_scanner.py +875 -0
- package/skills/python-programming-expert/SKILL.md +271 -0
- package/skills/realtime-collaboration-expert/SKILL.md +45 -0
- package/skills/rust-programming-expert/SKILL.md +235 -0
- package/skills/saas-billing/SKILL.md +377 -0
- package/skills/saas-multi-tenant/SKILL.md +237 -0
- package/skills/saas-mvp-launcher/SKILL.md +231 -0
- package/skills/saas-transformer/SKILL.md +446 -0
- package/skills/saas-transformer/references/billing_integration_guide.md +401 -0
- package/skills/saas-transformer/references/feature_gating_patterns.md +137 -0
- package/skills/saas-transformer/references/saas_transformation_checklist.md +121 -0
- package/skills/saas-transformer/scripts/saas_transformation_scanner.py +254 -0
- package/skills/scalability-clean-code/SKILL.md +229 -0
- package/skills/secure-fuzz-testing/SKILL.md +201 -0
- package/skills/senior-frontend/SKILL.md +161 -0
- package/skills/senior-frontend/references/frontend_best_practices.md +806 -0
- package/skills/senior-frontend/references/nextjs_optimization_guide.md +724 -0
- package/skills/senior-frontend/references/react_patterns.md +746 -0
- package/skills/senior-frontend/scripts/bundle_analyzer.py +407 -0
- package/skills/senior-frontend/scripts/component_generator.py +329 -0
- package/skills/senior-frontend/scripts/frontend_scaffolder.py +1005 -0
- package/skills/senior-fullstack/SKILL.md +167 -0
- package/skills/senior-fullstack/references/architecture_patterns.md +160 -0
- package/skills/senior-fullstack/references/development_workflows.md +222 -0
- package/skills/senior-fullstack/references/tech_stack_guide.md +190 -0
- package/skills/senior-fullstack/scripts/code_quality_analyzer.py +114 -0
- package/skills/senior-fullstack/scripts/fullstack_scaffolder.py +114 -0
- package/skills/senior-fullstack/scripts/project_scaffolder.py +114 -0
- package/skills/seo/SKILL.md +225 -0
- package/skills/seo/references/cwv-thresholds.md +108 -0
- package/skills/seo/references/eeat-framework.md +214 -0
- package/skills/seo/references/quality-gates.md +155 -0
- package/skills/seo/references/schema-types.md +118 -0
- package/skills/seo-aeo-landing-page-writer/SKILL.md +97 -0
- package/skills/seo-geo/SKILL.md +188 -0
- package/skills/session-handoff-resume/SKILL.md +158 -0
- package/skills/skill_baru/SKILL.md +147 -0
- package/skills/spa-orchestrator/SKILL.md +288 -0
- package/skills/state-management-expert/SKILL.md +272 -0
- package/skills/supabase-migration/SKILL.md +45 -0
- package/skills/supabase-security-expert/SKILL.md +243 -0
- package/skills/tailwind-expert/SKILL.md +188 -0
- package/skills/tanstack-query-expert/SKILL.md +199 -0
- package/skills/tauri-expert/SKILL.md +97 -0
- package/skills/token-saver/SKILL.md +111 -0
- package/skills/typescript-expert/SKILL.md +279 -0
- package/skills/ui-components-expert/SKILL.md +63 -0
- package/skills/ui-ux-pro-max/SKILL.md +201 -0
- package/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/skills/ui-ux-pro-max/data/prompts.csv +24 -0
- package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/data/styles.csv +59 -0
- package/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-310.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-310.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/core.py +257 -0
- package/skills/ui-ux-pro-max/scripts/design_system.py +493 -0
- package/skills/ui-ux-pro-max/scripts/search.py +81 -0
- package/skills/ui_ux_expert/SKILL.md +114 -0
- package/skills/vibe-code-gardener/SKILL.md +173 -0
- package/skills/web-scraper/SKILL.md +205 -0
- package/skills/web-scraper/references/data-transforms.md +397 -0
- package/skills/web-scraper/references/extraction-patterns.md +475 -0
- package/skills/web-scraper/references/output-templates.md +481 -0
- package/skills/zero-to-prod-orchestrator/SKILL.md +180 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bun-runtime-expert
|
|
3
|
+
description: "Expert guide for Bun JavaScript/TypeScript runtime. Use when building, testing, or deploying applications with Bun / Panduan ahli untuk runtime JavaScript/TypeScript Bun. Digunakan saat membuat, menguji, atau meluncurkan aplikasi dengan Bun."
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Bun Runtime Expert
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
Expert-level guidance for building high-performance applications with the Bun JavaScript/TypeScript runtime (v1.1+). Covers Bun's built-in HTTP server, database clients, bundler, test runner, package manager, and Node.js migration strategies.
|
|
17
|
+
|
|
18
|
+
### Trigger Conditions
|
|
19
|
+
- Use when scaffolding a new project with Bun as the runtime.
|
|
20
|
+
- Use when building HTTP servers or APIs with `Bun.serve()`.
|
|
21
|
+
- Use when querying databases with `Bun.sql` (PostgreSQL, MySQL, SQLite).
|
|
22
|
+
- Use when interacting with S3-compatible object storage via `Bun.s3`.
|
|
23
|
+
- Use when bundling frontend or backend code with `bun build`.
|
|
24
|
+
- Use when writing tests with `bun:test`.
|
|
25
|
+
- Use when migrating an existing Node.js project to Bun.
|
|
26
|
+
- Use when optimizing package installation speed or lockfile management.
|
|
27
|
+
|
|
28
|
+
### Core Architecture
|
|
29
|
+
|
|
30
|
+
#### Why Bun?
|
|
31
|
+
Bun is a batteries-included JavaScript/TypeScript runtime that replaces Node.js, npm, Webpack/Vite, and Jest in a single binary:
|
|
32
|
+
|
|
33
|
+
| Capability | Bun Built-in | Node.js Equivalent |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| Runtime | `bun run` | `node` |
|
|
36
|
+
| Package Manager | `bun install` | `npm` / `pnpm` / `yarn` |
|
|
37
|
+
| Bundler | `bun build` | Webpack / Vite / esbuild |
|
|
38
|
+
| Test Runner | `bun test` | Jest / Vitest |
|
|
39
|
+
| HTTP Server | `Bun.serve()` | Express / Fastify |
|
|
40
|
+
| SQL Client | `Bun.sql` | `pg` / `mysql2` / `better-sqlite3` |
|
|
41
|
+
| S3 Client | `Bun.s3` | `@aws-sdk/client-s3` |
|
|
42
|
+
| Redis Client | Built-in | `ioredis` |
|
|
43
|
+
| TypeScript | Native (zero config) | `ts-node` / `tsx` |
|
|
44
|
+
| `.env` loading | Native | `dotenv` |
|
|
45
|
+
|
|
46
|
+
### Quick Start
|
|
47
|
+
|
|
48
|
+
#### 1. Install Bun
|
|
49
|
+
```bash
|
|
50
|
+
# macOS / Linux
|
|
51
|
+
curl -fsSL https://bun.sh/install | bash
|
|
52
|
+
|
|
53
|
+
# Windows (PowerShell)
|
|
54
|
+
powershell -c "irm bun.sh/install.ps1 | iex"
|
|
55
|
+
|
|
56
|
+
# Verify installation
|
|
57
|
+
bun --version
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### 2. Initialize a New Project
|
|
61
|
+
```bash
|
|
62
|
+
bun init
|
|
63
|
+
```
|
|
64
|
+
This generates `package.json`, `tsconfig.json`, and an `index.ts` entry point. TypeScript works out of the box with zero configuration.
|
|
65
|
+
|
|
66
|
+
#### 3. Install Dependencies
|
|
67
|
+
```bash
|
|
68
|
+
# Install all dependencies (10-100x faster than npm)
|
|
69
|
+
bun install
|
|
70
|
+
|
|
71
|
+
# Add a package
|
|
72
|
+
bun add hono zod drizzle-orm
|
|
73
|
+
|
|
74
|
+
# Add dev dependency
|
|
75
|
+
bun add -d @types/bun vitest
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Bun.serve() — High-Performance HTTP Server
|
|
79
|
+
`Bun.serve()` is a zero-dependency HTTP server with built-in TLS, WebSocket support, and hot module reloading.
|
|
80
|
+
|
|
81
|
+
#### Basic HTTP Server
|
|
82
|
+
```typescript
|
|
83
|
+
Bun.serve({
|
|
84
|
+
port: 3000,
|
|
85
|
+
fetch(req) {
|
|
86
|
+
const url = new URL(req.url);
|
|
87
|
+
if (url.pathname === '/api/health') {
|
|
88
|
+
return Response.json({ status: 'ok', runtime: 'bun' });
|
|
89
|
+
}
|
|
90
|
+
return new Response('Not Found', { status: 404 });
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Bun.sql — Unified Database Client
|
|
96
|
+
Zero-dependency SQL client supporting PostgreSQL, MySQL/MariaDB, and SQLite via tagged template literals.
|
|
97
|
+
|
|
98
|
+
#### PostgreSQL
|
|
99
|
+
```typescript
|
|
100
|
+
import { sql } from 'bun';
|
|
101
|
+
const users = await sql`SELECT * FROM users WHERE active = ${true}`;
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Best Practices
|
|
105
|
+
- **Performance:** Use `Bun.serve()` directly or Hono for HTTP — avoid Express (slower compat layer). Use `Bun.file()` for efficient file I/O.
|
|
106
|
+
- **Security:** Always parameterize queries via template literals in `Bun.sql` (automatically prevents SQL injection).
|
|
107
|
+
- **Testing:** Use `bun:test` — it's Jest-compatible and significantly faster.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
<a name="bahasa-indonesia"></a>
|
|
112
|
+
## Bahasa Indonesia
|
|
113
|
+
|
|
114
|
+
Panduan tingkat ahli untuk membangun aplikasi berkinerja tinggi menggunakan runtime JavaScript/TypeScript Bun (v1.1+). Mencakup server HTTP bawaan, klien database, bundler, test runner, package manager, dan strategi migrasi dari Node.js.
|
|
115
|
+
|
|
116
|
+
### Kondisi Pemicu
|
|
117
|
+
- Gunakan saat merancang proyek baru menggunakan Bun sebagai runtime.
|
|
118
|
+
- Gunakan saat membangun server HTTP atau API dengan `Bun.serve()`.
|
|
119
|
+
- Gunakan saat melakukan query database dengan `Bun.sql` (PostgreSQL, MySQL, SQLite).
|
|
120
|
+
- Gunakan saat berinteraksi dengan object storage yang kompatibel dengan S3 via `Bun.s3`.
|
|
121
|
+
- Gunakan saat membundel kode frontend atau backend dengan `bun build`.
|
|
122
|
+
- Gunakan saat menulis pengujian (testing) menggunakan `bun:test`.
|
|
123
|
+
- Gunakan saat memigrasikan proyek Node.js ke Bun.
|
|
124
|
+
- Gunakan saat mengoptimalkan kecepatan instalasi paket atau manajemen lockfile.
|
|
125
|
+
|
|
126
|
+
### Arsitektur Inti
|
|
127
|
+
|
|
128
|
+
#### Mengapa Bun?
|
|
129
|
+
Bun adalah runtime JavaScript/TypeScript serba ada yang menggantikan Node.js, npm, Webpack/Vite, dan Jest dalam satu berkas biner tunggal:
|
|
130
|
+
|
|
131
|
+
| Kemampuan | Bawaan Bun | Setara di Node.js |
|
|
132
|
+
|---|---|---|
|
|
133
|
+
| Runtime | `bun run` | `node` |
|
|
134
|
+
| Package Manager | `bun install` | `npm` / `pnpm` / `yarn` |
|
|
135
|
+
| Bundler | `bun build` | Webpack / Vite / esbuild |
|
|
136
|
+
| Test Runner | `bun test` | Jest / Vitest |
|
|
137
|
+
| HTTP Server | `Bun.serve()` | Express / Fastify |
|
|
138
|
+
| SQL Client | `Bun.sql` | `pg` / `mysql2` / `better-sqlite3` |
|
|
139
|
+
| S3 Client | `Bun.s3` | `@aws-sdk/client-s3` |
|
|
140
|
+
| Redis Client | Built-in | `ioredis` |
|
|
141
|
+
| TypeScript | Native (tanpa config) | `ts-node` / `tsx` |
|
|
142
|
+
| `.env` loading | Native | `dotenv` |
|
|
143
|
+
|
|
144
|
+
### Memulai Cepat
|
|
145
|
+
|
|
146
|
+
#### 1. Instal Bun
|
|
147
|
+
```bash
|
|
148
|
+
# Windows (PowerShell)
|
|
149
|
+
powershell -c "irm bun.sh/install.ps1 | iex"
|
|
150
|
+
|
|
151
|
+
# macOS / Linux
|
|
152
|
+
curl -fsSL https://bun.sh/install | bash
|
|
153
|
+
|
|
154
|
+
# Verifikasi instalasi
|
|
155
|
+
bun --version
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### 2. Inisialisasi Proyek Baru
|
|
159
|
+
```bash
|
|
160
|
+
bun init
|
|
161
|
+
```
|
|
162
|
+
Ini menghasilkan `package.json`, `tsconfig.json`, dan file entry point `index.ts`. TypeScript langsung berfungsi tanpa konfigurasi tambahan.
|
|
163
|
+
|
|
164
|
+
#### 3. Instal Dependensi
|
|
165
|
+
```bash
|
|
166
|
+
# Mengmenginstal semua dependensi (10-100x lebih cepat dari npm)
|
|
167
|
+
bun install
|
|
168
|
+
|
|
169
|
+
# Menambahkan paket
|
|
170
|
+
bun add hono zod drizzle-orm
|
|
171
|
+
|
|
172
|
+
# Menambahkan dev dependency
|
|
173
|
+
bun add -d @types/bun vitest
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Bun.serve() — HTTP Server Berkinerja Tinggi
|
|
177
|
+
`Bun.serve()` adalah server HTTP tanpa dependensi eksternal dengan dukungan TLS bawaan, WebSocket, dan hot module reloading.
|
|
178
|
+
|
|
179
|
+
#### Server HTTP Dasar
|
|
180
|
+
```typescript
|
|
181
|
+
Bun.serve({
|
|
182
|
+
port: 3000,
|
|
183
|
+
fetch(req) {
|
|
184
|
+
const url = new URL(req.url);
|
|
185
|
+
if (url.pathname === '/api/health') {
|
|
186
|
+
return Response.json({ status: 'ok', runtime: 'bun' });
|
|
187
|
+
}
|
|
188
|
+
return new Response('Not Found', { status: 404 });
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Bun.sql — Klien Database Terpadu
|
|
194
|
+
Klien SQL tanpa dependensi eksternal yang mendukung PostgreSQL, MySQL/MariaDB, dan SQLite melalui tagged template literals.
|
|
195
|
+
|
|
196
|
+
#### PostgreSQL
|
|
197
|
+
```typescript
|
|
198
|
+
import { sql } from 'bun';
|
|
199
|
+
const users = await sql`SELECT * FROM users WHERE active = ${true}`;
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Praktik Terbaik
|
|
203
|
+
- **Performa:** Gunakan `Bun.serve()` secara langsung atau bersama Hono — hindari Express (karena lapisan kompatibilitasnya lebih lambat). Gunakan `Bun.file()` untuk I/O file yang efisien.
|
|
204
|
+
- **Keamanan:** Selalu gunakan parameterisasi query melalui template literals di `Bun.sql` untuk mencegah SQL Injection secara otomatis.
|
|
205
|
+
- **Pengujian:** Gunakan `bun:test` yang kompatibel dengan Jest namun jauh lebih cepat.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
### Limitations / Batasan
|
|
210
|
+
- Use this skill only when the task involves the Bun runtime specifically.
|
|
211
|
+
- Bun's Node.js compatibility is extensive but not 100%. Always verify critical `node:*` API usage.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ci-cd-devops-architect
|
|
3
|
+
description: "Expert guide for continuous integration, deployment pipelines, Docker, Kubernetes, and Infrastructure as Code (IaC) / Panduan ahli untuk CI/CD dan infrastruktur."
|
|
4
|
+
author: "Antigravity"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# CI/CD & DevOps Architect / Arsitek CI/CD & DevOps
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Description
|
|
17
|
+
Expert-level skill for designing and maintaining CI/CD pipelines (GitHub Actions, GitLab CI) and managing infrastructure using Docker, Kubernetes, and Terraform.
|
|
18
|
+
|
|
19
|
+
### Instructions
|
|
20
|
+
- **Automate Everything**: Ensure tests, linting, formatting, and security scans run on every PR. Block merges if pipelines fail.
|
|
21
|
+
- **Immutable Artifacts**: Build a Docker image once and deploy the exact same image to Staging and Production. Pass environment variables dynamically at runtime, not build time.
|
|
22
|
+
- **Infrastructure as Code**: Keep all infrastructure configurations (Terraform, K8s manifests) in version control. Avoid manual changes via the cloud provider's web console.
|
|
23
|
+
- **Secrets Management**: Never commit secrets to the repository. Use secure vaults like GitHub Secrets, AWS Secrets Manager, or HashiCorp Vault, and inject them securely into the environment.
|
|
24
|
+
- **Zero-Downtime Deployments**: Utilize deployment strategies like rolling updates or blue-green deployments to ensure application availability during releases.
|
|
25
|
+
|
|
26
|
+
### Trigger Conditions
|
|
27
|
+
Active whenever the user is creating GitHub Actions, configuring Dockerfiles, writing Terraform scripts, or setting up deployment pipelines.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
<a name="bahasa-indonesia"></a>
|
|
32
|
+
## Bahasa Indonesia
|
|
33
|
+
|
|
34
|
+
### Deskripsi
|
|
35
|
+
Skill tingkat ahli untuk merancang dan memelihara *pipeline* CI/CD (GitHub Actions, GitLab CI) dan mengelola infrastruktur menggunakan Docker, Kubernetes, dan Terraform.
|
|
36
|
+
|
|
37
|
+
### Instruksi
|
|
38
|
+
- **Otomatisasi Semuanya**: Pastikan pengujian (tests), *linting*, pemformatan, dan pemindaian keamanan berjalan di setiap *Pull Request* (PR). Blokir penggabungan kode (merge) jika *pipeline* gagal.
|
|
39
|
+
- **Artifak Imutabel**: Build *image* Docker satu kali dan *deploy* image yang sama persis ke Staging dan Produksi. Operkan variabel lingkungan (environment variables) secara dinamis saat *runtime*, bukan saat *build time*.
|
|
40
|
+
- **Infrastructure as Code (IaC)**: Simpan semua konfigurasi infrastruktur (Terraform, manifes K8s) di kontrol versi. Hindari perubahan manual melalui *web console* dari penyedia cloud.
|
|
41
|
+
- **Manajemen Rahasia (Secrets)**: Jangan pernah melakukan *commit* untuk *secrets* ke repositori. Gunakan *vault* yang aman seperti GitHub Secrets, AWS Secrets Manager, atau HashiCorp Vault, dan injeksikan dengan aman ke dalam sistem.
|
|
42
|
+
- **Deployment Tanpa Downtime**: Manfaatkan strategi *deployment* seperti pembaruan bergulir (*rolling updates*) atau *blue-green deployments* untuk memastikan ketersediaan aplikasi selama rilis.
|
|
43
|
+
|
|
44
|
+
### Kondisi Pemicu
|
|
45
|
+
Aktif setiap kali pengguna sedang membuat GitHub Actions, mengkonfigurasi Dockerfile, menulis skrip Terraform, atau mengatur *pipeline deployment*.
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cloud-hosting-expert
|
|
3
|
+
description: "Expert guide for deploying SaaS applications with multiple entry points on modern edge and serverless platforms like Vercel and Cloudflare / Panduan ahli untuk mendeploy aplikasi SaaS dengan multiple entry points di platform edge dan serverless modern seperti Vercel dan Cloudflare."
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Cloud Hosting Expert (2026 Edition)
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Description
|
|
17
|
+
Expert guide for deploying SaaS applications and their multiple entry points (landing page, app, super admin subdomain) on modern edge and serverless platforms. Covers Vercel, Cloudflare Workers & Pages, Railway, Fly.io, and **Cloudflare Workers AI** for AI-powered edge workloads.
|
|
18
|
+
|
|
19
|
+
### Trigger Conditions
|
|
20
|
+
- Deploying a Next.js, Hono, or Astro application to Vercel, Cloudflare, or Railway.
|
|
21
|
+
- Configuring custom domains and subdomain routing (e.g., `app.domain.com`, `admin.domain.com`).
|
|
22
|
+
- Setting up Edge Middleware for multi-tenant tenant identification.
|
|
23
|
+
- Deploying AI inference workloads to **Cloudflare Workers AI**.
|
|
24
|
+
- Deploying long-running backend services to **Railway** or **Fly.io**.
|
|
25
|
+
- Implementing CDN caching strategies for SaaS applications.
|
|
26
|
+
|
|
27
|
+
### Platform Selection Guide (2026)
|
|
28
|
+
|
|
29
|
+
| Platform | Best For | Free Tier | Cold Start |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| **Vercel** | Next.js, static, serverless functions | ✅ | ~200ms |
|
|
32
|
+
| **Cloudflare Workers** | Ultra-low latency APIs, edge logic | ✅ (100k req/day) | ~0ms |
|
|
33
|
+
| **Cloudflare Pages** | Static + full-stack (via Workers) | ✅ | ~0ms |
|
|
34
|
+
| **Railway** | Node.js/Go/Python long-running services, Bun | ✅ (5$/mo credit) | None |
|
|
35
|
+
| **Fly.io** | Docker containers, global distribution | ✅ (3 shared VMs) | ~500ms |
|
|
36
|
+
| **Render** | Node.js/Go/Python persistent services | ✅ (spins down) | ~30s |
|
|
37
|
+
|
|
38
|
+
### Multi-Entry Point Deployment Architecture
|
|
39
|
+
|
|
40
|
+
For SaaS applications, separate deployments for each entry point:
|
|
41
|
+
```
|
|
42
|
+
myapp.com → Vercel (Marketing/Landing — Next.js static)
|
|
43
|
+
app.myapp.com → Vercel (SaaS App — Next.js dynamic)
|
|
44
|
+
admin.myapp.com → Vercel (Super Admin — Next.js, restricted access)
|
|
45
|
+
api.myapp.com → Railway/Fly.io (Backend API — long-running)
|
|
46
|
+
cdn.myapp.com → Cloudflare R2 (Static assets & user uploads)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Vercel — Next.js Deployment
|
|
50
|
+
|
|
51
|
+
#### Multi-Domain Configuration
|
|
52
|
+
```json
|
|
53
|
+
// vercel.json
|
|
54
|
+
{
|
|
55
|
+
"rewrites": [
|
|
56
|
+
{ "source": "/(.*)", "destination": "/$1" }
|
|
57
|
+
],
|
|
58
|
+
"headers": [
|
|
59
|
+
{
|
|
60
|
+
"source": "/(.*)",
|
|
61
|
+
"headers": [
|
|
62
|
+
{ "key": "X-Content-Type-Options", "value": "nosniff" },
|
|
63
|
+
{ "key": "X-Frame-Options", "value": "DENY" },
|
|
64
|
+
{ "key": "Strict-Transport-Security", "value": "max-age=63072000; includeSubDomains; preload" }
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Edge Middleware for Tenant Routing
|
|
72
|
+
```typescript
|
|
73
|
+
// middleware.ts — runs at the edge before every request
|
|
74
|
+
import { NextResponse } from 'next/server';
|
|
75
|
+
import type { NextRequest } from 'next/server';
|
|
76
|
+
|
|
77
|
+
export function middleware(request: NextRequest) {
|
|
78
|
+
const hostname = request.headers.get('host') ?? '';
|
|
79
|
+
const subdomain = hostname.split('.')[0];
|
|
80
|
+
|
|
81
|
+
// Route admin subdomain — enforce strict auth check
|
|
82
|
+
if (subdomain === 'admin') {
|
|
83
|
+
const adminToken = request.cookies.get('admin-session')?.value;
|
|
84
|
+
if (!adminToken) {
|
|
85
|
+
return NextResponse.redirect(new URL('/login', request.url));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Identify tenant from subdomain for multi-tenant apps
|
|
90
|
+
if (subdomain !== 'www' && subdomain !== 'app' && subdomain !== 'admin') {
|
|
91
|
+
const response = NextResponse.next();
|
|
92
|
+
response.headers.set('x-tenant-slug', subdomain);
|
|
93
|
+
return response;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return NextResponse.next();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const config = {
|
|
100
|
+
matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
|
|
101
|
+
};
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Cloudflare Workers — Edge APIs
|
|
105
|
+
|
|
106
|
+
#### Hono on Cloudflare Workers
|
|
107
|
+
```typescript
|
|
108
|
+
// src/index.ts
|
|
109
|
+
import { Hono } from 'hono';
|
|
110
|
+
import { cors } from 'hono/cors';
|
|
111
|
+
import { rateLimit } from '@/middleware/rateLimit';
|
|
112
|
+
|
|
113
|
+
const app = new Hono<{ Bindings: Env }>();
|
|
114
|
+
|
|
115
|
+
app.use('*', cors({ origin: ['https://app.myapp.com'] }));
|
|
116
|
+
app.use('/api/*', rateLimit(100)); // 100 req/min via KV
|
|
117
|
+
|
|
118
|
+
app.get('/api/health', (c) => c.json({ status: 'ok', region: c.env.CF_REGION }));
|
|
119
|
+
|
|
120
|
+
app.get('/api/data', async (c) => {
|
|
121
|
+
// Access Cloudflare D1 (SQLite at edge)
|
|
122
|
+
const result = await c.env.DB.prepare('SELECT * FROM items LIMIT 20').all();
|
|
123
|
+
return c.json(result.results);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export default app;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
#### Cloudflare Workers AI (On-Device Edge Inference)
|
|
130
|
+
Run AI models directly at Cloudflare's edge — no external API calls needed:
|
|
131
|
+
```typescript
|
|
132
|
+
export default {
|
|
133
|
+
async fetch(request: Request, env: Env) {
|
|
134
|
+
const { text } = await request.json() as { text: string };
|
|
135
|
+
|
|
136
|
+
// Run Llama 3 or Mistral at the edge
|
|
137
|
+
const response = await env.AI.run('@cf/meta/llama-3.1-8b-instruct', {
|
|
138
|
+
messages: [
|
|
139
|
+
{ role: 'system', content: 'You are a helpful assistant.' },
|
|
140
|
+
{ role: 'user', content: text }
|
|
141
|
+
],
|
|
142
|
+
stream: true,
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
return new Response(response, {
|
|
146
|
+
headers: { 'Content-Type': 'text/event-stream' }
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Available models on Workers AI:
|
|
153
|
+
- `@cf/meta/llama-3.1-8b-instruct` — Fast general-purpose chat
|
|
154
|
+
- `@cf/mistral/mistral-7b-instruct-v0.2` — Fast instruction model
|
|
155
|
+
- `@cf/baai/bge-small-en-v1.5` — Text embedding (for RAG)
|
|
156
|
+
- `@cf/stabilityai/stable-diffusion-xl-base-1.0` — Image generation
|
|
157
|
+
|
|
158
|
+
### Railway — Bun / Node.js Long-Running Services
|
|
159
|
+
```dockerfile
|
|
160
|
+
# Dockerfile for Railway (Bun runtime)
|
|
161
|
+
FROM oven/bun:1.2-alpine
|
|
162
|
+
WORKDIR /app
|
|
163
|
+
COPY package.json bun.lockb ./
|
|
164
|
+
RUN bun install --frozen-lockfile
|
|
165
|
+
COPY . .
|
|
166
|
+
EXPOSE 3000
|
|
167
|
+
CMD ["bun", "run", "src/server.ts"]
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
```toml
|
|
171
|
+
# railway.toml
|
|
172
|
+
[build]
|
|
173
|
+
builder = "DOCKERFILE"
|
|
174
|
+
|
|
175
|
+
[deploy]
|
|
176
|
+
startCommand = "bun run src/server.ts"
|
|
177
|
+
healthcheckPath = "/health"
|
|
178
|
+
healthcheckTimeout = 10
|
|
179
|
+
restartPolicyType = "ON_FAILURE"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Environment Variables & Secrets Management
|
|
183
|
+
- **Vercel**: Use Vercel's built-in secrets panel — supports preview/production scoping.
|
|
184
|
+
- **Cloudflare**: Use `wrangler secret put SECRET_NAME` or the dashboard.
|
|
185
|
+
- **Railway**: Use Railway's variable groups for shared secrets across services.
|
|
186
|
+
- **Never** commit `.env` files — use `.env.example` as documentation only.
|
|
187
|
+
|
|
188
|
+
### Caching Strategy
|
|
189
|
+
```typescript
|
|
190
|
+
// Vercel: Cache API responses at the edge
|
|
191
|
+
export async function GET() {
|
|
192
|
+
const data = await fetchData();
|
|
193
|
+
return Response.json(data, {
|
|
194
|
+
headers: {
|
|
195
|
+
'Cache-Control': 'public, s-maxage=60, stale-while-revalidate=300',
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Cloudflare: Use Cache API
|
|
201
|
+
const cache = caches.default;
|
|
202
|
+
const cached = await cache.match(request);
|
|
203
|
+
if (cached) return cached;
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
<a name="bahasa-indonesia"></a>
|
|
209
|
+
## Bahasa Indonesia
|
|
210
|
+
|
|
211
|
+
### Deskripsi
|
|
212
|
+
Panduan ahli untuk men-deploy aplikasi SaaS dan multiple entry points-nya (landing page, aplikasi, subdomain super admin) di platform edge dan serverless modern. Mencakup Vercel, Cloudflare Workers & Pages, Railway, Fly.io, dan **Cloudflare Workers AI** untuk workload AI di edge.
|
|
213
|
+
|
|
214
|
+
### Kondisi Pemicu
|
|
215
|
+
- Men-deploy aplikasi Next.js, Hono, atau Astro ke Vercel, Cloudflare, atau Railway.
|
|
216
|
+
- Mengonfigurasi domain kustom dan routing subdomain.
|
|
217
|
+
- Menyiapkan Edge Middleware untuk identifikasi tenant multi-tenant.
|
|
218
|
+
- Men-deploy workload inferensi AI ke **Cloudflare Workers AI**.
|
|
219
|
+
- Men-deploy layanan backend long-running ke **Railway** atau **Fly.io**.
|
|
220
|
+
|
|
221
|
+
### Panduan Pemilihan Platform (2026)
|
|
222
|
+
|
|
223
|
+
Pilih Vercel untuk Next.js dan aplikasi full-stack. Cloudflare Workers untuk API dengan latensi ultra-rendah dan logika edge. Railway/Fly.io untuk layanan backend long-running (Node.js, Bun, Go, Python). Cloudflare R2 untuk penyimpanan objek (pengganti S3 yang lebih murah).
|
|
224
|
+
|
|
225
|
+
### Arsitektur Deployment Multi-Entry Point
|
|
226
|
+
|
|
227
|
+
Pisahkan deployment untuk setiap entry point SaaS:
|
|
228
|
+
- `domain.com` → Landing page (Vercel, statis)
|
|
229
|
+
- `app.domain.com` → Aplikasi SaaS (Vercel, dinamis)
|
|
230
|
+
- `admin.domain.com` → Dashboard Super Admin (Vercel, akses terbatas)
|
|
231
|
+
- `api.domain.com` → Backend API (Railway/Fly.io, long-running)
|
|
232
|
+
- `cdn.domain.com` → Aset statis & upload pengguna (Cloudflare R2)
|
|
233
|
+
|
|
234
|
+
### Edge Middleware (Vercel)
|
|
235
|
+
Gunakan `middleware.ts` untuk routing tenant berdasarkan subdomain dan perlindungan rute admin — berjalan di edge sebelum setiap permintaan.
|
|
236
|
+
|
|
237
|
+
### Cloudflare Workers AI
|
|
238
|
+
Jalankan model AI (Llama 3.1, Mistral, BGE embedding) langsung di edge Cloudflare — tanpa panggilan API eksternal, latensi sangat rendah, dan ditagih per token.
|
|
239
|
+
|
|
240
|
+
### Railway — Layanan Long-Running
|
|
241
|
+
Gunakan Railway untuk backend yang tidak cocok dengan model serverless (WebSocket, background job, koneksi database persisten). Mendukung Bun, Node.js, Go, Python, Rust dengan deployment otomatis dari GitHub.
|
|
242
|
+
|
|
243
|
+
### Manajemen Environment Variable & Secret
|
|
244
|
+
Gunakan panel secret bawaan di masing-masing platform. Jangan pernah commit file `.env` — gunakan `.env.example` sebagai dokumentasi saja.
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: coderabbit
|
|
3
|
+
description: "AI-powered automated code review, PR summarization, and interactive developer feedback / Review kode otomatis berbasis AI, ringkasan PR, dan umpan balik developer interaktif."
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# CodeRabbit (2026 Edition — CodeRabbit 2.x)
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Description
|
|
17
|
+
Expert guide for configuring and leveraging **CodeRabbit 2.x** — AI-powered automated code review, pull request summarization, and interactive developer feedback. Covers configuration, custom review rules, integration with CI/CD, and agentic review mode.
|
|
18
|
+
|
|
19
|
+
### Trigger Conditions
|
|
20
|
+
- Setting up CodeRabbit on a GitHub or GitLab repository.
|
|
21
|
+
- Configuring custom review rules for your tech stack.
|
|
22
|
+
- Using CodeRabbit's agentic mode for deep architectural reviews.
|
|
23
|
+
- Integrating CodeRabbit feedback into CI/CD quality gates.
|
|
24
|
+
- Writing CodeRabbit-compatible custom instructions in `.coderabbit.yaml`.
|
|
25
|
+
|
|
26
|
+
### CodeRabbit 2.x Key Features
|
|
27
|
+
|
|
28
|
+
| Feature | Description |
|
|
29
|
+
|---|---|
|
|
30
|
+
| **PR Summary** | Auto-generates structured PR description with walkthrough |
|
|
31
|
+
| **Line-by-line Review** | Inline comments with specific fix suggestions |
|
|
32
|
+
| **Agentic Review** | Deep analysis spanning multiple files for architectural issues |
|
|
33
|
+
| **Learnable Rules** | Learns from review dismissals and approvals over time |
|
|
34
|
+
| **CI Integration** | Blocks PR merge if critical issues found |
|
|
35
|
+
| **Chat Mode** | Ask CodeRabbit questions about the PR in review thread |
|
|
36
|
+
|
|
37
|
+
### Configuration (`.coderabbit.yaml`)
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
# .coderabbit.yaml — place in repository root
|
|
41
|
+
version: "2"
|
|
42
|
+
language: "en-US"
|
|
43
|
+
tone_instructions: "Be concise and direct. Prioritize security and performance issues."
|
|
44
|
+
|
|
45
|
+
reviews:
|
|
46
|
+
auto_review:
|
|
47
|
+
enabled: true
|
|
48
|
+
drafts: false # Don't review draft PRs
|
|
49
|
+
base_branches: ["main", "develop"]
|
|
50
|
+
|
|
51
|
+
profile: "chill" # assertive | chill | default
|
|
52
|
+
request_changes_workflow: false
|
|
53
|
+
high_level_summary: true
|
|
54
|
+
commit_message_instructions: "Use Conventional Commits format: feat/fix/chore/docs"
|
|
55
|
+
|
|
56
|
+
# Ignore paths from review
|
|
57
|
+
path_filters:
|
|
58
|
+
- "!**/*.lock"
|
|
59
|
+
- "!**/migrations/**"
|
|
60
|
+
- "!**/generated/**"
|
|
61
|
+
- "!**/__snapshots__/**"
|
|
62
|
+
|
|
63
|
+
# Stack-specific review instructions
|
|
64
|
+
path_instructions:
|
|
65
|
+
- path: "apps/api/**"
|
|
66
|
+
instructions: |
|
|
67
|
+
- Check for missing input validation (Zod schemas required on all handlers)
|
|
68
|
+
- Flag any database queries without proper RLS consideration
|
|
69
|
+
- Ensure all async functions have try/catch or error boundaries
|
|
70
|
+
- Check for N+1 query patterns (missing .include() or DataLoader usage)
|
|
71
|
+
- path: "apps/web/**"
|
|
72
|
+
instructions: |
|
|
73
|
+
- Check for missing `key` props in .map() renders
|
|
74
|
+
- Flag `useEffect` without proper cleanup functions
|
|
75
|
+
- Check for missing `alt` attributes on images
|
|
76
|
+
- Verify Server Actions are properly validated with Zod
|
|
77
|
+
- path: "apps/admin/**"
|
|
78
|
+
instructions: |
|
|
79
|
+
- All admin routes must verify isSuperAdmin === true
|
|
80
|
+
- Flag any direct DB access without service role client
|
|
81
|
+
- Check for proper audit logging on destructive operations
|
|
82
|
+
|
|
83
|
+
# Custom review rules for the entire codebase
|
|
84
|
+
instructions: |
|
|
85
|
+
Review with these priorities:
|
|
86
|
+
1. SECURITY: SQL injection, XSS, auth bypass, exposed secrets
|
|
87
|
+
2. CORRECTNESS: Logic bugs, off-by-one errors, type unsafety
|
|
88
|
+
3. PERFORMANCE: N+1 queries, unnecessary re-renders, bundle size
|
|
89
|
+
4. MAINTAINABILITY: Code duplication, naming, SOLID violations
|
|
90
|
+
5. STYLE: Only comment if it's a significant clarity issue
|
|
91
|
+
|
|
92
|
+
# PR summary format
|
|
93
|
+
summary:
|
|
94
|
+
auto_title_placeholder: "🤖 AI Title"
|
|
95
|
+
description: |-
|
|
96
|
+
## Summary
|
|
97
|
+
<!-- Concise description of what changed -->
|
|
98
|
+
|
|
99
|
+
## Changes
|
|
100
|
+
<!-- Structured list by area -->
|
|
101
|
+
|
|
102
|
+
## Testing
|
|
103
|
+
<!-- What was tested -->
|
|
104
|
+
|
|
105
|
+
# Enable chat for interactive Q&A
|
|
106
|
+
chat:
|
|
107
|
+
auto_reply: true
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Agentic Review Mode (CodeRabbit 2.x)
|
|
111
|
+
CodeRabbit 2.x introduces **agentic review** — deep analysis that can read multiple files, run tools, and understand architectural context:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
# Trigger agentic review in PR comment:
|
|
115
|
+
@coderabbitai review
|
|
116
|
+
|
|
117
|
+
# Ask specific questions:
|
|
118
|
+
@coderabbitai What is the security impact of changes in apps/api/src/routes/users.ts?
|
|
119
|
+
@coderabbitai Can you generate a test for the createWorkspace function?
|
|
120
|
+
@coderabbitai Is there a N+1 query issue in this PR?
|
|
121
|
+
@coderabbitai Summarize the architecture changes in this PR
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### CI/CD Integration (GitHub Actions)
|
|
125
|
+
```yaml
|
|
126
|
+
# .github/workflows/pr-quality.yml
|
|
127
|
+
name: PR Quality Gate
|
|
128
|
+
|
|
129
|
+
on: [pull_request]
|
|
130
|
+
|
|
131
|
+
jobs:
|
|
132
|
+
coderabbit-review:
|
|
133
|
+
runs-on: ubuntu-latest
|
|
134
|
+
steps:
|
|
135
|
+
- name: Wait for CodeRabbit Review
|
|
136
|
+
uses: coderabbit-ai/wait-for-review@v1
|
|
137
|
+
with:
|
|
138
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
139
|
+
min-approvals: 1
|
|
140
|
+
block-on-critical: true # Block merge if critical issues found
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### CodeRabbit vs Manual Review — Best Practices
|
|
144
|
+
- **CodeRabbit first**: Let it run before human reviewers — catches the obvious issues.
|
|
145
|
+
- **Human focus**: After CodeRabbit, humans focus on business logic, architecture intent, and product decisions.
|
|
146
|
+
- **Teach it**: Dismiss false positives with an explanation — CodeRabbit learns your patterns.
|
|
147
|
+
- **Custom instructions**: Invest time in `path_instructions` for your specific stack — dramatically improves relevance.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
<a name="bahasa-indonesia"></a>
|
|
152
|
+
## Bahasa Indonesia
|
|
153
|
+
|
|
154
|
+
### Deskripsi
|
|
155
|
+
Panduan ahli untuk mengonfigurasi dan memanfaatkan **CodeRabbit 2.x** — review kode otomatis bertenaga AI, ringkasan pull request, dan umpan balik developer interaktif. Mencakup konfigurasi, aturan review kustom, integrasi dengan CI/CD, dan mode review agentik.
|
|
156
|
+
|
|
157
|
+
### Kondisi Pemicu
|
|
158
|
+
- Menyiapkan CodeRabbit di repositori GitHub atau GitLab.
|
|
159
|
+
- Mengonfigurasi aturan review kustom untuk tech stack Anda.
|
|
160
|
+
- Menggunakan mode agentik CodeRabbit untuk review arsitektur mendalam.
|
|
161
|
+
- Mengintegrasikan umpan balik CodeRabbit ke dalam quality gate CI/CD.
|
|
162
|
+
- Menulis instruksi kustom yang kompatibel dengan CodeRabbit di `.coderabbit.yaml`.
|
|
163
|
+
|
|
164
|
+
### Fitur Utama CodeRabbit 2.x
|
|
165
|
+
|
|
166
|
+
| Fitur | Deskripsi |
|
|
167
|
+
|---|---|
|
|
168
|
+
| **Ringkasan PR** | Membuat deskripsi PR terstruktur otomatis dengan walkthrough |
|
|
169
|
+
| **Review Baris per Baris** | Komentar inline dengan saran perbaikan spesifik |
|
|
170
|
+
| **Review Agentik** | Analisis mendalam yang mencakup banyak file untuk masalah arsitektur |
|
|
171
|
+
| **Aturan yang Dapat Dipelajari** | Belajar dari penolakan dan persetujuan review dari waktu ke waktu |
|
|
172
|
+
| **Integrasi CI** | Memblokir merge PR jika masalah kritis ditemukan |
|
|
173
|
+
| **Mode Chat** | Tanyakan pertanyaan kepada CodeRabbit di thread review |
|
|
174
|
+
|
|
175
|
+
### Konfigurasi (`.coderabbit.yaml`)
|
|
176
|
+
Tempatkan `.coderabbit.yaml` di root repositori. Konfigurasi kunci:
|
|
177
|
+
- `reviews.profile`: `assertive` (ketat), `chill` (santai), `default`.
|
|
178
|
+
- `reviews.path_instructions`: Instruksi review kustom per direktori — sangat berguna untuk menerapkan standar spesifik stack.
|
|
179
|
+
- `reviews.path_filters`: Kecualikan file lock, migrasi, kode yang dihasilkan dari review.
|
|
180
|
+
- `reviews.instructions`: Aturan global untuk seluruh codebase dengan prioritas eksplisit.
|
|
181
|
+
|
|
182
|
+
### Mode Review Agentik (CodeRabbit 2.x)
|
|
183
|
+
Mode agentik memungkinkan CodeRabbit membaca banyak file, menjalankan tool, dan memahami konteks arsitektur. Picu dengan `@coderabbitai review` di komentar PR atau ajukan pertanyaan spesifik tentang dampak keamanan, masalah N+1, atau perubahan arsitektur.
|
|
184
|
+
|
|
185
|
+
### Integrasi CI/CD (GitHub Actions)
|
|
186
|
+
Gunakan action `coderabbit-ai/wait-for-review@v1` untuk menunggu review selesai dan memblokir merge jika masalah kritis ditemukan.
|
|
187
|
+
|
|
188
|
+
### CodeRabbit vs Review Manual — Best Practices
|
|
189
|
+
- **CodeRabbit dulu**: Biarkan berjalan sebelum reviewer manusia — menangkap masalah yang jelas.
|
|
190
|
+
- **Fokus manusia**: Setelah CodeRabbit, manusia fokus pada logika bisnis, niat arsitektur, dan keputusan produk.
|
|
191
|
+
- **Ajarkan**: Tolak false positive dengan penjelasan — CodeRabbit belajar pola Anda.
|
|
192
|
+
- **Instruksi kustom**: Investasikan waktu di `path_instructions` untuk stack spesifik Anda — meningkatkan relevansi secara dramatis.
|