create-stackforge 0.0.1 → 0.1.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.
- package/README.md +590 -56
- package/dist/cli.js +275 -198
- package/dist/cli.js.map +1 -1
- package/dist/{npm-registry-F7EVX3RR.js → npm-registry-NY37YK2P.js} +3 -3
- package/dist/npm-registry-NY37YK2P.js.map +1 -0
- package/package.json +45 -2
- package/templates/auth/nextauth-route.js +6 -0
- package/dist/npm-registry-F7EVX3RR.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,125 +1,659 @@
|
|
|
1
|
-
# StackForge
|
|
1
|
+
# StackForge CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**The universal full-stack boilerplate generator.** Scaffold production-ready apps with your choice of frontend, API, database, ORM, auth, UI library, features, and AI agent integrations — all in one command.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```bash
|
|
6
|
+
npx create-stackforge my-app
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Table of Contents
|
|
12
|
+
|
|
13
|
+
- [Why StackForge?](#why-stackforge)
|
|
14
|
+
- [Quick Start](#quick-start)
|
|
15
|
+
- [Supported Stack](#supported-stack)
|
|
16
|
+
- [Presets](#presets)
|
|
17
|
+
- [Commands](#commands)
|
|
18
|
+
- [create](#create)
|
|
19
|
+
- [add / remove](#add--remove)
|
|
20
|
+
- [list](#list)
|
|
21
|
+
- [update](#update)
|
|
22
|
+
- [doctor / fix / validate](#doctor--fix--validate)
|
|
23
|
+
- [migrate / upgrade](#migrate--upgrade)
|
|
24
|
+
- [use](#use)
|
|
25
|
+
- [list-presets](#list-presets)
|
|
26
|
+
- [AI Agent Commands](#ai-agent-commands)
|
|
27
|
+
- [AI Agent Integrations](#ai-agent-integrations)
|
|
28
|
+
- [Project Structure](#project-structure)
|
|
29
|
+
- [Configuration File](#configuration-file)
|
|
30
|
+
- [Compatibility Rules](#compatibility-rules)
|
|
31
|
+
- [Contributing](#contributing)
|
|
32
|
+
- [License](#license)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Why StackForge?
|
|
37
|
+
|
|
38
|
+
Setting up a full-stack project means wiring together a frontend framework, a UI library, a database, an ORM, authentication, an API layer, and dozens of supporting packages — each with its own config files, environment variables, and boilerplate. StackForge handles all of that in seconds.
|
|
39
|
+
|
|
40
|
+
- **One command** to scaffold a complete, working project
|
|
41
|
+
- **Modular** — add or remove any feature after creation
|
|
42
|
+
- **Preset-driven** — start with a proven stack for your use case
|
|
43
|
+
- **AI-ready** — generates config files for 8 AI coding agents
|
|
44
|
+
- **TypeScript & JavaScript** — first-class support for both
|
|
45
|
+
- **Package manager agnostic** — npm, pnpm, yarn, or bun
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
### Create with interactive prompts
|
|
6
52
|
|
|
7
53
|
```bash
|
|
8
54
|
npx create-stackforge my-app
|
|
9
55
|
```
|
|
10
56
|
|
|
11
|
-
|
|
57
|
+
You will be guided through selecting your frontend, language, UI library, database, ORM, auth provider, API type, features, and AI agents.
|
|
58
|
+
|
|
59
|
+
### Create with a preset (no prompts)
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npx create-stackforge my-app --preset saas --yes
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Create with specific options
|
|
12
66
|
|
|
13
67
|
```bash
|
|
14
|
-
|
|
68
|
+
npx create-stackforge my-app --preset starter --features email,payments --ai-agents claude,cursor --yes
|
|
15
69
|
```
|
|
16
70
|
|
|
17
|
-
|
|
71
|
+
### Global install
|
|
18
72
|
|
|
19
73
|
```bash
|
|
20
|
-
|
|
74
|
+
npm install -g create-stackforge
|
|
21
75
|
stackforge create my-app --preset saas --yes
|
|
22
|
-
stackforge create my-app --features email,storage,payments --yes
|
|
23
|
-
stackforge create my-app --ai-agents claude,codex,gemini,cursor --yes
|
|
24
|
-
stackforge create my-app --out-dir ./apps --yes
|
|
25
76
|
```
|
|
26
77
|
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Supported Stack
|
|
81
|
+
|
|
82
|
+
### Frontends
|
|
83
|
+
|
|
84
|
+
| Frontend | Description |
|
|
85
|
+
| -------- | ----------------------------------------------------------- |
|
|
86
|
+
| `nextjs` | Next.js (App Router) — SSR, SSG, API routes, server actions |
|
|
87
|
+
| `vite` | Vite + React — fast SPA development with HMR |
|
|
88
|
+
|
|
89
|
+
### Languages
|
|
90
|
+
|
|
91
|
+
| Language | Description |
|
|
92
|
+
| -------- | ----------------------------- |
|
|
93
|
+
| `ts` | TypeScript with strict config |
|
|
94
|
+
| `js` | JavaScript with JSX |
|
|
95
|
+
|
|
96
|
+
### UI Libraries
|
|
97
|
+
|
|
98
|
+
| Library | Description |
|
|
99
|
+
| ---------- | ------------------------------------- |
|
|
100
|
+
| `tailwind` | Tailwind CSS utility classes |
|
|
101
|
+
| `shadcn` | shadcn/ui (built on Tailwind + Radix) |
|
|
102
|
+
| `mui` | Material UI (MUI) |
|
|
103
|
+
| `chakra` | Chakra UI |
|
|
104
|
+
| `mantine` | Mantine |
|
|
105
|
+
| `antd` | Ant Design |
|
|
106
|
+
| `nextui` | NextUI |
|
|
107
|
+
| `none` | No UI library |
|
|
108
|
+
|
|
109
|
+
### Databases
|
|
110
|
+
|
|
111
|
+
| Provider | Description |
|
|
112
|
+
| ---------- | -------------------------- |
|
|
113
|
+
| `postgres` | PostgreSQL |
|
|
114
|
+
| `mysql` | MySQL |
|
|
115
|
+
| `sqlite` | SQLite |
|
|
116
|
+
| `neon` | Neon (serverless Postgres) |
|
|
117
|
+
| `supabase` | Supabase (hosted Postgres) |
|
|
118
|
+
| `none` | No database |
|
|
119
|
+
|
|
120
|
+
### ORMs
|
|
121
|
+
|
|
122
|
+
| ORM | Description |
|
|
123
|
+
| --------- | ----------------------------------------------------- |
|
|
124
|
+
| `drizzle` | Drizzle ORM — lightweight, type-safe SQL |
|
|
125
|
+
| `prisma` | Prisma — schema-first, auto-generated client |
|
|
126
|
+
| `typeorm` | TypeORM — decorator-based (PostgreSQL, MySQL, SQLite) |
|
|
127
|
+
|
|
128
|
+
### Auth Providers
|
|
129
|
+
|
|
130
|
+
| Provider | Description |
|
|
131
|
+
| ---------- | ------------------------------ |
|
|
132
|
+
| `nextauth` | NextAuth.js (requires Next.js) |
|
|
133
|
+
| `clerk` | Clerk (requires Next.js) |
|
|
134
|
+
| `supabase` | Supabase Auth |
|
|
135
|
+
| `none` | No auth |
|
|
136
|
+
|
|
137
|
+
### API Types
|
|
138
|
+
|
|
139
|
+
| Type | Description |
|
|
140
|
+
| --------- | ------------------------------------------------------ |
|
|
141
|
+
| `rest` | REST API — route handlers with fetch client |
|
|
142
|
+
| `trpc` | tRPC — end-to-end type-safe APIs (requires TypeScript) |
|
|
143
|
+
| `graphql` | GraphQL — schema + Yoga server + client |
|
|
144
|
+
| `none` | No API layer |
|
|
145
|
+
|
|
146
|
+
### Features
|
|
147
|
+
|
|
148
|
+
| Feature | Description |
|
|
149
|
+
| ---------------- | -------------------------------------------- |
|
|
150
|
+
| `email` | Email via Resend |
|
|
151
|
+
| `storage` | File storage via Cloudinary |
|
|
152
|
+
| `payments` | Payments via Stripe |
|
|
153
|
+
| `analytics` | Analytics via PostHog |
|
|
154
|
+
| `error-tracking` | Error tracking via Sentry (requires Next.js) |
|
|
155
|
+
|
|
156
|
+
### AI Agents
|
|
157
|
+
|
|
158
|
+
| Agent | Generated Files |
|
|
159
|
+
| ---------- | ----------------------------------------------------------- |
|
|
160
|
+
| `claude` | MCP server, `claude_desktop_config.json`, `.claude/` config |
|
|
161
|
+
| `copilot` | `functions.json` with tool definitions |
|
|
162
|
+
| `codex` | `functions.json`, `.codex/` config |
|
|
163
|
+
| `gemini` | `function_declarations.json` for AI Studio |
|
|
164
|
+
| `cursor` | `.cursorrules`, `.cursor/extensions.json` |
|
|
165
|
+
| `codeium` | `server-config.json` with LSP protocol |
|
|
166
|
+
| `windsurf` | `cascade.json` with Cascade protocol |
|
|
167
|
+
| `tabnine` | `config.json` with plugin configuration |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
27
171
|
## Presets
|
|
28
172
|
|
|
173
|
+
Presets are pre-configured stacks for common use cases. Use `--preset <name>` with the `create` command.
|
|
174
|
+
|
|
175
|
+
### `starter`
|
|
176
|
+
|
|
177
|
+
A minimal Next.js + TypeScript starting point.
|
|
178
|
+
|
|
179
|
+
| Layer | Choice |
|
|
180
|
+
| -------- | -------------------- |
|
|
181
|
+
| Frontend | Next.js (TypeScript) |
|
|
182
|
+
| UI | Tailwind |
|
|
183
|
+
| Database | PostgreSQL + Drizzle |
|
|
184
|
+
| Auth | None |
|
|
185
|
+
| API | tRPC |
|
|
186
|
+
| Features | None |
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
npx create-stackforge my-app --preset starter --yes
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### `saas`
|
|
193
|
+
|
|
194
|
+
Everything you need for a SaaS product.
|
|
195
|
+
|
|
196
|
+
| Layer | Choice |
|
|
197
|
+
| -------- | -------------------- |
|
|
198
|
+
| Frontend | Next.js (TypeScript) |
|
|
199
|
+
| UI | Tailwind |
|
|
200
|
+
| Database | PostgreSQL + Prisma |
|
|
201
|
+
| Auth | NextAuth |
|
|
202
|
+
| API | tRPC |
|
|
203
|
+
| Features | Email, Payments |
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
npx create-stackforge my-app --preset saas --yes
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### `ecommerce`
|
|
210
|
+
|
|
211
|
+
A storefront with payments and file uploads.
|
|
212
|
+
|
|
213
|
+
| Layer | Choice |
|
|
214
|
+
| -------- | -------------------- |
|
|
215
|
+
| Frontend | Next.js (TypeScript) |
|
|
216
|
+
| UI | Tailwind |
|
|
217
|
+
| Database | PostgreSQL + Prisma |
|
|
218
|
+
| Auth | None |
|
|
219
|
+
| API | REST |
|
|
220
|
+
| Features | Payments, Storage |
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
npx create-stackforge my-app --preset ecommerce --yes
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### `blog`
|
|
227
|
+
|
|
228
|
+
A lightweight blog with storage for images.
|
|
229
|
+
|
|
230
|
+
| Layer | Choice |
|
|
231
|
+
| -------- | -------------------- |
|
|
232
|
+
| Frontend | Next.js (TypeScript) |
|
|
233
|
+
| UI | Tailwind |
|
|
234
|
+
| Database | SQLite + Prisma |
|
|
235
|
+
| Auth | None |
|
|
236
|
+
| API | REST |
|
|
237
|
+
| Features | Storage |
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
npx create-stackforge my-app --preset blog --yes
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### `api`
|
|
244
|
+
|
|
245
|
+
A headless API backend.
|
|
246
|
+
|
|
247
|
+
| Layer | Choice |
|
|
248
|
+
| -------- | -------------------- |
|
|
249
|
+
| Frontend | Vite (TypeScript) |
|
|
250
|
+
| UI | None |
|
|
251
|
+
| Database | PostgreSQL + Drizzle |
|
|
252
|
+
| Auth | None |
|
|
253
|
+
| API | REST |
|
|
254
|
+
| Features | None |
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npx create-stackforge my-app --preset api --yes
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
List all presets:
|
|
261
|
+
|
|
29
262
|
```bash
|
|
30
|
-
stackforge list-presets
|
|
31
263
|
stackforge list-presets --details
|
|
32
264
|
```
|
|
33
265
|
|
|
34
|
-
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Commands
|
|
269
|
+
|
|
270
|
+
### `create`
|
|
271
|
+
|
|
272
|
+
Scaffold a new project.
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
npx create-stackforge <project-name> [options]
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
| Option | Description |
|
|
279
|
+
| ----------------------- | ----------------------------------------------------------------------------------------- |
|
|
280
|
+
| `--preset <name>` | Use a preset (`starter`, `saas`, `ecommerce`, `blog`, `api`) |
|
|
281
|
+
| `--features <list>` | Comma-separated features (`email,storage,payments,analytics,error-tracking`) |
|
|
282
|
+
| `--ai-agents <list>` | Comma-separated AI agents (`claude,copilot,codex,gemini,cursor,codeium,windsurf,tabnine`) |
|
|
283
|
+
| `--yes`, `--no-prompts` | Accept defaults, skip interactive prompts |
|
|
284
|
+
| `--no-install` | Skip `npm install` after scaffolding |
|
|
285
|
+
| `--dry-run` | Preview file writes without creating anything |
|
|
286
|
+
| `--out-dir <path>` | Output directory (default: current directory) |
|
|
287
|
+
|
|
288
|
+
**Examples:**
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
# Interactive mode
|
|
292
|
+
npx create-stackforge my-app
|
|
293
|
+
|
|
294
|
+
# SaaS with AI agents, no prompts
|
|
295
|
+
npx create-stackforge my-app --preset saas --ai-agents claude,cursor --yes
|
|
296
|
+
|
|
297
|
+
# Preview what would be generated
|
|
298
|
+
npx create-stackforge my-app --preset starter --dry-run
|
|
299
|
+
|
|
300
|
+
# Custom feature selection
|
|
301
|
+
npx create-stackforge my-app --features email,payments,analytics --yes
|
|
302
|
+
|
|
303
|
+
# Output to a specific directory
|
|
304
|
+
npx create-stackforge my-app --preset blog --out-dir ./projects --yes
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
### `add` / `remove`
|
|
310
|
+
|
|
311
|
+
Add or remove a feature from an existing project. Run these from inside a StackForge project directory.
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
stackforge add <category:value>
|
|
315
|
+
stackforge remove <category:value>
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
**Categories:** `ui`, `auth`, `api`, `database`, `orm`, `feature`
|
|
319
|
+
|
|
320
|
+
**Examples:**
|
|
35
321
|
|
|
36
322
|
```bash
|
|
37
|
-
|
|
323
|
+
# UI
|
|
324
|
+
stackforge add ui:shadcn
|
|
325
|
+
stackforge remove ui:shadcn
|
|
326
|
+
|
|
327
|
+
# Auth
|
|
38
328
|
stackforge add auth:nextauth
|
|
329
|
+
stackforge remove auth:nextauth
|
|
330
|
+
|
|
331
|
+
# API
|
|
39
332
|
stackforge add api:trpc
|
|
333
|
+
stackforge remove api:trpc
|
|
334
|
+
|
|
335
|
+
# Database & ORM
|
|
40
336
|
stackforge add database:postgres
|
|
41
|
-
stackforge add orm:
|
|
337
|
+
stackforge add orm:prisma
|
|
338
|
+
stackforge remove orm:prisma
|
|
339
|
+
|
|
340
|
+
# Features
|
|
42
341
|
stackforge add feature:email
|
|
43
|
-
stackforge add feature:storage
|
|
44
342
|
stackforge add feature:payments
|
|
343
|
+
stackforge add feature:storage
|
|
344
|
+
stackforge remove feature:email
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
When you add a feature, StackForge:
|
|
348
|
+
|
|
349
|
+
1. Updates `stackforge.json`
|
|
350
|
+
2. Adds/removes dependencies in `package.json`
|
|
351
|
+
3. Generates/removes the relevant source files and templates
|
|
352
|
+
4. Updates the project README
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
### `list`
|
|
357
|
+
|
|
358
|
+
Show the current project stack or available features.
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
# Show current project configuration
|
|
362
|
+
stackforge list
|
|
363
|
+
|
|
364
|
+
# Show all available features
|
|
365
|
+
stackforge list --available
|
|
366
|
+
|
|
367
|
+
# Filter by category
|
|
368
|
+
stackforge list --category database
|
|
369
|
+
stackforge list --category features
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
**Output example:**
|
|
45
373
|
|
|
46
|
-
stackforge remove auth:nextauth
|
|
47
|
-
stackforge remove api:trpc
|
|
48
374
|
```
|
|
375
|
+
frontend: nextjs (ts)
|
|
376
|
+
ui: tailwind
|
|
377
|
+
database: postgres (prisma)
|
|
378
|
+
auth: nextauth
|
|
379
|
+
api: trpc
|
|
380
|
+
features: email, payments
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
---
|
|
49
384
|
|
|
50
|
-
|
|
385
|
+
### `update`
|
|
386
|
+
|
|
387
|
+
Sync dependencies and scripts to match the current `stackforge.json`.
|
|
51
388
|
|
|
52
389
|
```bash
|
|
390
|
+
# Apply updates
|
|
53
391
|
stackforge update
|
|
392
|
+
|
|
393
|
+
# Check for mismatches without applying
|
|
54
394
|
stackforge update --check
|
|
395
|
+
|
|
396
|
+
# Compare against latest npm registry versions
|
|
397
|
+
stackforge update --live
|
|
398
|
+
|
|
399
|
+
# Allow major version bumps
|
|
55
400
|
stackforge update --live --major
|
|
56
|
-
stackforge validate
|
|
57
|
-
stackforge fix
|
|
58
|
-
stackforge doctor
|
|
59
|
-
stackforge doctor --fix
|
|
60
401
|
```
|
|
61
402
|
|
|
62
|
-
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
### `doctor` / `fix` / `validate`
|
|
406
|
+
|
|
407
|
+
Check project health and fix issues.
|
|
63
408
|
|
|
64
409
|
```bash
|
|
65
|
-
|
|
66
|
-
stackforge
|
|
67
|
-
|
|
410
|
+
# Check for missing scripts, dependencies, env keys, agent files
|
|
411
|
+
stackforge doctor
|
|
412
|
+
|
|
413
|
+
# Check and auto-fix
|
|
414
|
+
stackforge doctor --fix
|
|
415
|
+
|
|
416
|
+
# Quick fix (same as doctor --fix, without the report)
|
|
417
|
+
stackforge fix
|
|
418
|
+
|
|
419
|
+
# Validate stackforge.json against supported values and compatibility rules
|
|
420
|
+
stackforge validate
|
|
68
421
|
```
|
|
69
422
|
|
|
70
|
-
|
|
423
|
+
**What `doctor` checks:**
|
|
424
|
+
|
|
425
|
+
- Missing npm scripts
|
|
426
|
+
- Missing dependencies and devDependencies
|
|
427
|
+
- Missing environment variables in `.env.example`
|
|
428
|
+
- Missing AI agent configuration files
|
|
429
|
+
- Schema version mismatches
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
### `migrate` / `upgrade`
|
|
434
|
+
|
|
435
|
+
Manage schema versions and preset upgrades.
|
|
71
436
|
|
|
72
437
|
```bash
|
|
438
|
+
# Migrate stackforge.json to the latest schema version
|
|
73
439
|
stackforge migrate
|
|
440
|
+
|
|
441
|
+
# Preview migration without writing
|
|
74
442
|
stackforge migrate --dry-run
|
|
443
|
+
|
|
444
|
+
# Upgrade project to match a preset
|
|
75
445
|
stackforge upgrade --preset saas
|
|
76
446
|
```
|
|
77
447
|
|
|
78
|
-
|
|
448
|
+
---
|
|
449
|
+
|
|
450
|
+
### `use`
|
|
451
|
+
|
|
452
|
+
Switch the project's package manager.
|
|
79
453
|
|
|
80
454
|
```bash
|
|
81
|
-
stackforge
|
|
455
|
+
stackforge use pnpm
|
|
456
|
+
stackforge use yarn
|
|
457
|
+
stackforge use bun
|
|
458
|
+
stackforge use npm --no-install
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
### `list-presets`
|
|
464
|
+
|
|
465
|
+
Show available presets.
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
# List preset names
|
|
469
|
+
stackforge list-presets
|
|
470
|
+
|
|
471
|
+
# Show full details for each preset
|
|
472
|
+
stackforge list-presets --details
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
### AI Agent Commands
|
|
478
|
+
|
|
479
|
+
Manage AI coding agent integrations.
|
|
480
|
+
|
|
481
|
+
```bash
|
|
482
|
+
# Configure multiple agents at once
|
|
483
|
+
stackforge configure-agents --agents claude,copilot,cursor,gemini
|
|
484
|
+
|
|
485
|
+
# Add a single agent
|
|
82
486
|
stackforge add-agent claude
|
|
487
|
+
|
|
488
|
+
# Remove an agent
|
|
83
489
|
stackforge remove-agent codex
|
|
490
|
+
|
|
491
|
+
# List configured agents
|
|
84
492
|
stackforge list-agents
|
|
85
493
|
```
|
|
86
494
|
|
|
87
|
-
|
|
495
|
+
---
|
|
496
|
+
|
|
497
|
+
## AI Agent Integrations
|
|
498
|
+
|
|
499
|
+
StackForge generates configuration files that help AI coding assistants understand your project. Each agent gets:
|
|
500
|
+
|
|
501
|
+
- **`context.json`** — your project stack, features, and hints
|
|
502
|
+
- **`tools.json`** — available tool definitions based on your stack
|
|
503
|
+
- **Agent-specific config** — MCP servers, function declarations, rules files, etc.
|
|
504
|
+
|
|
505
|
+
### Claude
|
|
506
|
+
|
|
507
|
+
Generates an MCP (Model Context Protocol) server with `/tools` and `/invoke` endpoints. The server exposes your project's database, ORM, API, auth, and feature tools.
|
|
508
|
+
|
|
509
|
+
```
|
|
510
|
+
.claude/claude_desktop_config.json
|
|
511
|
+
.ai-agents/servers/claude/mcp-server.(ts|js)
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
### Copilot / Codex
|
|
515
|
+
|
|
516
|
+
Generates OpenAI-compatible function definitions for tool calling.
|
|
517
|
+
|
|
518
|
+
```
|
|
519
|
+
.ai-agents/copilot/functions.json
|
|
520
|
+
.codex/functions.json
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
### Gemini
|
|
524
|
+
|
|
525
|
+
Generates function declarations for Google AI Studio.
|
|
526
|
+
|
|
527
|
+
```
|
|
528
|
+
.ai-agents/gemini/function_declarations.json
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
### Cursor
|
|
532
|
+
|
|
533
|
+
Generates rules files that Cursor auto-discovers.
|
|
534
|
+
|
|
535
|
+
```
|
|
536
|
+
.cursorrules
|
|
537
|
+
.cursor/extensions.json
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
### Codeium / Windsurf / Tabnine
|
|
88
541
|
|
|
89
|
-
-
|
|
90
|
-
- `.ai-agents/<agent>/tools.json`
|
|
91
|
-
- `.ai-agents/servers/<agent>/`
|
|
92
|
-
- `.claude/claude_desktop_config.json` (Claude)
|
|
93
|
-
- `.codex/functions.json` (Codex)
|
|
94
|
-
- `.cursor/extensions.json` and `.cursorrules` (Cursor)
|
|
95
|
-
- `.windsurf/cascade.json` (Windsurf)
|
|
96
|
-
- `.tabnine/config.json` (Tabnine)
|
|
542
|
+
Generates protocol-specific configuration files.
|
|
97
543
|
|
|
98
|
-
|
|
544
|
+
```
|
|
545
|
+
.ai-agents/codeium/server-config.json
|
|
546
|
+
.windsurf/cascade.json
|
|
547
|
+
.tabnine/config.json
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
---
|
|
551
|
+
|
|
552
|
+
## Project Structure
|
|
553
|
+
|
|
554
|
+
A generated StackForge project has this structure (varies based on your stack):
|
|
555
|
+
|
|
556
|
+
```
|
|
557
|
+
my-app/
|
|
558
|
+
├── app/ # Next.js App Router (or src/ for Vite)
|
|
559
|
+
│ ├── layout.tsx
|
|
560
|
+
│ ├── page.tsx
|
|
561
|
+
│ ├── api/
|
|
562
|
+
│ │ ├── hello/route.ts # REST endpoint
|
|
563
|
+
│ │ ├── graphql/route.ts # GraphQL endpoint
|
|
564
|
+
│ │ ├── trpc/[trpc]/route.ts # tRPC handler
|
|
565
|
+
│ │ └── auth/[...nextauth]/ # Auth route
|
|
566
|
+
│ └── auth/
|
|
567
|
+
│ ├── signin/page.tsx
|
|
568
|
+
│ └── protected/page.tsx
|
|
569
|
+
├── src/
|
|
570
|
+
│ ├── api/client.ts # REST client
|
|
571
|
+
│ ├── trpc/client.ts # tRPC client
|
|
572
|
+
│ ├── graphql/client.ts # GraphQL client
|
|
573
|
+
│ ├── db/ # Database client
|
|
574
|
+
│ └── lib/
|
|
575
|
+
│ ├── stripe.ts # Payments
|
|
576
|
+
│ ├── resend.ts # Email
|
|
577
|
+
│ ├── posthog.ts # Analytics
|
|
578
|
+
│ └── sentry.ts # Error tracking
|
|
579
|
+
├── auth/
|
|
580
|
+
│ ├── auth-options.ts # Auth configuration
|
|
581
|
+
│ └── README.md
|
|
582
|
+
├── drizzle/ or prisma/ # ORM schema
|
|
583
|
+
├── .ai-agents/ # AI agent configs
|
|
584
|
+
├── docs/ # Feature documentation
|
|
585
|
+
├── stackforge.json # Project configuration
|
|
586
|
+
├── package.json
|
|
587
|
+
├── .env.example # Required environment variables
|
|
588
|
+
├── .gitignore
|
|
589
|
+
└── .editorconfig
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
594
|
+
## Configuration File
|
|
595
|
+
|
|
596
|
+
Every StackForge project has a `stackforge.json` at the root:
|
|
597
|
+
|
|
598
|
+
```json
|
|
599
|
+
{
|
|
600
|
+
"_schemaVersion": 1,
|
|
601
|
+
"projectName": "my-app",
|
|
602
|
+
"packageManager": "pnpm",
|
|
603
|
+
"frontend": { "type": "nextjs", "language": "ts" },
|
|
604
|
+
"ui": { "library": "tailwind" },
|
|
605
|
+
"database": { "provider": "postgres", "orm": "prisma" },
|
|
606
|
+
"auth": { "provider": "nextauth" },
|
|
607
|
+
"api": { "type": "trpc" },
|
|
608
|
+
"features": ["email", "payments"],
|
|
609
|
+
"aiAgents": ["claude", "cursor"]
|
|
610
|
+
}
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
This file is the source of truth. All CLI commands (`add`, `remove`, `update`, `doctor`, etc.) read and write this file. It auto-migrates when the schema version changes.
|
|
99
614
|
|
|
100
|
-
|
|
101
|
-
- Generated apps include `.gitignore`, `.editorconfig`, and `.env.example`.
|
|
102
|
-
- Feature docs: `docs/FEATURE_EMAIL.md`, `docs/FEATURE_STORAGE.md`, `docs/FEATURE_PAYMENTS.md`.
|
|
103
|
-
- Docs: `docs/API.md`, `docs/AI_AGENTS.md`, `docs/CONTRIBUTING.md`, `docs/TROUBLESHOOTING.md`.
|
|
104
|
-
- Extra docs: `docs/PRESETS.md`, `docs/MIGRATIONS.md`, `docs/COMPATIBILITY.md`.
|
|
105
|
-
- Release guide: `RELEASE.md`.
|
|
615
|
+
---
|
|
106
616
|
|
|
107
|
-
##
|
|
617
|
+
## Compatibility Rules
|
|
618
|
+
|
|
619
|
+
Not every combination is valid. StackForge validates these rules before generating:
|
|
620
|
+
|
|
621
|
+
| Rule | Reason |
|
|
622
|
+
| --------------------------------------------- | ---------------------------------------------- |
|
|
623
|
+
| NextAuth requires Next.js | NextAuth uses Next.js API routes |
|
|
624
|
+
| Clerk requires Next.js | Clerk middleware is Next.js-specific |
|
|
625
|
+
| tRPC requires TypeScript | tRPC relies on TypeScript type inference |
|
|
626
|
+
| TypeORM requires PostgreSQL, MySQL, or SQLite | TypeORM does not support Neon/Supabase drivers |
|
|
627
|
+
| Error tracking (Sentry) requires Next.js | Sentry integration uses `@sentry/nextjs` |
|
|
628
|
+
| ORM requires a database provider | Cannot use an ORM without selecting a database |
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
## Requirements
|
|
633
|
+
|
|
634
|
+
- **Node.js** >= 18.0.0
|
|
635
|
+
- **npm**, **pnpm**, **yarn**, or **bun**
|
|
636
|
+
|
|
637
|
+
---
|
|
638
|
+
|
|
639
|
+
## Contributing
|
|
640
|
+
|
|
641
|
+
See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for development setup, testing, and contribution guidelines.
|
|
108
642
|
|
|
109
643
|
```bash
|
|
644
|
+
# Development
|
|
110
645
|
pnpm install
|
|
111
646
|
pnpm dev
|
|
112
|
-
```
|
|
113
647
|
|
|
114
|
-
|
|
648
|
+
# Build
|
|
649
|
+
pnpm build
|
|
115
650
|
|
|
116
|
-
|
|
117
|
-
pnpm test:smoke
|
|
118
|
-
pnpm test:add-remove
|
|
119
|
-
pnpm test:list
|
|
120
|
-
pnpm test:doctor
|
|
121
|
-
pnpm test:agents
|
|
122
|
-
pnpm test:agent-add-remove
|
|
123
|
-
pnpm test:deps
|
|
651
|
+
# Run all tests
|
|
124
652
|
pnpm test:all
|
|
125
653
|
```
|
|
654
|
+
|
|
655
|
+
---
|
|
656
|
+
|
|
657
|
+
## License
|
|
658
|
+
|
|
659
|
+
MIT
|