vibes-plug 1.0.0 → 2.5.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/workflows/publish.yml +20 -0
- package/AGENTS.md +66 -0
- package/BLUEPRINT.md +152 -60
- package/CHANGELOG.md +50 -0
- package/README.md +346 -194
- package/package.json +25 -25
- package/plugin.json +1 -1
- package/skills/ai-cost-token-optimizer/SKILL.md +52 -0
- package/skills/ai-llm-integration-expert/SKILL.md +180 -162
- package/skills/api-design-expert/SKILL.md +314 -310
- package/skills/app-analyzer-optimizer/SKILL.md +193 -189
- package/skills/apple-ecosystem-expert/SKILL.md +142 -0
- package/skills/async-queue-temporal-expert/SKILL.md +54 -0
- package/skills/authentication-identity-expert/SKILL.md +251 -20
- package/skills/auto-doc-updater/SKILL.md +214 -204
- package/skills/autonomous-chaos-monkey/SKILL.md +63 -0
- package/skills/autonomous-red-teamer/SKILL.md +59 -0
- package/skills/autonomous-swarm-director/SKILL.md +69 -0
- package/skills/autonomous-tdd-debugger/SKILL.md +65 -0
- package/skills/bootstrap-to-modern/SKILL.md +90 -86
- package/skills/brainstorming/SKILL.md +373 -353
- package/skills/browser-automation-expert/SKILL.md +46 -0
- package/skills/ci-cd-devops-architect/SKILL.md +72 -45
- package/skills/cloud-hosting-expert/SKILL.md +244 -244
- package/skills/coderabbit/SKILL.md +192 -192
- package/skills/cron-scheduler-expert/SKILL.md +298 -0
- package/skills/data-telemetry-expert/SKILL.md +213 -213
- package/skills/database-orm-expert/SKILL.md +294 -294
- package/skills/dependency-upgrade-migrator/SKILL.md +295 -0
- package/skills/design-system-architect/SKILL.md +27 -10
- package/skills/doku-mcp-server/SKILL.md +251 -0
- package/skills/doku-payment-gateway/SKILL.md +227 -0
- package/skills/e2e-testing-expert/SKILL.md +315 -315
- package/skills/edge-serverless-db-expert/SKILL.md +43 -0
- package/skills/email-notification-expert/SKILL.md +362 -0
- package/skills/error-resilience-expert/SKILL.md +480 -0
- package/skills/event-driven-architect/SKILL.md +81 -81
- package/skills/feature-flag-analytics-expert/SKILL.md +46 -0
- package/skills/file-upload-media-expert/SKILL.md +431 -0
- package/skills/form-validation-expert/SKILL.md +401 -0
- package/skills/fullstack-expert/SKILL.md +202 -202
- package/skills/fullstack-expert/references/api_design_guide.md +466 -466
- package/skills/fullstack-expert/references/multi_language_backend.md +528 -528
- package/skills/fullstack-expert/scripts/api_contract_validator.py +253 -253
- package/skills/fullstack-expert/scripts/architecture_analyzer.py +326 -326
- package/skills/gemini-agent-booster/SKILL.md +135 -135
- package/skills/global-a11y-i18n-expert/SKILL.md +81 -81
- package/skills/glsl-shader-expert/SKILL.md +101 -0
- package/skills/go-programming-expert/SKILL.md +295 -295
- package/skills/graphql-apollo-expert/SKILL.md +108 -0
- package/skills/hig/SKILL.md +188 -188
- package/skills/hyper-context-synthesizer/SKILL.md +55 -0
- package/skills/js-backend-expert/SKILL.md +34 -9
- package/skills/legacy-code-translator/SKILL.md +65 -0
- package/skills/llm-cost-arbitrage-router/SKILL.md +59 -0
- package/skills/logging-error-tracking-expert/SKILL.md +338 -0
- package/skills/mcp-client-orchestrator/SKILL.md +70 -0
- package/skills/mcp-server-architect/SKILL.md +194 -194
- package/skills/micro-frontend-architect/SKILL.md +106 -0
- package/skills/mobile-expo-expert/SKILL.md +186 -186
- package/skills/mobile-push-notification-expert/SKILL.md +51 -0
- package/skills/monday-design-aesthetic/SKILL.md +67 -67
- package/skills/monorepo-architect/SKILL.md +227 -227
- package/skills/mpa-orchestrator/SKILL.md +101 -101
- package/skills/multi-agent-orchestration/SKILL.md +234 -234
- package/skills/multiple-entry-points/SKILL.md +55 -55
- package/skills/mvc-expert/SKILL.md +231 -231
- package/skills/payment-gateway-expert/SKILL.md +45 -45
- package/skills/performance-web-vitals/SKILL.md +332 -332
- package/skills/post-quantum-crypto-migrator/SKILL.md +57 -0
- package/skills/prd-architect/SKILL.md +201 -191
- package/skills/proactive-background-watcher/SKILL.md +62 -0
- package/skills/production-ready-hardener/PRODUCTION_READINESS_REPORT.md +67 -0
- package/skills/production-ready-hardener/SKILL.md +173 -186
- package/skills/production-ready-hardener/references/production_checklist.md +161 -161
- package/skills/production-ready-hardener/scripts/production_readiness_scanner.py +881 -875
- package/skills/project-context-mapper/SKILL.md +79 -0
- package/skills/python-programming-expert/SKILL.md +263 -132
- package/skills/rate-limit-abuse-prevention/SKILL.md +371 -0
- package/skills/realtime-collaboration-expert/SKILL.md +45 -45
- package/skills/rust-programming-expert/SKILL.md +235 -235
- package/skills/saas-billing/SKILL.md +377 -377
- package/skills/saas-multi-tenant/SKILL.md +251 -237
- package/skills/saas-mvp-launcher/SKILL.md +10 -0
- package/skills/saas-transformer/SKILL.md +187 -144
- package/skills/saas-transformer/references/billing_integration_guide.md +401 -401
- package/skills/saas-transformer/references/feature_gating_patterns.md +137 -137
- package/skills/saas-transformer/references/saas_transformation_checklist.md +121 -121
- package/skills/saas-transformer/scripts/saas_transformation_scanner.py +39 -29
- package/skills/scalability-clean-code/SKILL.md +229 -229
- package/skills/self-evolving-memory-graph/SKILL.md +75 -0
- package/skills/self-healing-cloud-orchestrator/SKILL.md +57 -0
- package/skills/senior-frontend/SKILL.md +161 -161
- package/skills/senior-fullstack/SKILL.md +167 -167
- package/skills/seo/SKILL.md +235 -225
- package/skills/seo-geo/SKILL.md +188 -188
- package/skills/session-context-loader/SKILL.md +77 -0
- package/skills/session-handoff-resume/SKILL.md +158 -158
- package/skills/skill_baru/SKILL.md +172 -147
- package/skills/spa-orchestrator/SKILL.md +288 -288
- package/skills/state-management-expert/SKILL.md +272 -272
- package/skills/supabase-security-expert/SKILL.md +243 -243
- package/skills/tailwind-expert/SKILL.md +188 -188
- package/skills/tanstack-query-expert/SKILL.md +199 -199
- package/skills/token-saver/SKILL.md +119 -111
- package/skills/typescript-expert/SKILL.md +324 -279
- package/skills/ui-components-expert/SKILL.md +263 -46
- package/skills/ui-ux-pro-max/SKILL.md +202 -201
- package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-310.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-310.pyc +0 -0
- package/skills/ui_ux_expert/SKILL.md +17 -6
- package/skills/vector-db-rag-expert/SKILL.md +52 -0
- package/skills/vibe-code-gardener/SKILL.md +181 -173
- package/skills/visual-qa-vision-agent/SKILL.md +65 -0
- package/skills/vue-frontend-expert/SKILL.md +126 -0
- package/skills/web-3d-graphics-expert/SKILL.md +131 -0
- package/skills/web-game-engine-expert/SKILL.md +96 -0
- package/skills/web-scraper/SKILL.md +207 -205
- package/skills/website-design-cloner/SKILL.md +174 -0
- package/skills/webxr-ar-vr-expert/SKILL.md +117 -0
- package/skills/zero-to-prod-orchestrator/SKILL.md +206 -180
- package/skills/zero-trust-secret-vault/SKILL.md +40 -0
- package/vibes-swarm-demo.gif +0 -0
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: senior-fullstack
|
|
3
|
-
description: "Complete toolkit for senior fullstack with modern tools and best practices / Perangkat instruksi lengkap untuk pengembang fullstack tingkat senior dengan alat-alat dan best practices termutakhir."
|
|
4
|
-
author: "Roedy Rustam"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Senior Fullstack Developer (2026 Edition)
|
|
8
|
-
|
|
9
|
-
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<a name="english"></a>
|
|
14
|
-
## English
|
|
15
|
-
|
|
16
|
-
### Description
|
|
17
|
-
Complete guidelines for senior fullstack developers building production-grade applications in 2026. Covers the modern AI-native stack, architecture decision-making, API design, frontend/backend integration, and team-level best practices.
|
|
18
|
-
|
|
19
|
-
### Trigger Conditions
|
|
20
|
-
- Making fullstack architecture decisions across frontend and backend.
|
|
21
|
-
- Designing API contracts between React 19/Next.js 15 frontend and Node.js/Go/Python backend.
|
|
22
|
-
- Integrating AI features (LLM, agents, RAG) into a fullstack application.
|
|
23
|
-
- Setting up a monorepo with shared types between frontend and backend.
|
|
24
|
-
- Reviewing and improving overall application architecture and code quality.
|
|
25
|
-
|
|
26
|
-
### Modern 2026 Fullstack Stack
|
|
27
|
-
|
|
28
|
-
#### Recommended Stacks by Use Case
|
|
29
|
-
|
|
30
|
-
| Use Case | Frontend | Backend | Database | AI Layer |
|
|
31
|
-
|---|---|---|---|---|
|
|
32
|
-
| **SaaS App (default)** | Next.js 15 (App Router) | Hono / Fastify 5 | Postgres + Drizzle | Vercel AI SDK 5.x |
|
|
33
|
-
| **AI-First App** | Next.js 15 + RSC streaming | Mastra.ai / LangGraph | pgvector + Supabase | Anthropic / OpenAI |
|
|
34
|
-
| **Decoupled SPA** | TanStack Start + React 19 | Hono RPC | Postgres + Drizzle | Vercel AI SDK |
|
|
35
|
-
| **Content Site** | Astro 5 + MDX | N/A (static) | Sanity / Contentful | — |
|
|
36
|
-
| **Mobile** | Expo SDK 53 + React Native 0.79 | Hono / Fastify | SQLite (Expo) + Postgres | Vercel AI SDK |
|
|
37
|
-
|
|
38
|
-
#### AI-Native Fullstack Patterns
|
|
39
|
-
In 2026, AI is a first-class citizen in fullstack applications:
|
|
40
|
-
- **Streaming AI Responses**: Use Next.js RSC + Vercel AI SDK `streamUI` to stream LLM responses as React components from the server.
|
|
41
|
-
- **Server Actions as AI Triggers**: Use React 19 `useActionState` with Server Actions to invoke LLM calls without an API layer.
|
|
42
|
-
- **Background AI Jobs**: Offload long LLM tasks to BullMQ + Redis workers; stream results via WebSockets or SSE.
|
|
43
|
-
- **Structured AI Output**: Always use `zodResponseFormat` or Pydantic schemas for LLM responses — never parse free-form JSON.
|
|
44
|
-
|
|
45
|
-
### API Design Principles (2026)
|
|
46
|
-
|
|
47
|
-
#### Type-Safe Communication
|
|
48
|
-
Choose one approach and be consistent:
|
|
49
|
-
- **Hono RPC**: If backend is Hono — zero codegen, end-to-end types.
|
|
50
|
-
- **tRPC**: If using React Query with Next.js — excellent DX with RSC support.
|
|
51
|
-
- **OpenAPI + codegen**: If you have multiple consumers (mobile, third parties).
|
|
52
|
-
|
|
53
|
-
#### API Versioning
|
|
54
|
-
- Use URL versioning: `/api/v1/users`.
|
|
55
|
-
- Pin major version in URL, minor versions are backward-compatible.
|
|
56
|
-
- Deprecate with `Deprecation` and `Sunset` headers.
|
|
57
|
-
|
|
58
|
-
#### Error Response Standard (RFC 9457 Problem Details)
|
|
59
|
-
```typescript
|
|
60
|
-
// Consistent error format across all endpoints
|
|
61
|
-
interface ProblemDetail {
|
|
62
|
-
type: string; // URI identifying the error type
|
|
63
|
-
title: string; // Human-readable summary
|
|
64
|
-
status: number; // HTTP status code
|
|
65
|
-
detail: string; // Specific explanation
|
|
66
|
-
instance?: string; // URI of the specific occurrence
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### SPA vs SSR vs Static — Decision Guide
|
|
71
|
-
```
|
|
72
|
-
SEO-critical + mostly read? → Next.js SSR / Astro 5 (static)
|
|
73
|
-
Highly interactive dashboard? → SPA (TanStack Start / Vite + TanStack Router)
|
|
74
|
-
→ see spa-orchestrator skill for architecture details
|
|
75
|
-
Mixed (marketing + app)? → Next.js 15 with hybrid routing
|
|
76
|
-
Real-time data? → SSR + WebSocket or SSE streaming
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Monorepo with Shared Types
|
|
80
|
-
```typescript
|
|
81
|
-
// packages/types/src/index.ts — single source of truth
|
|
82
|
-
export interface User {
|
|
83
|
-
id: string;
|
|
84
|
-
email: string;
|
|
85
|
-
name: string;
|
|
86
|
-
plan: 'free' | 'pro' | 'enterprise';
|
|
87
|
-
isSuperAdmin: boolean;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface ApiResponse<T> {
|
|
91
|
-
data: T;
|
|
92
|
-
meta?: { page: number; total: number };
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// apps/api — uses the type
|
|
96
|
-
// apps/web — uses the same type
|
|
97
|
-
// apps/admin — uses the same type
|
|
98
|
-
import type { User } from '@myapp/types';
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Security Checklist (Fullstack)
|
|
102
|
-
- [ ] All user inputs validated with Zod on the server (never trust the client).
|
|
103
|
-
- [ ] JWT secrets rotated every 90 days; use short expiry + refresh tokens.
|
|
104
|
-
- [ ] CSP headers configured (no `unsafe-inline` in production).
|
|
105
|
-
- [ ] All DB queries use parameterized queries — no string concatenation.
|
|
106
|
-
- [ ] File uploads validated for MIME type and scanned before storage.
|
|
107
|
-
- [ ] Rate limiting on all public API endpoints.
|
|
108
|
-
- [ ] Super Admin routes restricted to `admin.domain.com` with `isSuperAdmin` check.
|
|
109
|
-
|
|
110
|
-
### Code Review Standards
|
|
111
|
-
- Functions < 30 lines; files < 300 lines.
|
|
112
|
-
- No business logic in UI components.
|
|
113
|
-
- Every PR includes relevant tests (unit or E2E).
|
|
114
|
-
- No `any` types in TypeScript production code.
|
|
115
|
-
- Dependencies audited with `pnpm audit` on every PR.
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
<a name="bahasa-indonesia"></a>
|
|
120
|
-
## Bahasa Indonesia
|
|
121
|
-
|
|
122
|
-
### Deskripsi
|
|
123
|
-
Panduan lengkap untuk pengembang fullstack senior yang membangun aplikasi tingkat produksi di 2026. Mencakup stack AI-native modern, pengambilan keputusan arsitektur, desain API, integrasi frontend/backend, dan best practices tingkat tim.
|
|
124
|
-
|
|
125
|
-
### Kondisi Pemicu
|
|
126
|
-
- Membuat keputusan arsitektur fullstack di frontend dan backend.
|
|
127
|
-
- Merancang kontrak API antara frontend React 19/Next.js 15 dan backend Node.js/Go/Python.
|
|
128
|
-
- Mengintegrasikan fitur AI (LLM, agen, RAG) ke dalam aplikasi fullstack.
|
|
129
|
-
- Menyiapkan monorepo dengan shared types antara frontend dan backend.
|
|
130
|
-
- Meninjau dan meningkatkan arsitektur dan kualitas kode aplikasi secara keseluruhan.
|
|
131
|
-
|
|
132
|
-
### Stack Fullstack Modern 2026
|
|
133
|
-
|
|
134
|
-
Rekomendasi stack berdasarkan use case:
|
|
135
|
-
- **SaaS App**: Next.js 15 + Hono/Fastify + Postgres + Drizzle + Vercel AI SDK.
|
|
136
|
-
- **AI-First App**: Next.js 15 RSC streaming + Mastra.ai/LangGraph + pgvector.
|
|
137
|
-
- **SPA Terpisah**: TanStack Start + Hono RPC + Postgres — lihat `spa-orchestrator`.
|
|
138
|
-
- **Situs Konten**: Astro 5 + MDX.
|
|
139
|
-
- **Mobile**: Expo SDK 53 + Hono + SQLite.
|
|
140
|
-
|
|
141
|
-
### Pola Fullstack AI-Native (2026)
|
|
142
|
-
AI adalah warga kelas satu di aplikasi fullstack 2026:
|
|
143
|
-
- **Streaming RSC**: Alirkan respons LLM sebagai komponen React dari server menggunakan `streamUI` Vercel AI SDK 5.x.
|
|
144
|
-
- **Server Actions sebagai Pemicu AI**: Panggil LLM dari Server Actions React 19 tanpa lapisan API terpisah.
|
|
145
|
-
- **Background AI Jobs**: Offload tugas LLM panjang ke BullMQ + Redis; stream hasil via WebSocket atau SSE.
|
|
146
|
-
- **Output AI Terstruktur**: Selalu gunakan `zodResponseFormat` atau skema Pydantic — jangan pernah parse JSON bebas dari LLM.
|
|
147
|
-
|
|
148
|
-
### Prinsip Desain API (2026)
|
|
149
|
-
- **Hono RPC**: Zero codegen, end-to-end type-safe jika backend adalah Hono.
|
|
150
|
-
- **tRPC**: Untuk React Query + Next.js dengan dukungan RSC.
|
|
151
|
-
- **OpenAPI + codegen**: Jika memiliki banyak konsumen (mobile, pihak ketiga).
|
|
152
|
-
- **Format Error RFC 9457**: Respons error yang konsisten dengan `type`, `title`, `status`, `detail`.
|
|
153
|
-
|
|
154
|
-
### SPA vs SSR vs Static
|
|
155
|
-
Gunakan SSR/Astro untuk situs kritis SEO dan banyak baca. Gunakan SPA (TanStack Start) untuk dashboard yang sangat interaktif. Gunakan Next.js 15 dengan routing hybrid untuk aplikasi campuran (marketing + app).
|
|
156
|
-
|
|
157
|
-
### Monorepo dengan Shared Types
|
|
158
|
-
Definisikan interface dan tipe bersama di `packages/types` — digunakan oleh semua app (web, admin, api, mobile) sebagai single source of truth.
|
|
159
|
-
|
|
160
|
-
### Checklist Keamanan
|
|
161
|
-
- Input pengguna divalidasi Zod di server.
|
|
162
|
-
- JWT rotasi 90 hari; expiry pendek + refresh token.
|
|
163
|
-
- Header CSP dikonfigurasi.
|
|
164
|
-
- Semua query DB menggunakan parameterized query.
|
|
165
|
-
- Upload file divalidasi MIME type.
|
|
166
|
-
- Rate limiting di semua endpoint publik.
|
|
167
|
-
- Rute Super Admin dibatasi di `admin.domain.com` dengan cek `isSuperAdmin`.
|
|
1
|
+
---
|
|
2
|
+
name: senior-fullstack
|
|
3
|
+
description: "Complete toolkit for senior fullstack with modern tools and best practices / Perangkat instruksi lengkap untuk pengembang fullstack tingkat senior dengan alat-alat dan best practices termutakhir."
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Senior Fullstack Developer (2026 Edition)
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Description
|
|
17
|
+
Complete guidelines for senior fullstack developers building production-grade applications in 2026. Covers the modern AI-native stack, architecture decision-making, API design, frontend/backend integration, and team-level best practices.
|
|
18
|
+
|
|
19
|
+
### Trigger Conditions
|
|
20
|
+
- Making fullstack architecture decisions across frontend and backend.
|
|
21
|
+
- Designing API contracts between React 19/Next.js 15 frontend and Node.js/Go/Python backend.
|
|
22
|
+
- Integrating AI features (LLM, agents, RAG) into a fullstack application.
|
|
23
|
+
- Setting up a monorepo with shared types between frontend and backend.
|
|
24
|
+
- Reviewing and improving overall application architecture and code quality.
|
|
25
|
+
|
|
26
|
+
### Modern 2026 Fullstack Stack
|
|
27
|
+
|
|
28
|
+
#### Recommended Stacks by Use Case
|
|
29
|
+
|
|
30
|
+
| Use Case | Frontend | Backend | Database | AI Layer |
|
|
31
|
+
|---|---|---|---|---|
|
|
32
|
+
| **SaaS App (default)** | Next.js 15 (App Router) | Hono / Fastify 5 | Postgres + Drizzle | Vercel AI SDK 5.x |
|
|
33
|
+
| **AI-First App** | Next.js 15 + RSC streaming | Mastra.ai / LangGraph | pgvector + Supabase | Anthropic / OpenAI |
|
|
34
|
+
| **Decoupled SPA** | TanStack Start + React 19 | Hono RPC | Postgres + Drizzle | Vercel AI SDK |
|
|
35
|
+
| **Content Site** | Astro 5 + MDX | N/A (static) | Sanity / Contentful | — |
|
|
36
|
+
| **Mobile** | Expo SDK 53 + React Native 0.79 | Hono / Fastify | SQLite (Expo) + Postgres | Vercel AI SDK |
|
|
37
|
+
|
|
38
|
+
#### AI-Native Fullstack Patterns
|
|
39
|
+
In 2026, AI is a first-class citizen in fullstack applications:
|
|
40
|
+
- **Streaming AI Responses**: Use Next.js RSC + Vercel AI SDK `streamUI` to stream LLM responses as React components from the server.
|
|
41
|
+
- **Server Actions as AI Triggers**: Use React 19 `useActionState` with Server Actions to invoke LLM calls without an API layer.
|
|
42
|
+
- **Background AI Jobs**: Offload long LLM tasks to BullMQ + Redis workers; stream results via WebSockets or SSE.
|
|
43
|
+
- **Structured AI Output**: Always use `zodResponseFormat` or Pydantic schemas for LLM responses — never parse free-form JSON.
|
|
44
|
+
|
|
45
|
+
### API Design Principles (2026)
|
|
46
|
+
|
|
47
|
+
#### Type-Safe Communication
|
|
48
|
+
Choose one approach and be consistent:
|
|
49
|
+
- **Hono RPC**: If backend is Hono — zero codegen, end-to-end types.
|
|
50
|
+
- **tRPC**: If using React Query with Next.js — excellent DX with RSC support.
|
|
51
|
+
- **OpenAPI + codegen**: If you have multiple consumers (mobile, third parties).
|
|
52
|
+
|
|
53
|
+
#### API Versioning
|
|
54
|
+
- Use URL versioning: `/api/v1/users`.
|
|
55
|
+
- Pin major version in URL, minor versions are backward-compatible.
|
|
56
|
+
- Deprecate with `Deprecation` and `Sunset` headers.
|
|
57
|
+
|
|
58
|
+
#### Error Response Standard (RFC 9457 Problem Details)
|
|
59
|
+
```typescript
|
|
60
|
+
// Consistent error format across all endpoints
|
|
61
|
+
interface ProblemDetail {
|
|
62
|
+
type: string; // URI identifying the error type
|
|
63
|
+
title: string; // Human-readable summary
|
|
64
|
+
status: number; // HTTP status code
|
|
65
|
+
detail: string; // Specific explanation
|
|
66
|
+
instance?: string; // URI of the specific occurrence
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### SPA vs SSR vs Static — Decision Guide
|
|
71
|
+
```
|
|
72
|
+
SEO-critical + mostly read? → Next.js SSR / Astro 5 (static)
|
|
73
|
+
Highly interactive dashboard? → SPA (TanStack Start / Vite + TanStack Router)
|
|
74
|
+
→ see spa-orchestrator skill for architecture details
|
|
75
|
+
Mixed (marketing + app)? → Next.js 15 with hybrid routing
|
|
76
|
+
Real-time data? → SSR + WebSocket or SSE streaming
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Monorepo with Shared Types
|
|
80
|
+
```typescript
|
|
81
|
+
// packages/types/src/index.ts — single source of truth
|
|
82
|
+
export interface User {
|
|
83
|
+
id: string;
|
|
84
|
+
email: string;
|
|
85
|
+
name: string;
|
|
86
|
+
plan: 'free' | 'pro' | 'enterprise';
|
|
87
|
+
isSuperAdmin: boolean;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface ApiResponse<T> {
|
|
91
|
+
data: T;
|
|
92
|
+
meta?: { page: number; total: number };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// apps/api — uses the type
|
|
96
|
+
// apps/web — uses the same type
|
|
97
|
+
// apps/admin — uses the same type
|
|
98
|
+
import type { User } from '@myapp/types';
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Security Checklist (Fullstack)
|
|
102
|
+
- [ ] All user inputs validated with Zod on the server (never trust the client).
|
|
103
|
+
- [ ] JWT secrets rotated every 90 days; use short expiry + refresh tokens.
|
|
104
|
+
- [ ] CSP headers configured (no `unsafe-inline` in production).
|
|
105
|
+
- [ ] All DB queries use parameterized queries — no string concatenation.
|
|
106
|
+
- [ ] File uploads validated for MIME type and scanned before storage.
|
|
107
|
+
- [ ] Rate limiting on all public API endpoints.
|
|
108
|
+
- [ ] Super Admin routes restricted to `admin.domain.com` with `isSuperAdmin` check.
|
|
109
|
+
|
|
110
|
+
### Code Review Standards
|
|
111
|
+
- Functions < 30 lines; files < 300 lines.
|
|
112
|
+
- No business logic in UI components.
|
|
113
|
+
- Every PR includes relevant tests (unit or E2E).
|
|
114
|
+
- No `any` types in TypeScript production code.
|
|
115
|
+
- Dependencies audited with `pnpm audit` on every PR.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
<a name="bahasa-indonesia"></a>
|
|
120
|
+
## Bahasa Indonesia
|
|
121
|
+
|
|
122
|
+
### Deskripsi
|
|
123
|
+
Panduan lengkap untuk pengembang fullstack senior yang membangun aplikasi tingkat produksi di 2026. Mencakup stack AI-native modern, pengambilan keputusan arsitektur, desain API, integrasi frontend/backend, dan best practices tingkat tim.
|
|
124
|
+
|
|
125
|
+
### Kondisi Pemicu
|
|
126
|
+
- Membuat keputusan arsitektur fullstack di frontend dan backend.
|
|
127
|
+
- Merancang kontrak API antara frontend React 19/Next.js 15 dan backend Node.js/Go/Python.
|
|
128
|
+
- Mengintegrasikan fitur AI (LLM, agen, RAG) ke dalam aplikasi fullstack.
|
|
129
|
+
- Menyiapkan monorepo dengan shared types antara frontend dan backend.
|
|
130
|
+
- Meninjau dan meningkatkan arsitektur dan kualitas kode aplikasi secara keseluruhan.
|
|
131
|
+
|
|
132
|
+
### Stack Fullstack Modern 2026
|
|
133
|
+
|
|
134
|
+
Rekomendasi stack berdasarkan use case:
|
|
135
|
+
- **SaaS App**: Next.js 15 + Hono/Fastify + Postgres + Drizzle + Vercel AI SDK.
|
|
136
|
+
- **AI-First App**: Next.js 15 RSC streaming + Mastra.ai/LangGraph + pgvector.
|
|
137
|
+
- **SPA Terpisah**: TanStack Start + Hono RPC + Postgres — lihat `spa-orchestrator`.
|
|
138
|
+
- **Situs Konten**: Astro 5 + MDX.
|
|
139
|
+
- **Mobile**: Expo SDK 53 + Hono + SQLite.
|
|
140
|
+
|
|
141
|
+
### Pola Fullstack AI-Native (2026)
|
|
142
|
+
AI adalah warga kelas satu di aplikasi fullstack 2026:
|
|
143
|
+
- **Streaming RSC**: Alirkan respons LLM sebagai komponen React dari server menggunakan `streamUI` Vercel AI SDK 5.x.
|
|
144
|
+
- **Server Actions sebagai Pemicu AI**: Panggil LLM dari Server Actions React 19 tanpa lapisan API terpisah.
|
|
145
|
+
- **Background AI Jobs**: Offload tugas LLM panjang ke BullMQ + Redis; stream hasil via WebSocket atau SSE.
|
|
146
|
+
- **Output AI Terstruktur**: Selalu gunakan `zodResponseFormat` atau skema Pydantic — jangan pernah parse JSON bebas dari LLM.
|
|
147
|
+
|
|
148
|
+
### Prinsip Desain API (2026)
|
|
149
|
+
- **Hono RPC**: Zero codegen, end-to-end type-safe jika backend adalah Hono.
|
|
150
|
+
- **tRPC**: Untuk React Query + Next.js dengan dukungan RSC.
|
|
151
|
+
- **OpenAPI + codegen**: Jika memiliki banyak konsumen (mobile, pihak ketiga).
|
|
152
|
+
- **Format Error RFC 9457**: Respons error yang konsisten dengan `type`, `title`, `status`, `detail`.
|
|
153
|
+
|
|
154
|
+
### SPA vs SSR vs Static
|
|
155
|
+
Gunakan SSR/Astro untuk situs kritis SEO dan banyak baca. Gunakan SPA (TanStack Start) untuk dashboard yang sangat interaktif. Gunakan Next.js 15 dengan routing hybrid untuk aplikasi campuran (marketing + app).
|
|
156
|
+
|
|
157
|
+
### Monorepo dengan Shared Types
|
|
158
|
+
Definisikan interface dan tipe bersama di `packages/types` — digunakan oleh semua app (web, admin, api, mobile) sebagai single source of truth.
|
|
159
|
+
|
|
160
|
+
### Checklist Keamanan
|
|
161
|
+
- Input pengguna divalidasi Zod di server.
|
|
162
|
+
- JWT rotasi 90 hari; expiry pendek + refresh token.
|
|
163
|
+
- Header CSP dikonfigurasi.
|
|
164
|
+
- Semua query DB menggunakan parameterized query.
|
|
165
|
+
- Upload file divalidasi MIME type.
|
|
166
|
+
- Rate limiting di semua endpoint publik.
|
|
167
|
+
- Rute Super Admin dibatasi di `admin.domain.com` dengan cek `isSuperAdmin`.
|