vibes-plug 2.11.0 → 2.14.1

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.
Files changed (69) hide show
  1. package/.cursor/rules/vibes-plug-core.mdc +3 -3
  2. package/.cursorrules +3 -3
  3. package/AGENTS.md +4 -4
  4. package/BLUEPRINT.md +16 -6
  5. package/CHANGELOG.md +37 -0
  6. package/CLAUDE.md +8 -8
  7. package/README.md +85 -115
  8. package/index.js +1 -1
  9. package/package.json +2 -2
  10. package/plugin.json +2 -2
  11. package/scripts/check-anti-slop.js +53 -0
  12. package/scripts/generate_swarm_gif.py +2 -2
  13. package/skills/ai-llm-integration-expert/SKILL.md +22 -15
  14. package/skills/ai-prompt-engineering-expert/SKILL.md +133 -83
  15. package/skills/anti-slop/SKILL.md +133 -0
  16. package/skills/async-queue-temporal-expert/SKILL.md +135 -158
  17. package/skills/authentication-identity-expert/SKILL.md +172 -278
  18. package/skills/brainstorming/SKILL.md +26 -26
  19. package/skills/database-orm-expert/SKILL.md +164 -303
  20. package/skills/deep-research-analyst/SKILL.md +136 -0
  21. package/skills/design-system-architect/SKILL.md +31 -1
  22. package/skills/email-notification-expert/SKILL.md +31 -4
  23. package/skills/error-resilience-expert/SKILL.md +21 -0
  24. package/skills/fullstack-expert/SKILL.md +183 -260
  25. package/skills/glsl-shader-expert/SKILL.md +190 -107
  26. package/skills/graph-rag-knowledge-expert/SKILL.md +42 -1
  27. package/skills/mcp-server-architect/SKILL.md +15 -1
  28. package/skills/prd-architect/SKILL.md +181 -206
  29. package/skills/production-ready-hardener/SKILL.md +16 -19
  30. package/skills/pwa-offline-first-expert/SKILL.md +42 -1
  31. package/skills/pydantic-ai-expert/SKILL.md +161 -0
  32. package/skills/saas-architect/SKILL.md +154 -0
  33. package/skills/senior-frontend/SKILL.md +9 -11
  34. package/skills/senior-frontend/scripts/frontend_scaffolder.py +1 -1
  35. package/skills/session-memory-manager/SKILL.md +128 -0
  36. package/skills/synthetic-data-finetuning-expert/SKILL.md +155 -0
  37. package/skills/ui-ux-pro-max/SKILL.md +4 -2
  38. package/skills/vercel-ai-sdk-expert/SKILL.md +181 -0
  39. package/skills/voice-ai-realtime-agent/SKILL.md +41 -1
  40. package/skills/web-3d-graphics-expert/SKILL.md +313 -137
  41. package/skills/web-game-engine-expert/SKILL.md +329 -102
  42. package/skills/webxr-ar-vr-expert/SKILL.md +162 -123
  43. package/skills/zero-to-prod-orchestrator/SKILL.md +26 -24
  44. package/skills/ai-cost-token-optimizer/SKILL.md +0 -82
  45. package/skills/ai-evals-benchmark-expert/SKILL.md +0 -188
  46. package/skills/asisten-ramah/SKILL.md +0 -47
  47. package/skills/auto-doc-updater/SKILL.md +0 -220
  48. package/skills/autonomous-chaos-monkey/SKILL.md +0 -63
  49. package/skills/background-jobs-queue-expert/SKILL.md +0 -235
  50. package/skills/database-migration-versioning-expert/SKILL.md +0 -90
  51. package/skills/edge-serverless-db-expert/SKILL.md +0 -99
  52. package/skills/mcp-client-orchestrator/SKILL.md +0 -76
  53. package/skills/mobile-push-notification-expert/SKILL.md +0 -71
  54. package/skills/monday-design-aesthetic/SKILL.md +0 -73
  55. package/skills/project-context-mapper/SKILL.md +0 -85
  56. package/skills/saas-mvp-launcher/SKILL.md +0 -260
  57. package/skills/saas-transformer/SKILL.md +0 -500
  58. package/skills/saas-transformer/references/billing_integration_guide.md +0 -401
  59. package/skills/self-evolving-memory-graph/SKILL.md +0 -91
  60. package/skills/session-context-loader/SKILL.md +0 -83
  61. package/skills/session-handoff-resume/SKILL.md +0 -164
  62. package/skills/skill-baru/SKILL.md +0 -178
  63. package/skills/supabase-migration/SKILL.md +0 -91
  64. package/skills/token-saver/SKILL.md +0 -119
  65. package/skills/ui-components-expert/SKILL.md +0 -166
  66. package/skills/vibe-code-gardener/SKILL.md +0 -181
  67. /package/skills/{saas-transformer → saas-architect}/references/feature_gating_patterns.md +0 -0
  68. /package/skills/{saas-transformer → saas-architect}/references/saas_transformation_checklist.md +0 -0
  69. /package/skills/{saas-transformer → saas-architect}/scripts/saas_transformation_scanner.py +0 -0
