vibe-now 1.0.1 → 1.0.3

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/README.md CHANGED
@@ -95,6 +95,24 @@ fs.writeFileSync(path.join(projectPath, 'CONFIG.md'), renderedMy);
95
95
 
96
96
  ---
97
97
 
98
+ ## 🤖 Prompting Examples for AI
99
+
100
+ Since most development on this CLI is done using AI assistants (Cursor, Claude, etc.), here are some proven prompts to extend the tool:
101
+
102
+ ### To add a new library:
103
+ > "I want to add `lucide-react` to the UI Helpers category. It should be enabled by default. Add it to the configuration in `lib/packages.js` and suggest a good engineering guidance string for the AGENTS.md file."
104
+
105
+ ### To add a new Mutual Exclusive option:
106
+ > "Add a new 'Database Driver' category under Database. It should be a single-choice list between 'Postgres (pg)' and 'SQLite (libsql)'. Map this correctly in the `providerConfig` so it installs the right packages."
107
+
108
+ ### To add a new documentation template:
109
+ > "Create a new template `templates/ENVIRONMENT.hbs` that lists required .env variables for the selected packages. Then, update `plopfile.js` to render this as `.env.example` in the project root."
110
+
111
+ ### To modify project validation:
112
+ > "Update the project name validation in `plopfile.js` to also check if the name is too long (over 100 characters) and return a custom error message."
113
+
114
+ ---
115
+
98
116
  ## 📦 Publishing
99
117
 
100
118
  When you're ready to release a new version:
package/lib/packages.js CHANGED
@@ -11,6 +11,7 @@ export const PACKAGE_GROUPS = [
11
11
  name: 'Zustand',
12
12
  install: ['zustand'],
13
13
  default: true,
14
+ guidance: 'Use a single store per feature. Prefer selective state extraction (e.g., `useStore(state => state.value)`) to minimize re-renders.',
14
15
  },
15
16
  ],
16
17
  },
@@ -22,6 +23,7 @@ export const PACKAGE_GROUPS = [
22
23
  name: 'Zod',
23
24
  install: ['zod'],
24
25
  default: true,
26
+ guidance: 'Use for all schema definitions and runtime validation (especially for Environment Variables and API responses). Keep schemas and types co-located.',
25
27
  },
26
28
  ],
27
29
  },
@@ -33,6 +35,7 @@ export const PACKAGE_GROUPS = [
33
35
  name: 'TanStack React Query',
34
36
  install: ['@tanstack/react-query'],
35
37
  default: true,
38
+ guidance: 'Centralize query keys in a `keys.ts` file. Prefer Server Actions for mutations and use `queryClient.invalidateQueries()` for cache invalidation.',
36
39
  },
37
40
  ],
38
41
  },
@@ -41,13 +44,14 @@ export const PACKAGE_GROUPS = [
41
44
  items: [
42
45
  {
43
46
  id: 'shadcn',
44
- name: 'shadcn/ui (Initializes & adds all components)',
47
+ name: 'shadcn/ui',
45
48
  install: [],
46
49
  commands: [
47
- ['npx', 'shadcn@latest', 'init', '-y'],
48
- ['npx', 'shadcn@latest', 'add', '--all', '-y'],
50
+ ['npx', '--yes', 'shadcn@latest', 'init', '-d'],
51
+ ['npx', '--yes', 'shadcn@latest', 'add', '--all', '-y'],
49
52
  ],
50
53
  default: true,
54
+ guidance: 'Base components live in `components/ui/`. DO NOT modify them unless absolutely necessary for global design changes. Compose them in `components/` for feature-specific needs.',
51
55
  },
52
56
  ],
53
57
  },
@@ -59,6 +63,7 @@ export const PACKAGE_GROUPS = [
59
63
  name: 'Better Auth',
60
64
  install: ['better-auth'],
61
65
  default: false,
66
+ guidance: 'Follow the Next.js App Router patterns. Keep the auth logic secure in Server Actions and use the provided middleware for route protection.',
62
67
  },
63
68
  ],
64
69
  },
@@ -70,13 +75,15 @@ export const PACKAGE_GROUPS = [
70
75
  name: 'Supabase JS client',
71
76
  install: ['@supabase/supabase-js'],
72
77
  default: true,
78
+ guidance: 'Use the official Supabase SSR package for Next.js. Keep database queries inside Server Components or Server Actions to avoid exposing the Service Role key.',
73
79
  },
