vibes-plug 2.5.0 → 2.11.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/.claude/rules/vibes-plug-core.md +32 -0
- package/.cursor/rules/vibes-plug-core.mdc +51 -0
- package/.cursorrules +42 -0
- package/AGENTS.md +37 -7
- package/BLUEPRINT.md +309 -217
- package/CHANGELOG.md +133 -1
- package/CLAUDE.md +70 -0
- package/LICENSE +1 -1
- package/README.md +641 -415
- package/index.js +19 -0
- package/package.json +44 -8
- package/plugin.json +24 -7
- package/scripts/generate_swarm_gif.py +295 -0
- package/scripts/install.js +201 -0
- package/skills/accessibility-testing-expert/SKILL.md +116 -0
- package/skills/ai-cost-token-optimizer/SKILL.md +82 -52
- package/skills/ai-evals-benchmark-expert/SKILL.md +188 -0
- package/skills/ai-llm-integration-expert/SKILL.md +185 -178
- package/skills/ai-media-generation-expert/SKILL.md +172 -0
- package/skills/ai-prompt-engineering-expert/SKILL.md +84 -0
- package/skills/angular-expert/SKILL.md +148 -0
- package/skills/api-design-expert/SKILL.md +6 -3
- package/skills/api-gateway-proxy-expert/SKILL.md +81 -0
- package/skills/app-analyzer-optimizer/SKILL.md +6 -3
- package/skills/apple-ecosystem-expert/SKILL.md +144 -141
- package/skills/{asisten_ramah → asisten-ramah}/SKILL.md +7 -1
- package/skills/astro-framework-expert/SKILL.md +200 -0
- package/skills/async-queue-temporal-expert/SKILL.md +210 -24
- package/skills/authentication-identity-expert/SKILL.md +278 -275
- package/skills/auto-doc-updater/SKILL.md +7 -1
- package/skills/autonomous-chaos-monkey/SKILL.md +63 -63
- package/skills/autonomous-red-teamer/SKILL.md +172 -28
- package/skills/autonomous-tdd-debugger/SKILL.md +70 -64
- package/skills/background-jobs-queue-expert/SKILL.md +235 -0
- package/skills/biome-linter-formatter-expert/SKILL.md +89 -0
- package/skills/blockchain-web3-expert/SKILL.md +115 -0
- package/skills/bootstrap-to-modern/SKILL.md +9 -6
- package/skills/brainstorming/SKILL.md +58 -50
- package/skills/browser-automation-expert/SKILL.md +197 -21
- package/skills/bun-runtime-expert/SKILL.md +7 -1
- package/skills/chatbot-messaging-expert/SKILL.md +114 -0
- package/skills/ci-cd-devops-architect/SKILL.md +45 -36
- package/skills/cloud-hosting-expert/SKILL.md +7 -1
- package/skills/coderabbit/SKILL.md +7 -1
- package/skills/compliance-gdpr-privacy-expert/SKILL.md +85 -0
- package/skills/cron-scheduler-expert/SKILL.md +303 -297
- package/skills/data-pipeline-etl-expert/SKILL.md +84 -0
- package/skills/data-telemetry-expert/SKILL.md +7 -1
- package/skills/data-visualization-expert/SKILL.md +154 -0
- package/skills/database-migration-versioning-expert/SKILL.md +90 -0
- package/skills/database-orm-expert/SKILL.md +13 -3
- package/skills/dependency-upgrade-migrator/SKILL.md +300 -294
- package/skills/design-system-architect/SKILL.md +278 -259
- package/skills/desktop-electron-expert/SKILL.md +128 -0
- package/skills/documentation-site-expert/SKILL.md +59 -0
- package/skills/doku-mcp-server/SKILL.md +7 -1
- package/skills/doku-payment-gateway/SKILL.md +7 -1
- package/skills/domain-driven-design-expert/SKILL.md +82 -0
- package/skills/e2e-testing-expert/SKILL.md +7 -1
- package/skills/ecommerce-expert/SKILL.md +87 -0
- package/skills/edge-serverless-db-expert/SKILL.md +98 -42
- package/skills/email-notification-expert/SKILL.md +367 -361
- package/skills/error-resilience-expert/SKILL.md +485 -479
- package/skills/event-driven-architect/SKILL.md +7 -1
- package/skills/feature-flag-analytics-expert/SKILL.md +65 -45
- package/skills/file-upload-media-expert/SKILL.md +436 -430
- package/skills/firebase-security-expert/SKILL.md +7 -1
- package/skills/form-validation-expert/SKILL.md +406 -400
- package/skills/fullstack-expert/SKILL.md +60 -1
- package/skills/gemini-agent-booster/SKILL.md +173 -135
- package/skills/geospatial-maps-expert/SKILL.md +80 -0
- package/skills/global-a11y-i18n-expert/SKILL.md +7 -1
- package/skills/glsl-shader-expert/SKILL.md +106 -100
- package/skills/go-programming-expert/SKILL.md +21 -15
- package/skills/graph-rag-knowledge-expert/SKILL.md +159 -0
- package/skills/graphql-apollo-expert/SKILL.md +113 -107
- package/skills/headless-cms-expert/SKILL.md +181 -0
- package/skills/hig/SKILL.md +7 -1
- package/skills/js-backend-expert/SKILL.md +218 -216
- package/skills/legacy-code-translator/SKILL.md +70 -64
- package/skills/local-slm-edge-ai-expert/SKILL.md +167 -0
- package/skills/logging-error-tracking-expert/SKILL.md +343 -337
- package/skills/mcp-client-orchestrator/SKILL.md +75 -69
- package/skills/mcp-server-architect/SKILL.md +294 -194
- package/skills/micro-frontend-architect/SKILL.md +111 -105
- package/skills/mobile-expo-expert/SKILL.md +8 -2
- package/skills/mobile-push-notification-expert/SKILL.md +70 -50
- package/skills/modern-css-native-expert/SKILL.md +189 -0
- package/skills/monday-design-aesthetic/SKILL.md +7 -1
- package/skills/monorepo-architect/SKILL.md +7 -1
- package/skills/mpa-orchestrator/SKILL.md +20 -1
- package/skills/multi-agent-orchestration/SKILL.md +254 -234
- package/skills/multiple-entry-points/SKILL.md +37 -1
- package/skills/mvc-expert/SKILL.md +7 -1
- package/skills/n8n-automation-expert/SKILL.md +89 -0
- package/skills/nextjs-app-router-expert/SKILL.md +148 -0
- package/skills/openapi-swagger-codegen-expert/SKILL.md +67 -0
- package/skills/payment-gateway-expert/SKILL.md +85 -1
- package/skills/pdf-document-generation-expert/SKILL.md +91 -0
- package/skills/performance-web-vitals/SKILL.md +7 -1
- package/skills/post-quantum-crypto-migrator/SKILL.md +57 -57
- package/skills/prd-architect/SKILL.md +7 -1
- package/skills/proactive-background-watcher/SKILL.md +67 -61
- package/skills/production-ready-hardener/SKILL.md +461 -455
- package/skills/project-context-mapper/SKILL.md +84 -78
- package/skills/pwa-offline-first-expert/SKILL.md +185 -0
- package/skills/python-programming-expert/SKILL.md +407 -401
- package/skills/rate-limit-abuse-prevention/SKILL.md +376 -370
- package/skills/realtime-collaboration-expert/SKILL.md +55 -1
- package/skills/rich-text-editor-expert/SKILL.md +177 -0
- package/skills/rust-programming-expert/SKILL.md +7 -1
- package/skills/saas-billing/SKILL.md +7 -1
- package/skills/saas-multi-tenant/SKILL.md +7 -1
- package/skills/saas-mvp-launcher/SKILL.md +20 -1
- package/skills/saas-transformer/SKILL.md +499 -488
- package/skills/scalability-clean-code/SKILL.md +7 -1
- package/skills/search-engine-expert/SKILL.md +89 -0
- package/skills/secure-fuzz-testing/SKILL.md +7 -1
- package/skills/self-evolving-memory-graph/SKILL.md +90 -74
- package/skills/self-healing-cloud-orchestrator/SKILL.md +57 -57
- package/skills/senior-frontend/SKILL.md +141 -161
- package/skills/seo/SKILL.md +41 -17
- package/skills/session-context-loader/SKILL.md +82 -76
- package/skills/session-handoff-resume/SKILL.md +7 -1
- package/skills/{skill_baru → skill-baru}/SKILL.md +8 -2
- package/skills/solidjs-expert/SKILL.md +80 -0
- package/skills/spa-orchestrator/SKILL.md +20 -1
- package/skills/sse-websocket-streaming-expert/SKILL.md +93 -0
- package/skills/state-management-expert/SKILL.md +7 -1
- package/skills/supabase-migration/SKILL.md +47 -1
- package/skills/supabase-security-expert/SKILL.md +7 -1
- package/skills/svelte-sveltekit-expert/SKILL.md +91 -0
- package/skills/svg-animation-motion-expert/SKILL.md +115 -0
- package/skills/tailwind-expert/SKILL.md +88 -136
- package/skills/tanstack-query-expert/SKILL.md +7 -1
- package/skills/tauri-expert/SKILL.md +7 -1
- package/skills/token-saver/SKILL.md +1 -1
- package/skills/typescript-expert/SKILL.md +12 -6
- package/skills/ui-components-expert/SKILL.md +165 -279
- package/skills/ui-ux-pro-max/SKILL.md +23 -3
- package/skills/vector-db-rag-expert/SKILL.md +175 -19
- package/skills/vibe-code-gardener/SKILL.md +1 -1
- package/skills/visual-qa-vision-agent/SKILL.md +70 -64
- package/skills/voice-ai-realtime-agent/SKILL.md +202 -0
- package/skills/vue-frontend-expert/SKILL.md +131 -125
- package/skills/wasm-edge-computing-expert/SKILL.md +97 -0
- package/skills/web-3d-graphics-expert/SKILL.md +136 -130
- package/skills/web-game-engine-expert/SKILL.md +101 -95
- package/skills/web-scraper/SKILL.md +157 -207
- package/skills/website-design-cloner/SKILL.md +179 -173
- package/skills/webxr-ar-vr-expert/SKILL.md +122 -116
- package/skills/wordpress-headless-expert/SKILL.md +144 -0
- package/skills/zero-to-prod-orchestrator/SKILL.md +52 -27
- package/skills/zero-trust-secret-vault/SKILL.md +87 -39
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/workflows/publish.yml +0 -20
- package/CONTRIBUTING.md +0 -199
- package/SECURITY.md +0 -21
- package/banner.png +0 -0
- package/skills/autonomous-swarm-director/SKILL.md +0 -69
- package/skills/hyper-context-synthesizer/SKILL.md +0 -55
- package/skills/llm-cost-arbitrage-router/SKILL.md +0 -59
- package/skills/senior-fullstack/SKILL.md +0 -167
- package/skills/senior-fullstack/references/architecture_patterns.md +0 -160
- package/skills/senior-fullstack/references/development_workflows.md +0 -222
- package/skills/senior-fullstack/references/tech_stack_guide.md +0 -190
- package/skills/senior-fullstack/scripts/code_quality_analyzer.py +0 -114
- package/skills/senior-fullstack/scripts/fullstack_scaffolder.py +0 -114
- package/skills/senior-fullstack/scripts/project_scaffolder.py +0 -114
- package/skills/seo-aeo-landing-page-writer/SKILL.md +0 -97
- package/skills/seo-geo/SKILL.md +0 -188
- 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_expert/SKILL.md +0 -125
- package/vibes-swarm-demo.gif +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: multiple-entry-points
|
|
3
3
|
description: "Expert guide for designing and implementing Multiple Entry Points architecture in web applications / Panduan ahli untuk merancang dan mengimplementasikan arsitektur Multiple Entry Points pada aplikasi web."
|
|
4
|
-
author: "
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Multiple Entry Points Architecture
|
|
@@ -13,6 +13,9 @@ author: "Antigravity"
|
|
|
13
13
|
<a name="english"></a>
|
|
14
14
|
## English
|
|
15
15
|
|
|
16
|
+
### Orchestration & Integration
|
|
17
|
+
Connects and orchestrates with relevant domain skills like `brainstorming`, `zero-to-prod-orchestrator`, and `project-context-mapper` to ensure cohesive execution.
|
|
18
|
+
|
|
16
19
|
### Description
|
|
17
20
|
This skill outlines the architectural pattern of using Multiple Entry Points in a web application. Instead of forcing all traffic through a single Front Controller (like a monolithic `index.php`), the application separates traffic logically into distinct entry files such as `index.php` (public), `admin.php`, and `api.php`. This provides stronger isolation, optimized loading, and stricter security boundaries.
|
|
18
21
|
|
|
@@ -22,6 +25,30 @@ This skill outlines the architectural pattern of using Multiple Entry Points in
|
|
|
22
25
|
3. **Security Boundaries**: By physically separating entry points, you can apply distinct server-level security rules (via `.htaccess`, Nginx configurations, or WAF). For example, you can restrict access to `admin.php` to specific internal IP addresses or enforce mutual TLS.
|
|
23
26
|
4. **Frontend Asset Bundling (Vite / Webpack)**: In a modern frontend context (especially for MPAs), define multiple entry points in the bundler configuration. This generates separate, optimized JavaScript and CSS bundles for the public site versus the complex admin dashboard, drastically reducing overall payload sizes for general users.
|
|
24
27
|
|
|
28
|
+
### Implementation Checklist
|
|
29
|
+
- [ ] Create separate HTML entry points in the root/public directory (e.g., `index.html`, `admin.html`).
|
|
30
|
+
- [ ] Configure the frontend bundler (Vite/Webpack) to output multiple bundles.
|
|
31
|
+
- [ ] Set up server-side routing (Nginx or Node.js) to serve the correct entry HTML based on the URL path.
|
|
32
|
+
- [ ] Ensure shared components and utilities are properly tree-shaken and split into common chunks.
|
|
33
|
+
|
|
34
|
+
### Example: Vite Config for Multiple Entries
|
|
35
|
+
```javascript
|
|
36
|
+
import { defineConfig } from 'vite';
|
|
37
|
+
import { resolve } from 'path';
|
|
38
|
+
|
|
39
|
+
export default defineConfig({
|
|
40
|
+
build: {
|
|
41
|
+
rollupOptions: {
|
|
42
|
+
input: {
|
|
43
|
+
main: resolve(__dirname, 'index.html'),
|
|
44
|
+
admin: resolve(__dirname, 'admin.html'),
|
|
45
|
+
app: resolve(__dirname, 'app.html')
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
25
52
|
### Orchestration with Other Skills
|
|
26
53
|
- **With `mpa-orchestrator`**: In a Multi-Page Application, multiple entry points allow you to split heavy dashboard assets from fast-loading public marketing pages, enhancing both SEO and performance.
|
|
27
54
|
- **With `mvc-expert`**: Each entry point acts as a distinct Front Controller, initiating its own lightweight Router instance configured specifically for that domain's controllers (e.g., an AdminRouter vs an ApiRouter).
|
|
@@ -36,6 +63,9 @@ This skill outlines the architectural pattern of using Multiple Entry Points in
|
|
|
36
63
|
<a name="bahasa-indonesia"></a>
|
|
37
64
|
## Bahasa Indonesia
|
|
38
65
|
|
|
66
|
+
### Integrasi Orkestrasi
|
|
67
|
+
Terhubung dan mengorkestrasi skill domain yang relevan seperti `brainstorming`, `zero-to-prod-orchestrator`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.
|
|
68
|
+
|
|
39
69
|
### Deskripsi
|
|
40
70
|
Skill ini menguraikan pola arsitektur menggunakan *Multiple Entry Points* dalam aplikasi web. Alih-alih memaksa semua lalu lintas (traffic) melalui satu Front Controller tunggal (seperti `index.php` monolitik), aplikasi memisahkan lalu lintas secara logis ke dalam file entri yang berbeda seperti `index.php` (publik), `admin.php`, dan `api.php`. Pola ini memberikan isolasi yang lebih kuat, pemuatan (loading) yang dioptimalkan, dan batas keamanan yang lebih ketat.
|
|
41
71
|
|
|
@@ -45,6 +75,12 @@ Skill ini menguraikan pola arsitektur menggunakan *Multiple Entry Points* dalam
|
|
|
45
75
|
3. **Batas Keamanan (Security Boundaries)**: Dengan memisahkan titik masuk secara fisik, Anda dapat menerapkan aturan keamanan tingkat server yang berbeda (melalui `.htaccess`, konfigurasi Nginx, atau WAF). Misalnya, membatasi akses ke `admin.php` hanya untuk alamat IP internal tertentu.
|
|
46
76
|
4. **Bundling Aset Frontend (Vite / Webpack)**: Dalam konteks frontend modern (khususnya untuk MPA), tentukan beberapa *entry points* pada konfigurasi *bundler*. Ini akan menghasilkan bundel JavaScript dan CSS yang terpisah dan optimal antara situs publik dan dashboard admin, sehingga secara drastis mengurangi ukuran *payload* bagi pengguna umum.
|
|
47
77
|
|
|
78
|
+
### Checklist Implementasi
|
|
79
|
+
- [ ] Buat titik entri HTML terpisah di direktori utama/publik (misal: `index.html`, `admin.html`).
|
|
80
|
+
- [ ] Konfigurasi bundler frontend (Vite/Webpack) untuk menghasilkan multiple bundle.
|
|
81
|
+
- [ ] Siapkan routing di sisi server (Nginx atau Node.js) untuk menyajikan HTML entri yang benar berdasarkan path URL.
|
|
82
|
+
- [ ] Pastikan komponen dan utilitas yang dipakai bersama dioptimalkan (tree-shaking) dan dipisah ke dalam *common chunks*.
|
|
83
|
+
|
|
48
84
|
### Orkestrasi dengan Skill Lain
|
|
49
85
|
- **Dengan `mpa-orchestrator`**: Dalam aplikasi MPA, penggunaan beberapa *entry point* memungkinkan Anda memisahkan aset dashboard yang berat dari halaman *marketing* publik yang butuh kecepatan muat tinggi, sehingga meningkatkan SEO dan performa sekaligus.
|
|
50
86
|
- **Dengan `mvc-expert`**: Setiap *entry point* bertindak sebagai Front Controller yang terpisah, menginisiasi instans Router yang ringan dan dikonfigurasi khusus untuk controller di domain tersebut (misalnya AdminRouter vs ApiRouter).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mvc-expert
|
|
3
3
|
description: "Expert guidelines to refactor legacy PHP codebases into clean, modern, and scalable MVC-structured projects / Pedoman ahli untuk merefaktor codebase PHP lama menjadi proyek terstruktur MVC yang bersih, modern, dan skalabel."
|
|
4
|
-
author: "
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# PHP MVC Expert & Modernization
|
|
@@ -13,6 +13,9 @@ author: "Antigravity"
|
|
|
13
13
|
<a name="english"></a>
|
|
14
14
|
## English
|
|
15
15
|
|
|
16
|
+
### Orchestration & Integration
|
|
17
|
+
Connects and orchestrates with relevant domain skills like `brainstorming`, `zero-to-prod-orchestrator`, and `project-context-mapper` to ensure cohesive execution.
|
|
18
|
+
|
|
16
19
|
### Description
|
|
17
20
|
This skill provides the agent with structured protocols, coding patterns, and architectural guidelines to audit, refactor, and modernize legacy/obsolete PHP codebases (plain spaghetti PHP) into a clean, modern, secure, and scalable Model-View-Controller (MVC) structure adhering to PSR standards and modern PHP (v8.2+) capabilities.
|
|
18
21
|
|
|
@@ -124,6 +127,9 @@ Active whenever the user requests to:
|
|
|
124
127
|
<a name="bahasa-indonesia"></a>
|
|
125
128
|
## Bahasa Indonesia
|
|
126
129
|
|
|
130
|
+
### Integrasi Orkestrasi
|
|
131
|
+
Terhubung dan mengorkestrasi skill domain yang relevan seperti `brainstorming`, `zero-to-prod-orchestrator`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.
|
|
132
|
+
|
|
127
133
|
### Deskripsi
|
|
128
134
|
Skill ini memberikan protokol terstruktur, pola penulisan kode, dan panduan arsitektur bagi agen untuk melakukan audit, refaktorisasi, dan modernisasi terhadap codebase PHP lama yang usang (Plain Spaghetti PHP) menjadi struktur Model-View-Controller (MVC) yang bersih, modern, aman, dan skalabel yang mematuhi standar PSR serta kemampuan PHP modern (v8.2+).
|
|
129
135
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: n8n-automation-expert
|
|
3
|
+
description: "Expert guide for workflow automation (n8n, Zapier, Make), custom nodes, webhook triggers, and AI-powered automation chains / Panduan ahli otomasi workflow (n8n, Zapier, Make), custom nodes, webhook triggers, dan rantai otomasi berbasis AI."
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Workflow Automation Expert (2026 Edition)
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Orchestration & Integration
|
|
17
|
+
- **`cron-scheduler-expert`**: Scheduled triggers for automation workflows.
|
|
18
|
+
- **`ai-llm-integration-expert`**: AI-powered automation steps and LLM chains.
|
|
19
|
+
- **`email-notification-expert`**: Email triggers and notification actions.
|
|
20
|
+
- **`webhook-receiver`**: Webhook endpoints as automation triggers.
|
|
21
|
+
|
|
22
|
+
### Description
|
|
23
|
+
Expert guide for building automation workflows with n8n (self-hosted, open-source), Zapier, and Make (Integromat). Covers workflow design, custom n8n nodes, webhook triggers, AI chains within workflows, error handling, credential management, and integration patterns with databases, APIs, and messaging platforms.
|
|
24
|
+
|
|
25
|
+
### Trigger Conditions
|
|
26
|
+
- Building automated workflows connecting multiple services.
|
|
27
|
+
- Setting up n8n for self-hosted automation.
|
|
28
|
+
- Creating AI-powered automation pipelines.
|
|
29
|
+
- Integrating no-code/low-code automation with custom applications.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### Platform Selection
|
|
34
|
+
|
|
35
|
+
| Platform | Hosting | Custom Code | AI Support | Pricing | Best For |
|
|
36
|
+
|----------|---------|-------------|------------|---------|----------|
|
|
37
|
+
| n8n | Self-hosted/Cloud | ✅ Full | ✅ AI nodes | Free (self) | Developers, privacy |
|
|
38
|
+
| Zapier | Cloud only | Limited | ✅ AI actions | $29+/mo | Non-technical teams |
|
|
39
|
+
| Make | Cloud only | ✅ Modules | ✅ AI modules | $10+/mo | Visual workflows |
|
|
40
|
+
|
|
41
|
+
**Recommendation:** Use **n8n** for developer teams needing full control and self-hosting. Use **Zapier** for simple integrations by non-technical users.
|
|
42
|
+
|
|
43
|
+
### n8n Core Patterns
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
// Custom n8n node — AI Content Processor
|
|
47
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
48
|
+
|
|
49
|
+
export class AiContentProcessor implements INodeType {
|
|
50
|
+
description: INodeTypeDescription = {
|
|
51
|
+
displayName: 'AI Content Processor',
|
|
52
|
+
name: 'aiContentProcessor',
|
|
53
|
+
group: ['transform'],
|
|
54
|
+
version: 1,
|
|
55
|
+
inputs: ['main'],
|
|
56
|
+
outputs: ['main'],
|
|
57
|
+
properties: [
|
|
58
|
+
{ displayName: 'Prompt Template', name: 'prompt', type: 'string', default: '' },
|
|
59
|
+
{ displayName: 'Model', name: 'model', type: 'options', options: [
|
|
60
|
+
{ name: 'GPT-4o', value: 'gpt-4o' },
|
|
61
|
+
{ name: 'Claude 4 Sonnet', value: 'claude-4-sonnet' },
|
|
62
|
+
], default: 'gpt-4o' },
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
|
67
|
+
const items = this.getInputData();
|
|
68
|
+
const prompt = this.getNodeParameter('prompt', 0) as string;
|
|
69
|
+
// Process each item with AI...
|
|
70
|
+
return [items];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Orchestration & Integration
|
|
76
|
+
- `cron-scheduler-expert`, `ai-llm-integration-expert`, `webhook-receiver`
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
<a name="bahasa-indonesia"></a>
|
|
81
|
+
## Bahasa Indonesia
|
|
82
|
+
|
|
83
|
+
### Deskripsi
|
|
84
|
+
Panduan ahli untuk membangun alur kerja otomatis dengan n8n, Zapier, dan Make. Mencakup desain workflow, custom nodes n8n, webhook triggers, rantai AI, dan integrasi dengan database dan API.
|
|
85
|
+
|
|
86
|
+
### Kondisi Pemicu
|
|
87
|
+
- Membangun alur kerja otomatis yang menghubungkan beberapa layanan.
|
|
88
|
+
- Menyiapkan n8n untuk otomasi self-hosted.
|
|
89
|
+
- Membuat pipeline otomasi berbasis AI.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nextjs-app-router-expert
|
|
3
|
+
description: "Expert guide for Next.js 15 App Router: RSC, Server Actions, Middleware, Parallel/Intercepting Routes, Streaming, and Caching strategies / Panduan ahli untuk Next.js 15 App Router."
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Next.js 15 App Router Expert
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Description
|
|
17
|
+
Execute advanced Next.js 15 App Router architectural patterns: React Server Components (RSC), React 19 Server Actions, Middleware routing, Parallel/Intercepting Routes, Streaming/Suspense, Partial Prerendering (PPR), and explicit cache invalidation.
|
|
18
|
+
|
|
19
|
+
### Trigger Conditions
|
|
20
|
+
- Architecting new Next.js 15 `app/` directory applications.
|
|
21
|
+
- Migrating `pages/` directory to App Router.
|
|
22
|
+
- Implementing complex UI patterns (modals via Intercepting Routes).
|
|
23
|
+
- Debugging caching (`force-cache`, `revalidatePath`, tags).
|
|
24
|
+
- Building interfaces requiring Partial Prerendering (PPR) or Streaming.
|
|
25
|
+
|
|
26
|
+
### Core Architectural Patterns
|
|
27
|
+
|
|
28
|
+
#### 1. React Server Components (RSC) vs Client Components
|
|
29
|
+
- **Default to Server**: All `app/` components are Server Components. No hooks (`useState`) or browser APIs.
|
|
30
|
+
- **Client Boundaries**: Add `"use client"` only for interactivity/browser APIs. Push client boundaries down the component tree.
|
|
31
|
+
- **Interleaving**: Pass Server Components as `children` to Client Components; do not import Server Components into Client Components directly.
|
|
32
|
+
|
|
33
|
+
#### 2. React 19 Server Actions
|
|
34
|
+
Use Server Actions (`useActionState`) for all mutations. Avoid separate API routes.
|
|
35
|
+
```typescript
|
|
36
|
+
'use server'
|
|
37
|
+
|
|
38
|
+
import { revalidateTag } from 'next/cache';
|
|
39
|
+
import { z } from 'zod';
|
|
40
|
+
import { db } from '@/lib/db';
|
|
41
|
+
|
|
42
|
+
const schema = z.object({ email: z.string().email() });
|
|
43
|
+
|
|
44
|
+
export async function subscribeUser(prevState: any, formData: FormData) {
|
|
45
|
+
const parsed = schema.safeParse({ email: formData.get('email') });
|
|
46
|
+
|
|
47
|
+
if (!parsed.success) return { error: 'Invalid email' };
|
|
48
|
+
|
|
49
|
+
await db.subscribers.insert({ email: parsed.data.email });
|
|
50
|
+
revalidateTag('subscribers');
|
|
51
|
+
return { success: true };
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
#### 3. Parallel & Intercepting Routes (Modals)
|
|
56
|
+
Render modals preserving background page context and URL shareability.
|
|
57
|
+
- **Intercepting (`(.)[segment]`)**: Matches route on client-side navigation.
|
|
58
|
+
- **Parallel (`@modal`)**: Renders simultaneously with `layout.tsx` children.
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
app/
|
|
62
|
+
├── @modal/
|
|
63
|
+
│ ├── (.)photos/[id]/page.tsx
|
|
64
|
+
│ └── default.tsx
|
|
65
|
+
├── photos/
|
|
66
|
+
│ └── [id]/page.tsx
|
|
67
|
+
├── layout.tsx
|
|
68
|
+
└── page.tsx
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### 4. Caching & Data Fetching (Next.js 15)
|
|
72
|
+
Fetch requests are **not cached by default**. Opt-in explicitly:
|
|
73
|
+
```typescript
|
|
74
|
+
// Indefinite cache
|
|
75
|
+
const res = await fetch('https://api.example.com/data', { cache: 'force-cache' });
|
|
76
|
+
|
|
77
|
+
// Time-Based Revalidation (ISR)
|
|
78
|
+
const res = await fetch('https://api.example.com/data', { next: { revalidate: 3600 } });
|
|
79
|
+
|
|
80
|
+
// On-Demand Revalidation
|
|
81
|
+
const res = await fetch('https://api.example.com/data', { next: { tags: ['collection'] } });
|
|
82
|
+
// In server action: revalidateTag('collection')
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
#### 5. Streaming & Partial Prerendering (PPR)
|
|
86
|
+
Wrap slow fetches in `<Suspense>` to stream UI instantly:
|
|
87
|
+
```tsx
|
|
88
|
+
import { Suspense } from 'react';
|
|
89
|
+
import { Skeleton } from '@/components/ui/skeleton';
|
|
90
|
+
|
|
91
|
+
export default function DashboardPage() {
|
|
92
|
+
return (
|
|
93
|
+
<main>
|
|
94
|
+
<h1>Dashboard</h1>
|
|
95
|
+
<Suspense fallback={<Skeleton className="h-64 w-full" />}>
|
|
96
|
+
<SlowRevenueChart />
|
|
97
|
+
</Suspense>
|
|
98
|
+
</main>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Orchestration & Integration
|
|
104
|
+
- **`senior-frontend`**: Enhances UI/UX with Next.js App Router RSC and Next 15 caching.
|
|
105
|
+
- **`js-backend-expert`**: Bridges frontend Server Actions with backend Node.js/Bun architectures.
|
|
106
|
+
- **`tanstack-query-expert`**: Manages client-side state hydration from RSC.
|
|
107
|
+
- **`performance-web-vitals`**: Optimizes Core Web Vitals using Streaming and PPR.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
<a name="bahasa-indonesia"></a>
|
|
112
|
+
## Bahasa Indonesia
|
|
113
|
+
|
|
114
|
+
### Deskripsi
|
|
115
|
+
Terapkan pola arsitektur lanjutan Next.js 15 App Router: React Server Components (RSC), React 19 Server Actions, Middleware, Parallel/Intercepting Routes, Streaming/Suspense, Partial Prerendering (PPR), dan invalidasi cache eksplisit.
|
|
116
|
+
|
|
117
|
+
### Kondisi Pemicu
|
|
118
|
+
- Merancang aplikasi Next.js 15 `app/` direktori baru.
|
|
119
|
+
- Migrasi direktori `pages/` ke App Router.
|
|
120
|
+
- Implementasi pola UI kompleks (modal via Intercepting Routes).
|
|
121
|
+
- Debugging cache (`force-cache`, `revalidatePath`, tags).
|
|
122
|
+
- Membangun antarmuka dengan Partial Prerendering (PPR) atau Streaming.
|
|
123
|
+
|
|
124
|
+
### Pola Arsitektur Inti
|
|
125
|
+
|
|
126
|
+
#### 1. RSC vs Client Components
|
|
127
|
+
- **Default Server**: Semua komponen `app/` adalah Server Components. Tanpa hooks/API browser.
|
|
128
|
+
- **Batas Klien**: Tambahkan `"use client"` hanya untuk interaktivitas. Dorong batas klien ke bawah struktur komponen.
|
|
129
|
+
- **Interleaving**: Berikan Server Components sebagai `children` ke Client Components; jangan impor langsung.
|
|
130
|
+
|
|
131
|
+
#### 2. React 19 Server Actions
|
|
132
|
+
Gunakan Server Actions (`useActionState`) untuk mutasi. Hindari pembuatan API routes terpisah.
|
|
133
|
+
Validasi input di server dengan Zod dan gunakan `revalidateTag` untuk perbarui UI.
|
|
134
|
+
|
|
135
|
+
#### 3. Parallel & Intercepting Routes
|
|
136
|
+
Gunakan untuk modal. Mencegat rute navigasi client-side (URL berubah, modal di atas halaman saat ini). Refresh langsung memuat halaman penuh.
|
|
137
|
+
|
|
138
|
+
#### 4. Caching di Next.js 15
|
|
139
|
+
Fungsi `fetch` **tidak di-cache default**. Aktifkan eksplisit via `{ cache: 'force-cache' }` atau `{ next: { revalidate: 3600 } }`. Gunakan cache tags untuk invalidasi spesifik.
|
|
140
|
+
|
|
141
|
+
#### 5. Streaming & Partial Prerendering (PPR)
|
|
142
|
+
Bungkus pengambilan data lambat dengan `<Suspense>` untuk menampilkan UI awal seketika sambil menunggu data (streaming).
|
|
143
|
+
|
|
144
|
+
## Integrasi Orkestrasi
|
|
145
|
+
- **`senior-frontend`**: Menguatkan UI/UX dengan pemahaman arsitektur RSC dan cache Next 15.
|
|
146
|
+
- **`js-backend-expert`**: Menghubungkan Server Actions dengan arsitektur backend Node.js/Bun.
|
|
147
|
+
- **`tanstack-query-expert`**: Mengelola hidrasi state client-side dari RSC.
|
|
148
|
+
- **`performance-web-vitals`**: Optimalisasi Core Web Vitals menggunakan Streaming dan PPR.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openapi-swagger-codegen-expert
|
|
3
|
+
description: "OpenAPI 3.1 spec authoring, Swagger UI, automatic client/server code generation (openapi-typescript, Orval, Kiota), contract testing / Penulisan spesifikasi OpenAPI 3.1, Swagger UI, pembuatan kode klien/server otomatis, dan pengujian kontrak."
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# OpenAPI & Swagger Codegen Expert
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Description
|
|
17
|
+
Dedicated expert guide for API contract-first development using OpenAPI 3.1, Swagger UI, and automated code generation. Covers generating strictly typed API clients (using `openapi-typescript`, `Orval`, or Microsoft `Kiota`), scaffolding server stubs, and implementing contract testing to ensure backend APIs always match their documentation.
|
|
18
|
+
|
|
19
|
+
### Trigger Conditions
|
|
20
|
+
- Setting up API documentation (Swagger UI, Redoc, Scalar).
|
|
21
|
+
- Generating API client code for frontend/mobile apps.
|
|
22
|
+
- Authoring OpenAPI 3.x specifications (`openapi.yaml` or JSON).
|
|
23
|
+
- Implementing contract testing (e.g., using Dredd or Prism).
|
|
24
|
+
- Migrating from manual fetch wrappers to auto-generated typed API clients.
|
|
25
|
+
|
|
26
|
+
### Best Practices & Workflow
|
|
27
|
+
|
|
28
|
+
1. **Contract-First Approach**: Always write or define the OpenAPI specification before writing any backend code. This serves as the single source of truth for both frontend and backend teams.
|
|
29
|
+
2. **Strict Type Generation**:
|
|
30
|
+
- Use `openapi-typescript` for generating raw TS definitions.
|
|
31
|
+
- Use `Orval` for generating React Query (TanStack Query) hooks directly from the OpenAPI spec.
|
|
32
|
+
- Use Microsoft `Kiota` for multi-language SDK generation.
|
|
33
|
+
3. **Automated Validation**: Integrate API schema validation in the CI/CD pipeline using tools like `Spectral` to enforce API design standards.
|
|
34
|
+
4. **Mocking**: Use tools like `Prism` to spin up mock servers from the OpenAPI spec, allowing frontend teams to start development immediately.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
<a name="bahasa-indonesia"></a>
|
|
39
|
+
## Bahasa Indonesia
|
|
40
|
+
|
|
41
|
+
### Integrasi Orkestrasi
|
|
42
|
+
Terhubung dan mengorkestrasi skill domain yang relevan seperti `brainstorming`, `zero-to-prod-orchestrator`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.
|
|
43
|
+
|
|
44
|
+
### Deskripsi
|
|
45
|
+
Panduan ahli khusus untuk pengembangan API dengan pendekatan *contract-first* menggunakan OpenAPI 3.1, Swagger UI, dan otomatisasi pembuatan kode (codegen). Mencakup pembuatan klien API yang *strictly typed* (menggunakan `openapi-typescript`, `Orval`, atau Microsoft `Kiota`), *scaffolding* untuk server, dan implementasi *contract testing* untuk memastikan backend selalu sesuai dengan dokumentasinya.
|
|
46
|
+
|
|
47
|
+
### Kondisi Pemicu
|
|
48
|
+
- Mengatur dokumentasi API (Swagger UI, Redoc, Scalar).
|
|
49
|
+
- Men-generate kode klien API untuk aplikasi frontend/mobile.
|
|
50
|
+
- Menulis spesifikasi OpenAPI 3.x (`openapi.yaml` atau JSON).
|
|
51
|
+
- Mengimplementasikan *contract testing* (misalnya menggunakan Dredd atau Prism).
|
|
52
|
+
- Migrasi dari wrapper `fetch` manual ke klien API yang otomatis ter-generate dan *typed*.
|
|
53
|
+
|
|
54
|
+
### Panduan Implementasi
|
|
55
|
+
|
|
56
|
+
1. **Pendekatan Contract-First**: Selalu tulis/definisikan spesifikasi OpenAPI sebelum menulis kode backend. Ini menjadi sumber kebenaran tunggal (*single source of truth*) untuk tim frontend dan backend.
|
|
57
|
+
2. **Pembuatan Tipe yang Ketat (Strict Type Generation)**:
|
|
58
|
+
- Gunakan `openapi-typescript` untuk menghasilkan definisi TypeScript murni.
|
|
59
|
+
- Gunakan `Orval` untuk men-generate React Query (TanStack Query) hooks secara otomatis dari spek OpenAPI.
|
|
60
|
+
- Gunakan Microsoft `Kiota` untuk pembuatan SDK multi-bahasa.
|
|
61
|
+
3. **Validasi Otomatis**: Integrasikan validasi skema API di pipeline CI/CD menggunakan tool seperti `Spectral` untuk memastikan standar desain API terpenuhi.
|
|
62
|
+
4. **Mocking**: Gunakan tool seperti `Prism` untuk menjalankan mock server dari spesifikasi OpenAPI, memungkinkan tim frontend memulai pengembangan tanpa harus menunggu backend selesai.
|
|
63
|
+
|
|
64
|
+
## Orchestration & Integration
|
|
65
|
+
- Connects to `api-design-expert` for the core design rules.
|
|
66
|
+
- Connects to `ci-cd-devops-architect` to implement CI/CD validation.
|
|
67
|
+
- Connects to `senior-frontend` / `tanstack-query-expert` to consume the generated clients.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: payment-gateway-expert
|
|
3
3
|
description: "Expert guide for integrating payment gateways (Stripe, PayPal, Xendit, Midtrans, DOKU) and secure webhooks into SaaS platforms / Panduan ahli integrasi payment gateway dan webhook aman."
|
|
4
|
-
author: "
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Payment Gateway Expert / Ahli Payment Gateway
|
|
@@ -23,6 +23,48 @@ Expert guide for integrating major payment gateways (Stripe, PayPal, Xendit, Mid
|
|
|
23
23
|
- **Subscription Management**: Map the provider's subscription statuses (e.g., `active`, `past_due`, `canceled`) accurately to the SaaS platform's internal state machine.
|
|
24
24
|
- **Testing**: Use sandbox/test environments provided by the gateways and simulate webhooks using CLI tools (like Stripe CLI) during development.
|
|
25
25
|
|
|
26
|
+
### Implementation Checklist
|
|
27
|
+
- [ ] Create a dedicated Webhook endpoint (e.g., `/api/webhooks/stripe`).
|
|
28
|
+
- [ ] Use raw request body for signature verification (do not parse JSON before verification).
|
|
29
|
+
- [ ] Ensure idempotency by tracking processed event IDs in the database.
|
|
30
|
+
- [ ] Update local user/subscription state transactionally upon success.
|
|
31
|
+
- [ ] Handle asynchronous failures with a dead-letter queue or retry mechanism.
|
|
32
|
+
|
|
33
|
+
### Example: Stripe Webhook Signature Verification (Next.js App Router)
|
|
34
|
+
```typescript
|
|
35
|
+
import Stripe from 'stripe';
|
|
36
|
+
import { headers } from 'next/headers';
|
|
37
|
+
|
|
38
|
+
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
|
|
39
|
+
|
|
40
|
+
export async function POST(req: Request) {
|
|
41
|
+
const body = await req.text(); // Raw body required for signature
|
|
42
|
+
const signature = headers().get('Stripe-Signature') as string;
|
|
43
|
+
|
|
44
|
+
let event: Stripe.Event;
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
event = stripe.webhooks.constructEvent(
|
|
48
|
+
body,
|
|
49
|
+
signature,
|
|
50
|
+
process.env.STRIPE_WEBHOOK_SECRET!
|
|
51
|
+
);
|
|
52
|
+
} catch (err: any) {
|
|
53
|
+
return new Response(`Webhook Error: ${err.message}`, { status: 400 });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Handle the event
|
|
57
|
+
if (event.type === 'checkout.session.completed') {
|
|
58
|
+
// Process successful payment, check idempotency, update DB
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return new Response(JSON.stringify({ received: true }), { status: 200 });
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Orchestration & Integration
|
|
66
|
+
- Integrates with: `saas-billing`, `doku-payment-gateway`, `saas-mvp-launcher`.
|
|
67
|
+
|
|
26
68
|
### Trigger Conditions
|
|
27
69
|
Active whenever the user is working on billing integration, payment checkout, webhook handling, or integrating platforms like PayPal, Stripe, Xendit, Midtrans, or DOKU.
|
|
28
70
|
|
|
@@ -41,5 +83,47 @@ Panduan ahli untuk mengintegrasikan payment gateway utama (Stripe, PayPal, Xendi
|
|
|
41
83
|
- **Manajemen Langganan**: Petakan status langganan dari provider (misal: `active`, `past_due`, `canceled`) secara akurat ke state machine internal platform SaaS.
|
|
42
84
|
- **Pengujian**: Gunakan lingkungan sandbox/test yang disediakan oleh gateway dan simulasikan webhook menggunakan tool CLI (seperti Stripe CLI) selama pengembangan.
|
|
43
85
|
|
|
86
|
+
### Checklist Implementasi
|
|
87
|
+
- [ ] Buat endpoint Webhook khusus (misal: `/api/webhooks/stripe`).
|
|
88
|
+
- [ ] Gunakan raw request body untuk verifikasi signature (jangan parse JSON sebelum verifikasi).
|
|
89
|
+
- [ ] Pastikan idempotensi dengan melacak ID event yang sudah diproses di database.
|
|
90
|
+
- [ ] Perbarui state langganan/pengguna lokal secara transaksional saat sukses.
|
|
91
|
+
- [ ] Tangani kegagalan asinkron dengan dead-letter queue atau mekanisme retry.
|
|
92
|
+
|
|
93
|
+
### Contoh: Verifikasi Signature Webhook Stripe (Next.js App Router)
|
|
94
|
+
```typescript
|
|
95
|
+
import Stripe from 'stripe';
|
|
96
|
+
import { headers } from 'next/headers';
|
|
97
|
+
|
|
98
|
+
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
|
|
99
|
+
|
|
100
|
+
export async function POST(req: Request) {
|
|
101
|
+
const body = await req.text(); // Raw body dibutuhkan untuk signature
|
|
102
|
+
const signature = headers().get('Stripe-Signature') as string;
|
|
103
|
+
|
|
104
|
+
let event: Stripe.Event;
|
|
105
|
+
|
|
106
|
+
try {
|
|
107
|
+
event = stripe.webhooks.constructEvent(
|
|
108
|
+
body,
|
|
109
|
+
signature,
|
|
110
|
+
process.env.STRIPE_WEBHOOK_SECRET!
|
|
111
|
+
);
|
|
112
|
+
} catch (err: any) {
|
|
113
|
+
return new Response(`Webhook Error: ${err.message}`, { status: 400 });
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Tangani event
|
|
117
|
+
if (event.type === 'checkout.session.completed') {
|
|
118
|
+
// Proses pembayaran sukses, cek idempotensi, update DB
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return new Response(JSON.stringify({ received: true }), { status: 200 });
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Integrasi Orkestrasi
|
|
126
|
+
- Terintegrasi dengan: `saas-billing`, `doku-payment-gateway`, `saas-mvp-launcher`.
|
|
127
|
+
|
|
44
128
|
### Kondisi Pemicu
|
|
45
129
|
Aktif setiap kali pengguna sedang mengerjakan integrasi billing, checkout pembayaran, penanganan webhook, atau mengintegrasikan platform seperti PayPal, Stripe, Xendit, Midtrans, atau DOKU.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pdf-document-generation-expert
|
|
3
|
+
description: "Expert guide for PDF generation and document processing (React PDF, Puppeteer, jsPDF, pdf-lib) / Panduan ahli generasi PDF dan pemrosesan dokumen (React PDF, Puppeteer, jsPDF, pdf-lib)."
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# PDF & Document Generation Expert (2026 Edition)
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Orchestration & Integration
|
|
17
|
+
- **`email-notification-expert`**: PDF attachments in transactional emails.
|
|
18
|
+
- **`saas-billing`**: Invoice and receipt PDF generation.
|
|
19
|
+
- **`file-upload-media-expert`**: PDF storage and CDN delivery.
|
|
20
|
+
|
|
21
|
+
### Description
|
|
22
|
+
Expert guide for generating PDFs and processing documents in web applications. Covers React PDF (@react-pdf/renderer), Puppeteer HTML-to-PDF, jsPDF, pdf-lib, invoice generation, report templates, digital signatures, and document parsing.
|
|
23
|
+
|
|
24
|
+
### Trigger Conditions
|
|
25
|
+
- Generating invoices, receipts, or reports as PDFs.
|
|
26
|
+
- Converting HTML pages to downloadable PDFs.
|
|
27
|
+
- Building document templates with dynamic data.
|
|
28
|
+
- Implementing digital signatures on PDF documents.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
### Library Selection
|
|
33
|
+
|
|
34
|
+
| Library | Approach | Server/Client | Best For |
|
|
35
|
+
|---------|----------|---------------|----------|
|
|
36
|
+
| @react-pdf/renderer | React components → PDF | Both | Complex layouts |
|
|
37
|
+
| Puppeteer | HTML → PDF (headless Chrome) | Server | Pixel-perfect from HTML |
|
|
38
|
+
| jsPDF | Programmatic canvas | Client | Simple client-side PDFs |
|
|
39
|
+
| pdf-lib | Low-level PDF manipulation | Both | Modify existing PDFs |
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
// React PDF — Invoice generation
|
|
43
|
+
import { Document, Page, Text, View, StyleSheet, renderToBuffer } from '@react-pdf/renderer';
|
|
44
|
+
|
|
45
|
+
const styles = StyleSheet.create({
|
|
46
|
+
page: { padding: 40, fontSize: 12 },
|
|
47
|
+
header: { fontSize: 24, marginBottom: 20, color: '#8B5CF6' },
|
|
48
|
+
row: { flexDirection: 'row', justifyContent: 'space-between', marginBottom: 8 },
|
|
49
|
+
total: { fontSize: 16, fontWeight: 'bold', borderTopWidth: 1, paddingTop: 8, marginTop: 16 },
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
function InvoicePDF({ invoice }) {
|
|
53
|
+
return (
|
|
54
|
+
<Document>
|
|
55
|
+
<Page size="A4" style={styles.page}>
|
|
56
|
+
<Text style={styles.header}>Invoice #{invoice.number}</Text>
|
|
57
|
+
{invoice.items.map((item, i) => (
|
|
58
|
+
<View key={i} style={styles.row}>
|
|
59
|
+
<Text>{item.description}</Text>
|
|
60
|
+
<Text>${item.amount.toFixed(2)}</Text>
|
|
61
|
+
</View>
|
|
62
|
+
))}
|
|
63
|
+
<View style={styles.total}>
|
|
64
|
+
<Text>Total: ${invoice.total.toFixed(2)}</Text>
|
|
65
|
+
</View>
|
|
66
|
+
</Page>
|
|
67
|
+
</Document>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Server-side render to buffer
|
|
72
|
+
export async function generateInvoicePDF(invoice) {
|
|
73
|
+
return await renderToBuffer(<InvoicePDF invoice={invoice} />);
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Orchestration & Integration
|
|
78
|
+
- `email-notification-expert`, `saas-billing`, `file-upload-media-expert`
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
<a name="bahasa-indonesia"></a>
|
|
83
|
+
## Bahasa Indonesia
|
|
84
|
+
|
|
85
|
+
### Deskripsi
|
|
86
|
+
Panduan ahli untuk menghasilkan PDF dan memproses dokumen di aplikasi web. Mencakup React PDF, Puppeteer HTML-to-PDF, jsPDF, dan pdf-lib.
|
|
87
|
+
|
|
88
|
+
### Kondisi Pemicu
|
|
89
|
+
- Menghasilkan invoice, struk, atau laporan sebagai PDF.
|
|
90
|
+
- Mengkonversi halaman HTML ke PDF yang bisa diunduh.
|
|
91
|
+
- Membangun template dokumen dengan data dinamis.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: performance-web-vitals
|
|
3
3
|
description: "Expert guide for Web Performance optimization: Core Web Vitals (LCP, INP, CLS), bundle analysis, image optimization, rendering strategies, and Lighthouse score improvement / Panduan ahli untuk optimasi performa web: Core Web Vitals (LCP, INP, CLS), analisis bundle, optimasi gambar, strategi rendering, dan peningkatan skor Lighthouse."
|
|
4
|
-
author: "Roedy Rustam"
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Web Performance & Core Web Vitals Expert
|
|
@@ -13,6 +13,9 @@ author: "Roedy Rustam"
|
|
|
13
13
|
<a name="english"></a>
|
|
14
14
|
## English
|
|
15
15
|
|
|
16
|
+
### Orchestration & Integration
|
|
17
|
+
Connects and orchestrates with relevant domain skills like `brainstorming`, `zero-to-prod-orchestrator`, and `project-context-mapper` to ensure cohesive execution.
|
|
18
|
+
|
|
16
19
|
### Description
|
|
17
20
|
Expert guide for measuring, diagnosing, and optimizing web application performance with a focus on **Core Web Vitals** (LCP, INP, CLS), JavaScript bundle optimization, image and font loading strategies, rendering performance, and achieving high Lighthouse scores. Covers Next.js 15, React 19, and modern browser APIs.
|
|
18
21
|
|
|
@@ -304,6 +307,9 @@ onTTFB(sendToAnalytics);
|
|
|
304
307
|
<a name="bahasa-indonesia"></a>
|
|
305
308
|
## Bahasa Indonesia
|
|
306
309
|
|
|
310
|
+
### Integrasi Orkestrasi
|
|
311
|
+
Terhubung dan mengorkestrasi skill domain yang relevan seperti `brainstorming`, `zero-to-prod-orchestrator`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.
|
|
312
|
+
|
|
307
313
|
### Deskripsi
|
|
308
314
|
Panduan ahli untuk mengukur, mendiagnosis, dan mengoptimalkan performa aplikasi web dengan fokus pada **Core Web Vitals** (LCP, INP, CLS), optimasi JavaScript bundle, strategi loading gambar dan font, performa rendering, dan mencapai skor Lighthouse yang tinggi.
|
|
309
315
|
|