@@ -1,85 +0,0 @@
1
- ---
2
- name: project-context-mapper
3
- description: "Gives the agent a photographic memory of massive repositories. Forces the creation and maintenance of a highly compressed CONTEXT_MAP.md to prevent context exhaustion and hallucination."
4
- author: "Roedy Rustam"
5
- ---
6
-
7
- # Project Context Mapper (Memory Optimizer)
8
-
9
- [English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
10
-
11
- ---
12
-
13
- <a name="english"></a>
14
- ## English
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
-
19
- ### Description
20
- LLMs struggle with repositories containing hundreds of files; they lose track of where things are, leading to hallucinations and excessive tool calls. This skill forces the agent to create, read, and maintain a `CONTEXT_MAP.md`—a highly compressed index of the repository's architecture, dependency graphs, and critical file locations. This acts as the agent's "photographic memory".
21
-
22
- ### Trigger Conditions
23
- Activate this skill when:
24
- - The agent enters a massive, existing codebase for the first time.
25
- - The user complains that the AI is "editing the wrong file" or "forgetting how the app is structured."
26
- - Context token usage is dangerously high and needs optimization.
27
-
28
- ### Core Concepts
29
-
30
- #### 1. The Context Map Format
31
- The agent should execute a script or traverse the directory to generate a compressed map in `CONTEXT_MAP.md` (or within `.agents/`).
32
- ```markdown
33
- # CONTEXT MAP (Do not delete)
34
-
35
- ## Architecture
36
- - Frontend: Next.js App Router (src/app)
37
- - Backend: Hono RPC (src/server)
38
- - DB: Drizzle (src/db/schema.ts)
39
-
40
- ## Dependency Graph (Critical Paths)
41
- - `src/app/page.tsx` -> `src/components/ui/Button.tsx`
42
- - `src/server/routes/users.ts` -> `src/db/queries/users.ts`
43
-
44
- ## State Locations
45
- - Global Auth: `src/store/auth.ts` (Zustand)
46
- ```
47
-
48
- #### 2. Workflow
49
- 1. **On Start:** The agent reads `CONTEXT_MAP.md` instead of blindly listing directories.
50
- 2. **On Modification:** When the agent creates a new major component, route, or service, it MUST append that location to the context map.
51
-
52
- ### Best Practices
53
- - **Keep it Ultra-Compressed:** Do not store full code in the map. Store ONLY file paths, responsibilities (1 sentence), and connections.
54
- - **BM25 Search First:** Before writing to the context map, consider using `grep_search` or semantic search for targeted lookups. The map is for *architectural* understanding, not exact variable finding.
55
-
56
- ---
57
-
58
- ### Integration with Other Skills (MANDATORY)
59
- - `session-context-loader` — Integrates deeply to ensure the context map is loaded automatically on every new chat session.
60
- - `token-saver` — The map prevents the agent from reading 10 separate files just to find one function, saving massive amounts of tokens.
61
- - `monorepo-architect` — Essential for mapping out package boundaries in Turborepo/pnpm workspaces.
62
-
63
- ### Referenced By Orchestrators (MANDATORY)
64
- - `brainstorming` — Add to "Discovery & Audit".
65
- - `zero-to-prod-orchestrator` — Phase 1 (Discovery & Architecture).
66
-
67
- ---
68
-
69
- <a name="bahasa-indonesia"></a>
70
- ## Bahasa Indonesia
71
-
72
- ### Integrasi Orkestrasi
73
- Terhubung dan mengorkestrasi skill domain yang relevan seperti `brainstorming`, `zero-to-prod-orchestrator`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.
74
-
75
- ### Deskripsi
76
- Kelemahan utama agen AI adalah keterbatasan jendela konteks (*context window*). Skill ini memberi agen "ingatan fotografis" dengan mewajibkannya memelihara file `CONTEXT_MAP.md`—sebuah indeks super padat yang memetakan arsitektur proyek, lokasi file penting, dan graf dependensi.
77
-
78
- ### Kondisi Pemicu
79
- - Saat agen baru saja dimasukkan ke dalam repositori raksasa yang sudah ada (bukan dari nol).
80
- - Saat agen mulai salah mengedit file atau terlihat kebingungan dengan struktur folder.
81
-
82
- ### Panduan Singkat
83
- - **Indeks Tersentralisasi:** Buat dan selalu perbarui `CONTEXT_MAP.md`. File ini berisi daftar *path* direktori krusial dan tanggung jawab masing-masing (misal: "Logic pembayaran ada di `src/lib/stripe.ts`").
84
- - **Ultra-Ringkas:** Jangan menaruh baris kode di dalam peta konteks ini. Hanya gunakan format *bullet points* agar konsumsi token saat dibaca sangat rendah.
85
- - **Baca di Awal Sesi:** Di setiap awal percakapan, agen tidak perlu lagi meraba-raba melakukan `ls` berulang kali. Cukup gunakan `view_file` pada `CONTEXT_MAP.md`, dan agen langsung mengerti seluruh topologi proyek.
@@ -1,260 +0,0 @@
1
- ---
2
- name: saas-mvp-launcher
3
- description: "Structured roadmap and design to plan and launch a SaaS MVP from scratch / Panduan terstruktur untuk merencanakan dan meluncurkan SaaS MVP dari nol."
4
- author: "Roedy Rustam"
5
- ---
6
-
7
- # SaaS MVP Launcher
8
-
9
- [English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
10
-
11
- ---
12
-
13
- <a name="english"></a>
14
- ## English
15
-
16
- ### Orchestration & Integration
17
- Connects and orchestrates with relevant domain skills like `modern-web-guidance`, `brainstorming`, `zero-to-prod-orchestrator`, and `project-context-mapper` to ensure cohesive execution.
18
- - **MANDATORY**: Execute `modern-web-guidance` FIRST for all frontend HTML/CSS/JS features to ensure compliance with modern Google standards.
19
-
20
- ### Overview
21
- This skill guides you through building a production-ready SaaS MVP in the shortest time possible. It covers everything from idea validation and tech stack selection to authentication, payments, database design, deployment, and launch — using modern, battle-tested tools.
22
-
23
- ### Trigger Conditions
24
- Use this skill when:
25
- - Starting a new SaaS product from scratch.
26
- - Choosing a tech stack for a web application.
27
- - Setting up authentication, billing, or database for a SaaS.
28
- - Requiring a structured launch checklist before going live.
29
- - Designing the architecture of a multi-tenant application.
30
- - Conducting a technical review of an existing early-stage SaaS.
31
-
32
- ### Step-by-Step Guide
33
-
34
- #### 1. Validate Before You Build
35
- Before writing any code, validate the idea:
36
- - [ ] Can you describe the problem in one sentence?
37
- - [ ] Who is the exact customer? (not "everyone")
38
- - [ ] What do they pay for today to solve this?
39
- - [ ] Have you talked to 5+ potential customers?
40
- - [ ] Will they pay $X/month for your solution?
41
-
42
- *Rule:* If you can't get 3 people to pre-pay or sign a letter of intent, don't build yet.
43
-
44
- #### 2. Choose Your Tech Stack
45
- Recommended modern SaaS stack (2026):
46
- - **Frontend**: Next.js 15 + TypeScript (App Router, React Server Components).
47
- - **Styling**: Tailwind CSS v4 + shadcn/ui.
48
- - **Backend**: Next.js Server Actions (type-safe, direct database integration).
49
- - **Database**: PostgreSQL (Supabase or Neon) with RLS.
50
- - **ORM**: Drizzle ORM or Prisma.
51
- - **Auth**: Clerk or NextAuth.js (Auth.js).
52
- - **Payments**: Choice of Stripe, Midtrans (for SE Asia), PayPal, Paddle, or FastSpring (including subscriptions and customer portals).
53
- - **Email**: Resend + React Email.
54
- - **Deployment**: Vercel (seamless deployment, edge network, zero-config CI/CD).
55
- - **Monitoring**: Sentry + PostHog (crash reporting, user analytics).
56
-
57
- #### 3. Architecture & Database Schema
58
- - **Architecture (`multiple-entry-points`)**: Apply the `multiple-entry-points` pattern to logically separate the public landing page, the authenticated tenant dashboard, and the administrative backend. This ensures the public site loads blazingly fast without bootstrapping heavy application logic.
59
- - **Super Admin Dashboard**: A critical requirement for application management. The Super Admin panel must be explicitly separated and deployed on a dedicated subdomain (e.g., `admin.example.com`). This isolates administrative capabilities (user moderation, global metrics, tenant management) from the main application.
60
- - **Schema (Multi-tenant SaaS)**: Choose between **Shared Schema** (tenant_id on every table, simpler) or **Isolated Schema** (schema-per-tenant, stricter isolation). Please refer to the code examples below for Shared Schema database configurations in Prisma and Drizzle. Ensure the User schema includes a role or flag (e.g., `isSuperAdmin`) to restrict access to the admin subdomain.
61
-
62
- #### 4. Pre-Launch Checklist
63
- - **Technical**: Authentication works, Payments work end-to-end, Error monitoring configured (Sentry), Database backups active, Rate limiting on API routes, Input validation with Zod.
64
- - **Session Management Optimization**: Use Edge-compatible JWTs combined with Redis (e.g., Upstash) for high-performance session validation. Avoid blocking relational database queries on every authenticated request.
65
- - **Authentication & Auth Provider Checklist**:
66
- - **Clerk**: Ensure webhook secrets are configured in production to sync user creations/deletions, set `ClerkProvider` dynamic flags, and lock down middleware matching routes so API folders are protected.
67
- - **NextAuth.js (Auth.js)**: Verify `NEXTAUTH_SECRET` is set with a strong generated value, session driver is correctly configured (JWT or database sessions), and token expiration rules are set appropriately.
68
- - **Product**: Landing page with clear value prop, Pricing page with 2-3 tiers, Onboarding flow (< 5 minutes to first value), ToS and Privacy Policy, **Super Admin Dashboard** deployed on a subdomain for app management.
69
- - **Marketing**: Domain configured, SEO meta tags on all pages, Analytics active.
70
-
71
-
72
- ### Best Practices & Troubleshooting
73
- - **Build Fast**: Ship a working MVP in 4-6 weeks maximum, then iterate based on feedback.
74
- - **Charge from Day 1**: Paying users validate product-market fit.
75
- - **Stripe Webhooks**: Use Stripe CLI for local testing: `stripe listen --forward-to localhost:3000/api/webhooks/stripe`.
76
-
77
- ---
78
-
79
- <a name="bahasa-indonesia"></a>
80
- ## Bahasa Indonesia
81
-
82
- ### Integrasi Orkestrasi
83
- Terhubung dan mengorkestrasi skill domain yang relevan seperti `modern-web-guidance`, `brainstorming`, `zero-to-prod-orchestrator`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.
84
- - **MANDATORY**: Eksekusi `modern-web-guidance` PERTAMA KALI untuk semua fitur frontend HTML/CSS/JS guna memastikan kepatuhan dengan standar modern Google.
85
-
86
- ### Ringkasan
87
- Skill ini memandu Anda membangun SaaS MVP tingkat produksi dalam waktu sesingkat mungkin. Panduan ini mencakup validasi ide, pemilihan stack teknologi, autentikasi, pembayaran, desain database, deployment, hingga checklist peluncuran menggunakan teknologi modern yang teruji.
88
-
89
- ### Kondisi Pemicu
90
- Gunakan skill ini ketika:
91
- - Memulai produk SaaS baru dari awal.
92
- - Memilih stack teknologi untuk aplikasi web SaaS.
93
- - Mengatur autentikasi, penagihan (billing), atau database untuk SaaS.
94
- - Memerlukan checklist peluncuran terstruktur sebelum rilis ke publik.
95
- - Merancang arsitektur aplikasi multi-tenant.
96
- - Melakukan tinjauan teknis (audit) terhadap SaaS tahap awal.
97
-
98
- ### Panduan Langkah demi Langkah
99
-
100
- #### 1. Validasi Sebelum Membangun
101
- Sebelum menulis kode, lakukan validasi ide:
102
- - [ ] Apakah Anda dapat menjelaskan masalah dalam satu kalimat?
103
- - [ ] Siapa target pelanggan yang tepat? (bukan "semua orang")
104
- - [ ] Apa alternatif berbayar yang mereka gunakan saat ini?
105
- - [ ] Apakah Anda sudah berbicara dengan 5+ calon pelanggan?
106
- - [ ] Apakah mereka bersedia membayar sebesar $X/bulan untuk solusi Anda?
107
-
108
- *Aturan:* Jika Anda tidak bisa mendapatkan 3 orang yang bersedia melakukan pre-pay atau menandatangani letter of intent, jangan mulai menulis kode terlebih dahulu.
109
-
110
- #### 2. Pilih Stack Teknologi Anda
111
- Rekomendasi stack SaaS modern (2026):
112
- - **Frontend**: Next.js 15 + TypeScript (App Router, Server Components).
113
- - **Styling**: Tailwind CSS v4 + shadcn/ui.
114
- - **Backend**: Next.js Server Actions (integrasi DB langsung, type-safe).
115
- - **Database**: PostgreSQL (Supabase atau Neon) dengan RLS.
116
- - **ORM**: Drizzle ORM atau Prisma.
117
- - **Auth**: Clerk atau NextAuth.js (Auth.js).
118
- - **Payments**: Pilihan Stripe, Midtrans (untuk Asia Tenggara/Indonesia), PayPal, Paddle, atau FastSpring (termasuk fitur langganan, customer portal, dan kepatuhan pajak otomatis).
119
- - **Email**: Resend + React Email.
120
- - **Deployment**: Vercel (CI/CD otomatis, edge network).
121
- - **Monitoring**: Sentry + PostHog (crash reporting, user analytics).
122
-
123
- #### 3. Arsitektur & Database Schema
124
- - **Arsitektur (`multiple-entry-points`)**: Terapkan pola `multiple-entry-points` untuk memisahkan secara logis halaman *landing page* publik, *dashboard* tenant yang diautentikasi, dan *backend* administratif. Ini memastikan situs publik memuat dengan sangat cepat tanpa memuat logika aplikasi yang berat.
125
- - **Dashboard Super Admin**: Fitur wajib untuk manajemen aplikasi. Panel Super Admin harus dipisahkan secara eksplisit dan di-deploy pada subdomain khusus (contoh: `admin.example.com`). Hal ini mengisolasi akses administratif (moderasi user, metrik sistem, manajemen tenant) dari aplikasi utama.
126
- - **Schema (Multi-tenant SaaS)**: Pilih antara **Shared Schema** (tenant_id di setiap tabel, lebih sederhana) atau **Isolated Schema** (schema-per-tenant, isolasi lebih ketat). Skema database multi-tenant Shared Schema menyediakan struktur relasi antara `User`, `Workspace`, `WorkspaceMember`, dan `Subscription` (lihat acuan kode di bawah). Pastikan skema User memiliki flag atau role (contoh: `isSuperAdmin`) untuk membatasi akses ke subdomain admin.
127
-
128
- #### 4. Checklist Peluncuran (Pre-Launch Checklist)
129
- - **Teknis**: Autentikasi bekerja dengan baik, Pembayaran bekerja end-to-end (subscribe, cancel), Pemantauan error terkonfigurasi (Sentry), Database backup aktif, Rate limiting pada API routes, Validasi input dengan Zod pada semua form.
130
- - **Optimasi Session Management**: Gunakan JWT (Edge-compatible) yang dikombinasikan dengan Redis (contoh: Upstash) untuk validasi sesi berkinerja tinggi. Hindari query database relasional yang memblokir pada setiap request yang terautentikasi.
131
- - **Checklist Autentikasi & Auth Provider**:
132
- - **Clerk**: Pastikan webhook secret dikonfigurasi di produksi untuk sinkronisasi pembuatan/penghapusan user, atur dynamic flags pada `ClerkProvider`, dan kunci middleware agar seluruh endpoint API terproteksi.
133
- - **NextAuth.js (Auth.js)**: Pastikan `NEXTAUTH_SECRET` diatur dengan nilai acak yang kuat di environment production, adapter session terhubung dengan benar (JWT atau database session), dan atur waktu kedaluwarsa token secara aman.
134
- - **Produk**: Landing page dengan proposisi nilai yang jelas, Halaman harga (pricing) dengan 2-3 tier, Alur onboarding (< 5 menit), Dokumen Terms of Service dan Kebijakan Privasi, **Dashboard Super Admin** yang di-deploy di subdomain untuk manajemen aplikasi.
135
- - **Pemasaran**: Domain terkonfigurasi, Tag meta SEO pada semua halaman, Google Analytics/PostHog aktif, Akun media sosial siap.
136
-
137
-
138
- ### Praktik Terbaik & Pemecahan Masalah
139
- - **Iterasi Cepat**: Luncurkan MVP dalam waktu maksimal 4-6 minggu, lalu lakukan iterasi berdasarkan masukan pengguna.
140
- - **Tarik Biaya sejak Hari Ke-1**: Pengguna berbayar memvalidasi keselarasan produk dengan kebutuhan pasar secara nyata.
141
- - **Webhook Stripe**: Gunakan Stripe CLI untuk pengujian webhook lokal: `stripe listen --forward-to localhost:3000/api/webhooks/stripe`.
142
-
143
- ---
144
-
145
- ## Code References / Acuan Kode
146
-
147
- ### Prisma Schema (`prisma/schema.prisma`)
148
- ```prisma
149
- model User {
150
- id String @id @default(cuid())
151
- email String @unique
152
- name String?
153
- isSuperAdmin Boolean @default(false)
154
- createdAt DateTime @default(now())
155
- subscription Subscription?
156
- workspaces WorkspaceMember[]
157
- }
158
-
159
- model Workspace {
160
- id String @id @default(cuid())
161
- name String
162
- slug String @unique
163
- plan Plan @default(FREE)
164
- members WorkspaceMember[]
165
- createdAt DateTime @default(now())
166
- }
167
-
168
- model WorkspaceMember {
169
- id String @id @default(cuid())
170
- workspaceId String
171
- workspace Workspace @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
172
- userId String
173
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
174
- role String // ADMIN, MEMBER
175
- createdAt DateTime @default(now())
176
-
177
- @@unique([workspaceId, userId])
178
- }
179
-
180
- model Subscription {
181
- id String @id @default(cuid())
182
- userId String @unique
183
- user User @relation(fields: [userId], references: [id])
184
- stripeCustomerId String @unique
185
- stripePriceId String
186
- stripeSubId String @unique
187
- status String # active, canceled, past_due
188
- currentPeriodEnd DateTime
189
- }
190
-
191
- enum Plan {
192
- FREE
193
- PRO
194
- ENTERPRISE
195
- }
196
- ```
197
-
198
- ### Drizzle ORM Schema (`lib/db/schema.ts`)
199
- ```typescript
200
- import { pgTable, text, timestamp, pgEnum, unique, boolean } from 'drizzle-orm/pg-core';
201
-
202
- export const planEnum = pgEnum('plan', ['FREE', 'PRO', 'ENTERPRISE']);
203
-
204
- export const users = pgTable('users', {
205
- id: text('id').primaryKey(),
206
- email: text('email').notNull().unique(),
207
- name: text('name'),
208
- isSuperAdmin: boolean('is_super_admin').default(false).notNull(),
209
- createdAt: timestamp('created_at').defaultNow().notNull(),
210
- });
211
-
212
- export const workspaces = pgTable('workspaces', {
213
- id: text('id').primaryKey(),
214
- name: text('name').notNull(),
215
- slug: text('slug').notNull().unique(),
216
- plan: planEnum('plan').default('FREE').notNull(),
217
- createdAt: timestamp('created_at').defaultNow().notNull(),
218
- });
219
-
220
- export const workspaceMembers = pgTable('workspace_members', {
221
- id: text('id').primaryKey(),
222
- workspaceId: text('workspace_id').references(() => workspaces.id, { onDelete: 'cascade' }).notNull(),
223
- userId: text('user_id').references(() => users.id, { onDelete: 'cascade' }).notNull(),
224
- role: text('role').$type<'ADMIN' | 'MEMBER'>().default('MEMBER').notNull(),
225
- createdAt: timestamp('created_at').defaultNow().notNull(),
226
- }, (t) => ({
227
- unq: unique().on(t.workspaceId, t.userId),
228
- }));
229
-
230
- export const subscriptions = pgTable('subscriptions', {
231
- id: text('id').primaryKey(),
232
- userId: text('user_id').references(() => users.id).notNull().unique(),
233
- stripeCustomerId: text('stripe_customer_id').notNull().unique(),
234
- stripePriceId: text('stripe_price_id').notNull(),
235
- stripeSubId: text('stripe_sub_id').notNull().unique(),
236
- status: text('status').notNull(),
237
- currentPeriodEnd: timestamp('current_period_end').notNull(),
238
- });
239
- ```
240
-
241
- ---
242
- ### 🎨 Automatic Visual Assets Generation Mandate (CRITICAL)
243
- **MANDATORY**: Whenever you are building a new application, scaffolding a project, or finalizing the initial UI/UX, you MUST automatically use the `generate_image` tool to create a custom logo that perfectly matches the application's core concept and aesthetic.
244
- This generated image MUST be explicitly used as:
245
- 1. The primary application logo (e.g., in the header/navbar).
246
- 2. The website favicon (`favicon.ico` or equivalent).
247
- 3. The Open Graph (OG) image for SEO metadata (`og:image`).
248
-
249
- Do not use placeholders for these assets. Generate and integrate them automatically.
250
-
251
- ---
252
- ### 📄 Standard Pages Mandate (CRITICAL)
253
- **MANDATORY**: Whenever you are building a new application, landing page, or website, you MUST automatically create the following standard pages:
254
- 1. **About Page** (`/about`)
255
- 2. **Profile Page** (`/profile`)
256
- 3. **Contact Page** (`/contact`)
257
- 4. **Terms of Reference / Terms of Service** (`/terms`)
258
- 5. **Privacy Policy** (`/privacy-policy`)
259
-
260
- These pages must be generated with standard boilerplate content that can later be customized to fit the specific application. Do not wait for the user to ask for them; they are a strict requirement for all web projects. / **WAJIB**: Otomatis buatkan halaman standar (About, Profile, Contact, Terms, Privacy Policy) pada setiap pembuatan aplikasi/website baru dengan konten boilerplate yang bisa disesuaikan nanti.