create-questpie 1.0.0 → 2.0.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 (43) hide show
  1. package/README.md +20 -12
  2. package/dist/index.mjs +10 -3
  3. package/package.json +21 -21
  4. package/templates/tanstack-start/AGENTS.md +371 -318
  5. package/templates/tanstack-start/CLAUDE.md +84 -52
  6. package/templates/tanstack-start/README.md +65 -52
  7. package/templates/tanstack-start/components.json +20 -20
  8. package/templates/tanstack-start/package.json +6 -0
  9. package/templates/tanstack-start/questpie.config.ts +7 -7
  10. package/templates/tanstack-start/src/lib/auth-client.ts +3 -3
  11. package/templates/tanstack-start/src/lib/client.ts +13 -0
  12. package/templates/tanstack-start/src/lib/env.ts +19 -22
  13. package/templates/tanstack-start/src/lib/query-client.ts +5 -5
  14. package/templates/tanstack-start/src/questpie/admin/.generated/client.ts +13 -0
  15. package/templates/tanstack-start/src/questpie/admin/admin.ts +8 -4
  16. package/templates/tanstack-start/src/questpie/admin/modules.ts +1 -0
  17. package/templates/tanstack-start/src/questpie/server/.generated/factories.ts +194 -0
  18. package/templates/tanstack-start/src/questpie/server/.generated/index.ts +201 -0
  19. package/templates/tanstack-start/src/questpie/server/app.ts +10 -52
  20. package/templates/tanstack-start/src/questpie/server/collections/posts.collection.ts +39 -53
  21. package/templates/tanstack-start/src/questpie/server/config/admin.ts +83 -0
  22. package/templates/tanstack-start/src/questpie/server/config/auth.ts +8 -0
  23. package/templates/tanstack-start/src/questpie/server/config/openapi.ts +10 -0
  24. package/templates/tanstack-start/src/questpie/server/globals/site-settings.global.ts +9 -14
  25. package/templates/tanstack-start/src/questpie/server/modules.ts +10 -0
  26. package/templates/tanstack-start/src/questpie/server/questpie.config.ts +20 -0
  27. package/templates/tanstack-start/src/router.tsx +6 -5
  28. package/templates/tanstack-start/src/routes/__root.tsx +11 -9
  29. package/templates/tanstack-start/src/routes/admin/$.tsx +14 -13
  30. package/templates/tanstack-start/src/routes/admin/index.tsx +11 -10
  31. package/templates/tanstack-start/src/routes/admin/login.tsx +11 -10
  32. package/templates/tanstack-start/src/routes/admin.tsx +53 -52
  33. package/templates/tanstack-start/src/routes/api/{cms/$.ts → $.ts} +6 -20
  34. package/templates/tanstack-start/src/styles.css +109 -109
  35. package/templates/tanstack-start/tsconfig.json +27 -25
  36. package/templates/tanstack-start/vite.config.ts +5 -3
  37. package/templates/tanstack-start/src/lib/cms-client.ts +0 -12
  38. package/templates/tanstack-start/src/migrations/index.ts +0 -8
  39. package/templates/tanstack-start/src/questpie/admin/builder.ts +0 -4
  40. package/templates/tanstack-start/src/questpie/server/builder.ts +0 -4
  41. package/templates/tanstack-start/src/questpie/server/dashboard.ts +0 -68
  42. package/templates/tanstack-start/src/questpie/server/rpc.ts +0 -4
  43. package/templates/tanstack-start/src/questpie/server/sidebar.ts +0 -26
@@ -1,54 +1,74 @@
1
1
  # CLAUDE.md
2
2
 