74
80
  {
75
81
  id: 'drizzle',
76
- name: 'Drizzle ORM (with Postgres & Kit)',
82
+ name: 'Drizzle ORM',
77
83
  install: ['drizzle-orm', 'pg'],
78
84
  devInstall: ['drizzle-kit'],
79
85
  default: true,
86
+ guidance: 'Define schemas in `db/schema.ts`. Use `drizzle-kit` for migrations. Prefer the `db.query.xyz.findMany()` syntax for better type-safety and relations handling.',
80
87
  },
81
88
  ],
82
89
  },
@@ -88,6 +95,7 @@ export const PACKAGE_GROUPS = [
88
95
  name: 'Resend',
89
96
  install: ['resend'],
90
97
  default: false,
98
+ guidance: 'Use React Email templates for rich emails. Centralize email logic in a `lib/email.ts` utility.',
91
99
  },
92
100
  ],
93
101
  },
@@ -101,15 +109,16 @@ export const PACKAGE_GROUPS = [
101
109
  { name: 'Polar.sh (SDK + Next.js integration)', value: 'polar' },
102
110
  ],
103
111
  default: 'none',
104
- // Mapping provider value to actual package config
105
112
  providerConfig: {
106
113
  stripe: {
107
114
  name: 'Stripe',
108
115
  install: ['stripe', '@stripe/stripe-js', '@stripe/react-stripe-js'],
116
+ guidance: 'Use Stripe webhooks to handle subscription lifecycle. Centralize price IDs in constants.',
109
117
  },
110
118
  polar: {
111
119
  name: 'Polar.sh',
112
120
  install: ['@polar-sh/sdk', '@polar-sh/nextjs'],
121
+ guidance: 'Integrate using Polar webhooks. Use the Next.js SDK for seamless integration with App Router.',
113
122
  },
114
123
  },
115
124
  },
@@ -121,12 +130,14 @@ export const PACKAGE_GROUPS = [
121
130
  name: 'Vercel AI SDK',
122
131
  install: ['ai'],
123
132
  default: false,
133
+ guidance: 'Use `streamText` for real-time chat interfaces. Keep LLM configurations in `lib/ai/` and use the UI hooks like `useChat`.',
124
134
  },
125
135
  {
126
136
  id: 'openRouter',
127
137
  name: 'OpenRouter AI SDK Provider',
128
138
  install: ['@openrouter/ai-sdk-provider'],
129
139
  default: false,
140
+ guidance: 'Use OpenRouter as a gateway for multiple models. Configure keys in `.env.local` and use the AI SDK provider pattern.',
130
141
  },
131
142
  ],
132
143
  },
@@ -150,13 +161,15 @@ export const PACKAGE_GROUPS = [
150
161
  'eslint-config-prettier',
151
162
  'eslint-plugin-prettier'
152
163
  ],
164
+ guidance: 'Standard Next.js linting combined with Prettier. Ensure `eslint-config-prettier` is the last item in the extends array.',
153
165
  },
154
166
  biome: {
155
167
  name: 'Biome',
156
168
  devInstall: ['@biomejs/biome'],
157
169
  commands: [
158
- ['npx', '@biomejs/biome', 'init']
170
+ ['npx', '--yes', '@biomejs/biome', 'init']
159
171
  ],
172
+ guidance: 'Consolidated linting and formatting. Run `npx @biomejs/biome check --apply .` before commits.',
160
173
  },
161
174
  },
162
175
  },
@@ -165,31 +178,34 @@ export const PACKAGE_GROUPS = [
165
178
  items: [
166
179
  {
167
180
  id: 'nuqs',
168
- name: 'nuqs (Type-safe query params)',
181
+ name: 'nuqs',
169
182
  install: ['nuqs'],
170
183
  default: false,
184
+ guidance: 'Manage URL search parameters as state. Use the `parseAs...` helpers for strict type-casting.',
171
185
  },
172
186
  {
173
187
  id: 'hookForm',
174
188
  name: 'React Hook Form',
175
189
  install: ['react-hook-form'],
176
190
  default: true,
191
+ guidance: 'Always pair with `@hookform/resolvers/zod` for validation. Keep form components uncontrolled for maximum performance.',
177
192
  },
178
193
  {
179
194
  id: 'dayjs',
180
- name: 'Day.js (Date handling)',
195
+ name: 'Day.js',
181
196
  install: ['dayjs'],
182
197
  default: false,
198
+ guidance: 'Lightweight date library. Use plugins (e.g., `relativeTime`) only when needed to keep the bundle small.',
183
199
  },
184
200
  {
185
201
  id: 'lodash',
186
- name: 'Lodash (Utilities)',
202
+ name: 'Lodash',
187
203
  install: ['lodash'],
188
204
  default: false,
205
+ guidance: 'Import only the specific functions you need (e.g., `import debounce from "lodash/debounce"`) to avoid bundle bloat.',
189
206
  },
190
207
  ],
191
208
  },
