create-questpie 1.0.0 → 2.0.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/README.md +20 -12
- package/dist/index.mjs +9 -2
- package/package.json +21 -21
- package/templates/tanstack-start/AGENTS.md +366 -318
- package/templates/tanstack-start/CLAUDE.md +84 -52
- package/templates/tanstack-start/README.md +59 -52
- package/templates/tanstack-start/components.json +20 -20
- package/templates/tanstack-start/package.json +6 -0
- package/templates/tanstack-start/questpie.config.ts +7 -7
- package/templates/tanstack-start/src/lib/auth-client.ts +3 -3
- package/templates/tanstack-start/src/lib/client.ts +13 -0
- package/templates/tanstack-start/src/lib/env.ts +19 -22
- package/templates/tanstack-start/src/lib/query-client.ts +5 -5
- package/templates/tanstack-start/src/questpie/admin/admin.ts +8 -4
- package/templates/tanstack-start/src/questpie/server/.generated/factories.ts +318 -0
- package/templates/tanstack-start/src/questpie/server/.generated/index.ts +153 -0
- package/templates/tanstack-start/src/questpie/server/app.ts +10 -52
- package/templates/tanstack-start/src/questpie/server/collections/posts.collection.ts +39 -53
- package/templates/tanstack-start/src/questpie/server/config/admin.ts +83 -0
- package/templates/tanstack-start/src/questpie/server/config/auth.ts +8 -0
- package/templates/tanstack-start/src/questpie/server/config/openapi.ts +10 -0
- package/templates/tanstack-start/src/questpie/server/globals/site-settings.global.ts +9 -14
- package/templates/tanstack-start/src/questpie/server/modules.ts +10 -0
- package/templates/tanstack-start/src/questpie/server/questpie.config.ts +20 -0
- package/templates/tanstack-start/src/router.tsx +6 -5
- package/templates/tanstack-start/src/routes/__root.tsx +11 -9
- package/templates/tanstack-start/src/routes/admin/$.tsx +14 -13
- package/templates/tanstack-start/src/routes/admin/index.tsx +11 -10
- package/templates/tanstack-start/src/routes/admin/login.tsx +11 -10
- package/templates/tanstack-start/src/routes/admin.tsx +53 -52
- package/templates/tanstack-start/src/routes/api/{cms/$.ts → $.ts} +6 -20
- package/templates/tanstack-start/src/styles.css +109 -109
- package/templates/tanstack-start/tsconfig.json +27 -25
- package/templates/tanstack-start/vite.config.ts +5 -3
- package/templates/tanstack-start/src/lib/cms-client.ts +0 -12
- package/templates/tanstack-start/src/migrations/index.ts +0 -8
- package/templates/tanstack-start/src/questpie/admin/builder.ts +0 -4
- package/templates/tanstack-start/src/questpie/server/builder.ts +0 -4
- package/templates/tanstack-start/src/questpie/server/dashboard.ts +0 -68
- package/templates/tanstack-start/src/questpie/server/rpc.ts +0 -4
- package/templates/tanstack-start/src/questpie/server/sidebar.ts +0 -26
package/README.md
CHANGED
|
@@ -44,21 +44,23 @@ my-app/
|
|
|
44
44
|
├── src/
|
|
45
45
|
│ ├── questpie/
|
|
46
46
|
│ │ ├── server/
|
|
47
|
-
│ │ │ ├──
|
|
48
|
-
│ │ │ ├──
|
|
49
|
-
│ │ │ ├──
|
|
50
|
-
│ │ │
|
|
47
|
+
│ │ │ ├── questpie.config.ts # runtimeConfig({ db, app, ... })
|
|
48
|
+
│ │ │ ├── modules.ts # [adminModule, ...] as const
|
|
49
|
+
│ │ │ ├── auth.ts # Auth config (satisfies AuthConfig)
|
|
50
|
+
│ │ │ ├── .generated/ # Codegen output (app + App type)
|
|
51
|
+
│ │ │ ├── collections/ # Collection definitions (auto-discovered)
|
|
52
|
+
│ │ │ └── globals/ # Global definitions (auto-discovered)
|
|
51
53
|
│ │ └── admin/
|
|
52
|
-
│ │ └──
|
|
54
|
+
│ │ └── builder.ts # Client admin builder
|
|
53
55
|
│ ├── lib/
|
|
54
|
-
│ │ ├──
|
|
55
|
-
│ │ └── query-client.ts
|
|
56
|
+
│ │ ├── client.ts # Typed client
|
|
57
|
+
│ │ └── query-client.ts # TanStack Query client
|
|
56
58
|
│ ├── routes/
|
|
57
|
-
│ │ ├── api
|
|
58
|
-
│ │ └── admin/
|
|
59
|
-
│ └── migrations/
|
|
60
|
-
├── questpie.config.ts
|
|
61
|
-
├── AGENTS.md
|
|
59
|
+
│ │ ├── api/$.ts # QUESTPIE route handler
|
|
60
|
+
│ │ └── admin/ # Admin panel routes
|
|
61
|
+
│ └── migrations/ # Drizzle migrations
|
|
62
|
+
├── questpie.config.ts # CLI config
|
|
63
|
+
├── AGENTS.md # AI agent guidance
|
|
62
64
|
├── package.json
|
|
63
65
|
└── vite.config.ts
|
|
64
66
|
```
|
|
@@ -70,8 +72,14 @@ cd my-app
|
|
|
70
72
|
cp .env.example .env # Set DATABASE_URL
|
|
71
73
|
bun questpie migrate # Run migrations
|
|
72
74
|
bun dev # Start dev server
|
|
75
|
+
|
|
76
|
+
# Add entities (auto-runs codegen)
|
|
77
|
+
bun questpie add collection products
|
|
78
|
+
bun questpie add global marketing
|
|
73
79
|
```
|
|
74
80
|
|
|
81
|
+
`questpie add` runs codegen automatically. Use `bunx questpie generate` only when you create files manually.
|
|
82
|
+
|
|
75
83
|
## Documentation
|
|
76
84
|
|
|
77
85
|
Full documentation: [https://questpie.com/docs/getting-started/quickstart](https://questpie.com/docs/getting-started/quickstart)
|
package/dist/index.mjs
CHANGED
|
@@ -260,14 +260,21 @@ async function scaffold(options) {
|
|
|
260
260
|
`${runCmd} questpie migrate`,
|
|
261
261
|
"",
|
|
262
262
|
"# Start dev server",
|
|
263
|
-
`${runCmd} dev
|
|
263
|
+
`${runCmd} dev`,
|
|
264
|
+
"",
|
|
265
|
+
"# Add entities (auto-runs codegen)",
|
|
266
|
+
`${runCmd} questpie add collection products`,
|
|
267
|
+
`${runCmd} questpie add global marketing`,
|
|
268
|
+
"",
|
|
269
|
+
"# If you create files manually",
|
|
270
|
+
"bunx questpie generate"
|
|
264
271
|
].join("\n"), "Next steps");
|
|
265
272
|
p.outro(`${label.success("Done!")} Happy building with QUESTPIE!`);
|
|
266
273
|
}
|
|
267
274
|
|
|
268
275
|
//#endregion
|
|
269
276
|
//#region src/index.ts
|
|
270
|
-
new Command().name("create-questpie").description("Create a new QUESTPIE
|
|
277
|
+
new Command().name("create-questpie").description("Create a new QUESTPIE project").version("0.1.0").argument("[project-name]", "Name of the project").option("-t, --template <name>", "Template to use (default: tanstack-start)").option("--no-install", "Skip dependency installation").option("--no-git", "Skip git initialization").action(async (projectName, opts) => {
|
|
271
278
|
if (opts.template && !getTemplate(opts.template)) {
|
|
272
279
|
console.error(`Unknown template: ${opts.template}`);
|
|
273
280
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-questpie",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Create a new QUESTPIE project",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"create",
|
|
7
|
+
"framework",
|
|
8
|
+
"questpie",
|
|
9
|
+
"scaffold",
|
|
10
|
+
"template"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/questpie/questpie.git",
|
|
16
|
+
"directory": "packages/create-questpie"
|
|
17
|
+
},
|
|
6
18
|
"bin": {
|
|
7
19
|
"create-questpie": "./dist/index.mjs"
|
|
8
20
|
},
|
|
@@ -10,6 +22,10 @@
|
|
|
10
22
|
"dist",
|
|
11
23
|
"templates"
|
|
12
24
|
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
13
29
|
"scripts": {
|
|
14
30
|
"build": "tsdown",
|
|
15
31
|
"dev": "tsdown --watch",
|
|
@@ -17,28 +33,12 @@
|
|
|
17
33
|
},
|
|
18
34
|
"dependencies": {
|
|
19
35
|
"@clack/prompts": "^0.10.0",
|
|
20
|
-
"commander": "^
|
|
36
|
+
"commander": "^14.0.2",
|
|
21
37
|
"picocolors": "^1.1.1"
|
|
22
38
|
},
|
|
23
39
|
"devDependencies": {
|
|
24
40
|
"bun-types": "latest",
|
|
25
41
|
"tsdown": "^0.18.3",
|
|
26
42
|
"typescript": "^5.9.2"
|
|
27
|
-
}
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "https://github.com/questpie/questpie-cms.git",
|
|
31
|
-
"directory": "packages/create-questpie"
|
|
32
|
-
},
|
|
33
|
-
"publishConfig": {
|
|
34
|
-
"access": "public"
|
|
35
|
-
},
|
|
36
|
-
"keywords": [
|
|
37
|
-
"questpie",
|
|
38
|
-
"cms",
|
|
39
|
-
"create",
|
|
40
|
-
"scaffold",
|
|
41
|
-
"template"
|
|
42
|
-
],
|
|
43
|
-
"license": "MIT"
|
|
43
|
+
}
|
|
44
44
|
}
|