3
- This is a [QUESTPIE CMS](https://questpie.com) project scaffolded with `create-questpie`.
3
+ This is a [QUESTPIE](https://questpie.com) project scaffolded with `create-questpie`.
4
4
 
5
5
  ## Quick Reference
6
6
 
7
- | Command | Purpose |
8
- | ----------------------------- | ---------------------------- |
9
- | `bun dev` | Start dev server (port 3000) |
10
- | `bun build` | Build for production |
11
- | `bun start` | Start production server |
12
- | `bun questpie migrate` | Run database migrations |
13
- | `bun questpie migrate:create` | Generate a new migration |
14
- | `docker compose up -d` | Start PostgreSQL |
7
+ | Command | Purpose |
8
+ | -------------------------------- | ---------------------------------------------- |
9
+ | `bun dev` | Start dev server (port 3000) |
10
+ | `bun build` | Build for production |
11
+ | `bun start` | Start production server |
12
+ | `bun questpie add <type> <name>` | Scaffold a new entity (collection, seed, etc.) |
13
+ | `bun questpie add --list` | List all available scaffold types |
14
+ | `bun questpie generate` | Regenerate .generated/index.ts |
15
+ | `bun questpie migrate:create` | Generate a migration from schema diff |
16
+ | `bun questpie migrate` | Run pending migrations |
17
+ | `bun questpie seed` | Run pending seeds |
18
+ | `docker compose up -d` | Start PostgreSQL |
15
19
 
16
20
  ## Project Architecture
17
21
 
18
22
  This project follows QUESTPIE's **server-first** philosophy:
23
+
19
24
  - **Server** defines WHAT (schema, validation, access, hooks, jobs)
20
25
  - **Client** defines HOW (rendering, themes, custom components)
21
26
 
22
27
  ```
23
28
  src/questpie/
24
- server/ ← WHAT: data contracts and behavior
25
- app.ts Main composition root (collections, globals, auth, build)
26
- builder.ts Shared builder: qb = q.use(adminModule)
27
- rpc.ts RPC router instance
28
- sidebar.ts Admin sidebar configuration
29
- dashboard.ts Admin dashboard configuration
30
- collections/ One file per collection (*.collection.ts)
31
- globals/ One file per global (*.global.ts)
32
- admin/ HOW: UI rendering concerns
33
- admin.ts ← Client builder: qa<AppCMS>().use(adminModule)
34
- builder.ts Client-side builder instance
29
+ server/ ← WHAT: data contracts and behavior
30
+ questpie.config.ts App config: runtimeConfig({ db, app, ... })
31
+ modules.ts Module dependencies (adminModule, openApiModule, etc.)
32
+ config/ Typed configuration files
33
+ auth.ts authConfig({...}) Better Auth options
34
+ admin.ts adminConfig({ sidebar, dashboard, branding, locale })
35
+ openapi.ts openApiConfig({ info, scalar })
36
+ app.ts (optional) appConfig({ locale, access, hooks, context })
37
+ .generated/ Codegen output (app instance + App type)
38
+ index.ts
39
+ collections/ One file per collection (auto-discovered)
40
+ globals/ ← One file per global (auto-discovered)
41
+ routes/ ← Server routes via route() (auto-discovered)
42
+ jobs/ ← Background job definitions (auto-discovered)
43
+ blocks/ ← Block definitions (auto-discovered)
44
+ admin/ ← HOW: UI rendering concerns
45
+ admin.ts ← Re-exports generated admin config
46
+ .generated/ ← Codegen output (admin client config)
47
+ client.ts
35
48
  ```
36
49
 
37
50
  ## Key Files
38
51
 
39
- - **`src/questpie/server/app.ts`** — The composition root. Register collections, globals, sidebar, dashboard, auth, and call `.build()`.
52
+ - **`src/questpie/server/questpie.config.ts`** — App config: `runtimeConfig({ db, app, ... })`.
53
+ - **`src/questpie/server/modules.ts`** — Module dependencies: `export default [adminModule, openApiModule] as const`.
54
+ - **`src/questpie/server/config/auth.ts`** — Auth config via `authConfig()` factory.
55
+ - **`src/questpie/server/config/admin.ts`** — Admin config (sidebar, dashboard, branding, locale) via `adminConfig()` factory.
56
+ - **`src/questpie/server/config/app.ts`** — *(optional, not scaffolded)* App config (locale, access, hooks, context) via `appConfig()`. Create when needed.
57
+ - **`src/questpie/server/.generated/index.ts`** — Codegen output. Exports typed `app` instance and `App` type. Run `bunx questpie generate` to regenerate.
40
58
  - **`src/lib/env.ts`** — Type-safe env variables via `@t3-oss/env-core`. Add new env vars here with Zod schemas.
41
59
  - **`questpie.config.ts`** — CLI config (migration directory, app reference).
42
- - **`src/routes/api/cms/$.ts`** — CMS API catch-all handler. Serves REST + OpenAPI docs at `/api/cms/docs`.
60
+ - **`src/routes/api/$.ts`** — API catch-all handler. Serves REST + OpenAPI docs at `/api/docs`.
43
61
 
44
62
  ## Environment Variables
45
63
 
46
64
  Defined in `src/lib/env.ts` with runtime validation. See `.env.example` for all available variables.
47
65
 
48
66
  Required:
67
+
49
68
  - `DATABASE_URL` — PostgreSQL connection string
50
69
 
51
70
  Optional (with defaults):
71
+
52
72
  - `APP_URL` — Application URL (default: `http://localhost:3000`)
53
73
  - `BETTER_AUTH_SECRET` — Auth secret key
54
74
  - `MAIL_ADAPTER` — `console` or `smtp`
@@ -57,49 +77,61 @@ Optional (with defaults):
57
77
 
58
78
  ### Add a new collection
59
79
 
60
- 1. Create `src/questpie/server/collections/my-thing.collection.ts`
61
- 2. Export from `src/questpie/server/collections/index.ts`
62
- 3. Register in `src/questpie/server/app.ts` `.collections({ posts, myThing })`
63
- 4. Add to sidebar in `src/questpie/server/sidebar.ts`
64
- 5. Run `bun questpie migrate:create` to generate migration
80
+ Preferred workflow:
81
+
82
+ 1. Run `bun questpie add collection my-thing`
83
+ 2. The CLI creates the file and auto-runs codegen
84
+ 3. Run `bun questpie migrate:create`
85
+
86
+ Manual workflow:
87
+
88
+ 1. Create `src/questpie/server/collections/my-thing.ts` with a named export:
89
+ ```ts
90
+ import { collection } from "#questpie/factories";
91
+ export const myThing = collection("my-thing").fields(({ f }) => ({ ... }));
92
+ ```
93
+ 2. Run `bunx questpie generate` to regenerate `.generated/index.ts`
94
+ 3. Run `bun questpie migrate:create` to generate migration
95
+
96
+ Collections are auto-discovered by codegen — no manual registration needed.
65
97
 
66
98
  ### Add a new global
67
99
 
68
- 1. Create `src/questpie/server/globals/my-global.global.ts`
69
- 2. Export from `src/questpie/server/globals/index.ts`
70
- 3. Register in `src/questpie/server/app.ts` `.globals({ siteSettings, myGlobal })`
71
- 4. Add to sidebar in `src/questpie/server/sidebar.ts`
72
- 5. Run `bun questpie migrate:create`
100
+ Preferred workflow:
101
+
102
+ 1. Run `bun questpie add global my-global`
103
+ 2. The CLI creates the file and auto-runs codegen
104
+ 3. Run `bun questpie migrate:create`
105
+
106
+ Manual workflow:
107
+
108
+ 1. Create `src/questpie/server/globals/my-global.ts` with a named export
109
+ 2. Run `bunx questpie generate`
110
+ 3. Run `bun questpie migrate:create`
73
111
 
74
- ### Add an RPC function (end-to-end type-safe)
112
+ ### Add a server route (end-to-end type-safe)
75
113
 
76
- `rpc.ts` uses `rpc<AppCMS>()` — a type-only import from `app.ts` (erased at runtime, no circular dependency). This gives you fully typed `app` in all handlers.
114
+ 1. Create `src/questpie/server/routes/my-function.ts`:
77
115
 
78
- 1. Create `src/questpie/server/functions/my-function.ts`:
79
116
  ```ts
80
- import { r } from "@/questpie/server/rpc";
117
+ import { route } from "questpie";
81
118
  import { z } from "zod";
82
119
 
83
- export const myFunction = r.fn({
84
- schema: z.object({ id: z.string() }),
85
- handler: async ({ input, app }) => {
86
- // input: { id: string } typed from Zod schema
87
- // app: AppCMS fully typed, autocomplete works
88
- return { name: "result" };
89
- },
90
- });
91
- ```
92
- 2. Register in `app.ts` → `appRpc = r.router({ ...adminRpc, myFunction })`
93
- 3. Call from client (fully typed):
94
- ```ts
95
- const result = await client.rpc.myFunction({ id: "123" });
96
- // result: { name: string } — inferred from handler return type
120
+ export default route()
121
+ .post()
122
+ .schema(z.object({ id: z.string() }))
123
+ .handler(async ({ input, collections }) => {
124
+ // input: typed from Zod schema; collections, db, session, etc. from AppContext
125
+ return { name: "result" };
126
+ });
97
127
  ```
98
128
 
99
- See AGENTS.md for detailed RPC type flow, access control, and TanStack Query integration.
129
+ 2. Run `bunx questpie generate` route is auto-discovered and available at `/api/my-function`
130
+
131
+ See AGENTS.md for detailed route patterns, access control, and TanStack Query integration.
100
132
 
101
133
  ## Documentation
102
134
 
103
135
  - **QUESTPIE Docs**: https://questpie.com/docs
104
136
  - **Getting Started**: https://questpie.com/docs/getting-started
105
- - **API Reference (local)**: http://localhost:3000/api/cms/docs (Scalar UI, available when dev server is running)
137
+ - **API Reference (local)**: http://localhost:3000/api/docs (Scalar UI, available when dev server is running)
@@ -1,94 +1,107 @@
1
1
  # {{projectName}}
2
2
 
3
- A [QUESTPIE CMS](https://questpie.com) project built with TanStack Start.
3
+ A [QUESTPIE](https://questpie.com) app built with TanStack Start.
4
4
 
5
- ## Getting Started
5
+ ## Quick Start
6
6
 
7
7
  ### Prerequisites
8
8
 
9
- - [Bun](https://bun.sh) (v1.3+)
10
- - [Docker](https://docker.com) (for PostgreSQL)
9
+ - [Bun](https://bun.sh) v1.3+
10
+ - [Docker](https://docker.com) (for local PostgreSQL)
11
11
 
12
12
  ### Setup
13
13
 
14
14
  ```bash
15
- # Start PostgreSQL
15
+ # 1) Start PostgreSQL
16
16
  docker compose up -d
17
17
 
18
- # Run database migrations
18
+ # 2) Run migrations
19
19
  bun questpie migrate
20
20
 
21
- # Start the dev server
21
+ # 3) Start development server
22
22
  bun dev
23
23
  ```
24
24
 
25
- The admin panel will be available at [http://localhost:3000/admin](http://localhost:3000/admin).
26
-
27
- The API docs (Scalar UI) are at [http://localhost:3000/api/cms/docs](http://localhost:3000/api/cms/docs).
25
+ - Admin panel: `http://localhost:3000/admin`
26
+ - API docs (Scalar): `http://localhost:3000/api/docs`
28
27
 
29
28
  ## Project Structure
30
29
 
31
- ```
30
+ ```text
32
31
  src/
33
32
  questpie/
34
33
  server/
35
- app.ts # Main CMS configuration
36
- builder.ts # Server-side builder
37
- rpc.ts # RPC router
34
+ questpie.config.ts # Runtime config
35
+ modules.ts # Module list (admin/openapi/...)
36
+ config/
37
+ admin.ts # Admin sidebar/dashboard/branding
38
+ auth.ts # Auth config
39
+ openapi.ts # OpenAPI/Scalar config
40
+ app.ts # Re-export of generated app
41
+ .generated/ # Codegen output (do not edit manually)
38
42
  collections/
39
- posts.collection.ts # Posts collection
43
+ posts.collection.ts
40
44
  globals/
41
- site-settings.global.ts # Site settings
45
+ site-settings.global.ts
42
46
  admin/
43
- admin.ts # Admin UI configuration
44
- builder.ts # Client-side builder
47
+ admin.ts # Re-export of generated admin config
48
+ modules.ts # Admin client module defaults
49
+ .generated/ # Admin client codegen output
45
50
  routes/
46
- admin.tsx # Admin layout
47
- admin/ # Admin routes
48
- api/cms/$.ts # CMS API handler
51
+ api/$.ts # QUESTPIE fetch handler mount
52
+ admin.tsx
53
+ admin/
49
54
  lib/
50
- env.ts # Type-safe environment variables
51
- cms-client.ts # CMS API client
52
- auth-client.ts # Auth client
53
- query-client.ts # React Query client
54
- migrations/ # Database migrations
55
+ env.ts
56
+ client.ts
57
+ auth-client.ts
58
+ query-client.ts
59
+ migrations/
55
60
  ```
56
61
 
57
62
  ## Scripts
58
63
 
59
- | Command | Description |
60
- | ----------------------------- | ------------------------ |
61
- | `bun dev` | Start development server |
62
- | `bun build` | Build for production |
63
- | `bun start` | Start production server |
64
- | `bun questpie migrate` | Run database migrations |
65
- | `bun questpie migrate:create` | Create a new migration |
64
+ | Command | Description |
65
+ | -------------------------------- | --------------------------------------------- |
66
+ | `bun dev` | Start development server |
67
+ | `bun build` | Build for production |
68
+ | `bun start` | Start production server |
69
+ | `bun check-types` | Type check |
70
+ | `bun questpie add <type> <name>` | Scaffold entity files (auto-runs codegen) |
71
+ | `bun questpie migrate` | Run migrations |
72
+ | `bun questpie migrate:create` | Create migration |
73
+ | `bunx questpie generate` | Regenerate `src/questpie/server/.generated/*` |
66
74
 
67
- ## Adding Collections
75
+ ## Adding a Collection
68
76
 
69
- Create a new file following the naming convention:
77
+ Preferred workflow:
70
78
 
71
- ```
72
- src/questpie/server/collections/my-collection.collection.ts
73
- ```
79
+ 1. Run `bun questpie add collection products`.
80
+ 2. The CLI creates the file and runs codegen automatically.
81
+ 3. Run `bun questpie migrate:create`.
74
82
 
75
- Then register it in `app.ts`:
83
+ Manual workflow (when you create files by hand):
76
84
 
77
- ```ts
78
- import { myCollection } from "./collections/my-collection.collection.js";
85
+ 1. Create a file in `src/questpie/server/collections/`.
86
+ 2. Export a collection builder from that file.
87
+ 3. Run `bunx questpie generate`.
88
+ 4. Run `bun questpie migrate:create`.
79
89
 
80
- // Add to .collections()
81
- .collections({ posts, myCollection })
82
- ```
90
+ Collections are discovered automatically by codegen. No manual `app.ts` registration is required.
83
91
 
84
- ## Adding Globals
92
+ ## Adding a Global
85
93
 
86
- ```
87
- src/questpie/server/globals/my-global.global.ts
88
- ```
94
+ Preferred workflow:
89
95
 
90
- Then register in `app.ts`:
96
+ 1. Run `bun questpie add global marketing`.
97
+ 2. The CLI creates the file and runs codegen automatically.
98
+ 3. Run `bun questpie migrate:create`.
91
99
 
92
- ```ts
93
- .globals({ siteSettings, myGlobal })
94
- ```
100
+ Manual workflow (when you create files by hand):
101
+
102
+ 1. Create a file in `src/questpie/server/globals/`.
103
+ 2. Export a global builder from that file.
104
+ 3. Run `bunx questpie generate`.
105
+ 4. Run `bun questpie migrate:create`.
106
+
107
+ Globals are discovered automatically by codegen. No manual `app.ts` registration is required.
@@ -1,22 +1,22 @@
1
1
  {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "base-lyra",
4
- "rsc": false,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "",
8
- "css": "src/styles.css",
9
- "baseColor": "neutral",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "iconLibrary": "hugeicons",
14
- "aliases": {
15
- "components": "@/components",
16
- "utils": "@/lib/utils",
17
- "ui": "@/components/ui",
18
- "lib": "@/lib",
19
- "hooks": "@/hooks"
20
- },
21
- "registries": {}
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "base-lyra",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "src/styles.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "iconLibrary": "hugeicons",
14
+ "aliases": {
15
+ "components": "@/components",
16
+ "utils": "@/lib/utils",
17
+ "ui": "@/components/ui",
18
+ "lib": "@/lib",
19
+ "hooks": "@/hooks"
20
+ },
21
+ "registries": {}
22
22
  }
@@ -3,6 +3,10 @@
3
3
  "version": "0.0.1",
4
4
  "private": true,
5
5
  "type": "module",
6
+ "imports": {
7
+ "#questpie": "./src/questpie/server/.generated/index.ts",
8
+ "#questpie/*": "./src/questpie/server/.generated/*"
9
+ },
6
10
  "scripts": {
7
11
  "dev": "bun --bun vite dev --port 3000",
8
12
  "build": "vite build",
@@ -24,6 +28,8 @@
24
28
  "zod": "^4.2.1"
25
29
  },
26
30
  "devDependencies": {
31
+ "@iconify/json": ">=2",
32
+ "@questpie/vite-plugin-iconify": "latest",
27
33
  "@tailwindcss/vite": "^4.0.0",
28
34
  "@tanstack/devtools-vite": "latest",
29
35
  "@tanstack/react-devtools": "latest",
@@ -1,12 +1,12 @@
1
- import { cms } from "@/questpie/server/app";
1
+ import { app } from "@/questpie/server/app";
2
2
 
3
3
  export const config = {
4
- app: cms,
5
- cli: {
6
- migrations: {
7
- directory: "./src/migrations",
8
- },
9
- },
4
+ app: app,
5
+ cli: {
6
+ migrations: {
7
+ directory: "./src/migrations",
8
+ },
9
+ },
10
10
  };
11
11
 
12
12
  export default config;
@@ -1,12 +1,12 @@
1
+ import type { AppConfig } from "@/questpie/server/app.js";
1
2
  import { createAdminAuthClient } from "@questpie/admin/client";
2
- import type { AppCMS } from "@/questpie/server/app.js";
3
3
 
4
- export const authClient = createAdminAuthClient<AppCMS>({
4
+ export const authClient = createAdminAuthClient<AppConfig>({
5
5
  baseURL:
6
6
  typeof window !== "undefined"
7
7
  ? window.location.origin
8
8
  : process.env.APP_URL || "http://localhost:3000",
9
- basePath: "/api/cms/auth",
9
+ basePath: "/api/auth",
10
10
  });
11
11
 
12
12
  export type AuthClient = typeof authClient;
@@ -0,0 +1,13 @@
1
+ import { createClient } from "questpie/client";
2
+
3
+ import type { AppConfig } from "@/questpie/server/app.js";
4
+
5
+ export const client = createClient<AppConfig>({
6
+ baseURL:
7
+ typeof window !== "undefined"
8
+ ? window.location.origin
9
+ : process.env.APP_URL || "http://localhost:3000",
10
+ basePath: "/api",
11
+ });
12
+
13
+ export type AppClient = typeof client;
@@ -2,26 +2,23 @@ import { createEnv } from "@t3-oss/env-core";
2
2
  import { z } from "zod";
3
3
 
4
4
  export const env = createEnv({
5
- server: {
6
- DATABASE_URL: z.string().url(),
7
- APP_URL: z.string().url().default("http://localhost:3000"),
8
- PORT: z
9
- .string()
10
- .transform(Number)
11
- .pipe(z.number().int().positive())
12
- .default("3000"),
13
- BETTER_AUTH_SECRET: z
14
- .string()
15
- .min(1)
16
- .default("change-me-in-production"),
17
- MAIL_ADAPTER: z.enum(["console", "smtp"]).default("console"),
18
- SMTP_HOST: z.string().optional(),
19
- SMTP_PORT: z
20
- .string()
21
- .transform(Number)
22
- .pipe(z.number().int().positive())
23
- .optional(),
24
- },
25
- runtimeEnv: process.env,
26
- emptyStringAsUndefined: true,
5
+ server: {
6
+ DATABASE_URL: z.string().url(),
7
+ APP_URL: z.string().url().default("http://localhost:3000"),
8
+ PORT: z
9
+ .string()
10
+ .transform(Number)
11
+ .pipe(z.number().int().positive())
12
+ .default("3000"),
13
+ BETTER_AUTH_SECRET: z.string().min(1).default("change-me-in-production"),
14
+ MAIL_ADAPTER: z.enum(["console", "smtp"]).default("console"),
15
+ SMTP_HOST: z.string().optional(),
16
+ SMTP_PORT: z
17
+ .string()
18
+ .transform(Number)
19
+ .pipe(z.number().int().positive())
20
+ .optional(),
21
+ },
22
+ runtimeEnv: process.env,
23
+ emptyStringAsUndefined: true,
27
24
  });
@@ -1,9 +1,9 @@
1
1
  import { QueryClient } from "@tanstack/react-query";
2
2
 
3
3
  export const queryClient = new QueryClient({
4
- defaultOptions: {
5
- queries: {
6
- staleTime: 60 * 1000,
7
- },
8
- },
4
+ defaultOptions: {
5
+ queries: {
6
+ staleTime: 60 * 1000,
7
+ },
8
+ },
9
9
  });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Admin Client Config
3
+ *
4
+ * Auto-generated by questpie codegen — do not edit.
5
+ *
6
+ * Pass this directly to <AdminLayoutProvider admin={admin} />
7
+ */
8
+
9
+ import { default as _modules } from "../modules";
10
+
11
+ const admin = _modules;
12
+
13
+ export default admin;
@@ -1,5 +1,9 @@
1
- import { builder } from "./builder.js";
1
+ /**
2
+ * Admin Configuration
3
+ *
4
+ * Re-exports the generated admin config.
5
+ * Import directly from "./.generated/client" in new code.
6
+ */
7
+ export { default as admin } from "./.generated/client";
2
8
 
3
- export const admin = builder;
4
-
5
- export type AdminConfig = typeof admin;
9
+ export type AdminConfig = typeof import("./.generated/client").default;
@@ -0,0 +1 @@
1
+ export { default } from "@questpie/admin/client-module";