192
209
  ];
193
210
 
194
- // Helper to get a flat list of all potential packages for the prompt validation or internal logic if needed
195
211
  export const ALL_ITEMS = PACKAGE_GROUPS.flatMap(group => group.items || []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-now",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,15 +9,54 @@ high-quality engineering standards.
9
9
  - **Styling**: Tailwind CSS (Utility-first)
10
10
  - **Components**: shadcn/ui (Radix UI primitives)
11
11
 
12
- ## 🛠️ Tech Stack Consistency
12
+ ## 📁 Directory Structure
13
+ ```text
14
+ .
15
+ ├── app/ # Next.js App Router (Pages, Layouts, API)
16
+ │ ├── api/ # Route Handlers
17
+ │ ├── (auth)/ # Grouped Auth routes
18
+ │ ├── globals.css # Global styles & Tailwind directives
19
+ │ └── layout.tsx # Root layout
20
+ ├── components/ # React Components
21
+ │ ├── ui/ # shadcn/ui primitives (do not edit manually)
22
+ │ └── shared/ # Reusable feature components
23
+ ├── hooks/ # Custom React Hooks
24
+ ├── lib/ # Shared utilities & configurations
25
+ │ ├── utils.ts # Tailwind merge & clsx helper
26
+ │ └── constants.ts # Global constants & config
27
+ ├── db/ # Database schema & migrations
28
+ │ ├── schema.ts # Drizzle/Prisma schema definitions
29
+ │ └── migrations/ # SQL migration files
30
+ ├── public/ # Static assets (images, fonts, etc.)
31
+ ├── scripts/ # Helper scripts (DB seeds, etc.)
32
+ ├── types/ # Global TypeScript interfaces
33
+ └── AGENTS.md # This reference file
34
+ ```
35
+
36
+ ## 🎨 Design Principles
37
+ - **Responsive Design**: Mobile-first approach using Tailwind's responsive prefixes (`sm:`, `md:`, `lg:`).
38
+ - **Minimal Aesthetic**: Clean, spacious layouts with high contrast and premium typography (Inter/Geist).
39
+ - **Dark Mode Support**: Use `dark:` variants for all colors. Ensure every component is legible in both themes.
40
+ - **Component-Driven**: Prioritize shadcn components. Use `cn()` for merging classes.
41
+ - **Interactive States**: Implement subtle hover, focus, and active states for better UX.
42
+
43
+ ## 🔤 Naming Conventions
44
+ - **Files & Directories**: use `kebab-case` (e.g., `user-profile-card.tsx`).
45
+ - **Components**: Use `PascalCase` (e.g., `export function UserCard()`).
46
+ - **Variables & Functions**: Use `camelCase` (e.g., `const userData = ...`).
47
+ - **Constants**: Use `SCREAMING_SNAKE_CASE` (e.g., `const API_RETRY_LIMIT = 3`).
48
+ - **Descriptive Names**: Favor clarity over brevity (e.g., `isUserAuthenticated` instead of `isAuth`).
49
+
50
+ ## 🛠️ Tech Stack Consistency & Guidance
13
51
  {{#each selectedPackages}}
14
- - **{{this.name}}**: Use standard patterns as defined in official documentation.
52
+ - **{{this.name}}**: {{#if this.guidance}}{{this.guidance}}{{else}}Use standard patterns as defined in official
53
+ documentation.{{/if}}
15
54
  {{/each}}
16
55
 
17
56
  ## 🤖 AI Coding Rules
18
57
 
19
58
  ### 1. General Principles
20
- - **Conciseness**: Write clean, modular code. Avoid bloated components.
59
+ - **Conciseness**: Write clean, modular code. Maintain DRY principles. Avoid bloated components.
21
60
  - **Type Safety**: Avoid `any`. Use Zod for runtime validation and TypeScript for compile-time safety.
22
61
  - **Modern Syntax**: Prefer functional components, hooks, and async/await.
23
62