create-questpie 2.0.2 → 2.0.4

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 (40) hide show
  1. package/dist/index.mjs +244 -30
  2. package/package.json +1 -1
  3. package/skills/questpie/AGENTS.md +310 -103
  4. package/skills/questpie/SKILL.md +196 -84
  5. package/skills/questpie/coverage.json +213 -0
  6. package/skills/questpie/references/auth.md +119 -4
  7. package/skills/questpie/references/business-logic.md +126 -56
  8. package/skills/questpie/references/crud-api.md +231 -29
  9. package/skills/questpie/references/data-modeling.md +26 -6
  10. package/skills/questpie/references/extend.md +98 -7
  11. package/skills/questpie/references/field-types.md +14 -2
  12. package/skills/questpie/references/infrastructure-adapters.md +207 -32
  13. package/skills/questpie/references/mcp.md +147 -0
  14. package/skills/questpie/references/multi-tenancy.md +1 -2
  15. package/skills/questpie/references/production.md +218 -53
  16. package/skills/questpie/references/quickstart.md +31 -18
  17. package/skills/questpie/references/rules.md +140 -13
  18. package/skills/questpie/references/sandbox.md +110 -0
  19. package/skills/questpie/references/tanstack-query.md +34 -11
  20. package/skills/questpie/references/type-inference.md +167 -0
  21. package/skills/questpie/references/workflows.md +155 -0
  22. package/skills/questpie-admin/AGENTS.md +141 -68
  23. package/skills/questpie-admin/SKILL.md +96 -63
  24. package/skills/questpie-admin/references/blocks.md +28 -4
  25. package/skills/questpie-admin/references/custom-ui.md +1 -1
  26. package/skills/questpie-admin/references/views.md +21 -5
  27. package/templates/tanstack-start/AGENTS.md +15 -8
  28. package/templates/tanstack-start/CLAUDE.md +12 -5
  29. package/templates/tanstack-start/README.md +7 -6
  30. package/templates/tanstack-start/package.json +1 -0
  31. package/templates/tanstack-start/src/lib/query-client.ts +10 -1
  32. package/templates/tanstack-start/src/questpie/admin/modules.ts +3 -1
  33. package/templates/tanstack-start/src/questpie/server/.generated/factories.ts +10 -9
  34. package/templates/tanstack-start/src/questpie/server/config/auth.ts +1 -1
  35. package/templates/tanstack-start/src/questpie/server/modules.ts +4 -5
  36. package/templates/tanstack-start/src/questpie/server/questpie.config.ts +2 -1
  37. package/templates/tanstack-start/src/routes/admin/$.tsx +12 -1
  38. package/templates/tanstack-start/src/routes/admin/index.tsx +12 -5
  39. package/templates/tanstack-start/src/routes/api/$.ts +1 -2
  40. package/templates/tanstack-start/vite.config.ts +2 -2
@@ -14,68 +14,143 @@ Server-first TypeScript application framework. Define your data schema once usin
14
14
  ## When to Apply
15
15
 
16
16
  Reference these guidelines when:
17
+
17
18
  - Creating or modifying collections, globals, routes, jobs, services, emails, blocks
18
19
  - Working with file conventions or codegen pipeline
19
20
  - Configuring adapters (queue, search, storage, realtime, email, KV)
20
21
  - Setting up access control, hooks, or validation
21
22
  - Building typed client SDK queries or TanStack Query integrations
22
23
  - Writing modules or plugins for QUESTPIE
24
+ - Exposing QUESTPIE through MCP tools or resources
23
25
  - Scaffolding a new project or onboarding
24
26
 
25
27
  ## Import Paths — Critical
26
28
 
27
- | Factory | Import From | Needs Codegen? |
28
- |---|---|---|
29
- | `collection(name)` | `#questpie/factories` | Yes |
30
- | `global(name)` | `#questpie/factories` | Yes |
31
- | `block(name)` | `#questpie/factories` | Yes |
32
- | `adminConfig({...})` | `#questpie/factories` | Yes |
33
- | `route()` | `"questpie"` | No |
34
- | `job({...})` | `"questpie"` | No |
35
- | `service()` | `"questpie"` | No |
36
- | `email({...})` | `"questpie"` | No |
37
- | `migration({...})` | `"questpie"` | No |
38
- | `seed({...})` | `"questpie"` | No |
39
- | `runtimeConfig({...})` | `"questpie"` | No |
40
- | `appConfig({...})` | `"questpie"` | No |
41
- | `authConfig({...})` | `"questpie"` | No |
42
- | `createClient<AppConfig>()` | `"questpie/client"` | No |
43
- | `createQuestpieQueryOptions()` | `"@questpie/tanstack-query"` | No |
29
+ | Factory | Import From | Needs Codegen? |
30
+ | ------------------------------ | ---------------------------- | -------------- |
31
+ | `collection(name)` | `#questpie/factories` | Yes |
32
+ | `global(name)` | `#questpie/factories` | Yes |
33
+ | `block(name)` | `#questpie/factories` | Yes |
34
+ | `adminConfig({...})` | `#questpie/factories` | Yes |
35
+ | `route()` | `"questpie"` | No |
36
+ | `job({...})` | `"questpie"` | No |
37
+ | `service()` | `"questpie"` | No |
38
+ | `email({...})` | `"questpie"` | No |
39
+ | `migration({...})` | `"questpie"` | No |
40
+ | `seed({...})` | `"questpie"` | No |
41
+ | `runtimeConfig({...})` | `"questpie"` | No |
42
+ | `appConfig({...})` | `"questpie"` | No |
43
+ | `authConfig({...})` | `"questpie"` | No |
44
+ | `env({...})` | `"questpie/env"` | No |
45
+ | `clientEnv({...})` | `"questpie/env"` | No |
46
+ | `createClient<AppConfig>()` | `"questpie/client"` | No |
47
+ | `createQuestpieQueryOptions()` | `"@questpie/tanstack-query"` | No |
48
+
49
+ ## Module And Plugin Configuration - Critical
50
+
51
+ Codegen imports `modules.ts` before runtime app creation to extract module-contributed plugins. Any module that contributes a `plugin`, discover patterns, generated factories, categories, views, components, fields, or config factories must be statically discoverable from `modules.ts`.
52
+
53
+ ### DO THIS
54
+
55
+ Use a static module and a plugin-discovered config file for runtime options:
56
+
57
+ ```ts title="modules.ts"
58
+ import { observabilityModule } from "@questpie/observability/server";
59
+
60
+ export default [observabilityModule] as const;
61
+ ```
62
+
63
+ ```ts title="config/observability.ts"
64
+ import { observabilityConfig } from "@questpie/observability/server";
65
+
66
+ export default observabilityConfig({
67
+ serviceName: "barbershop",
68
+ enabled: process.env.NODE_ENV === "production",
69
+ });
70
+ ```
71
+
72
+ The module reads config at runtime from `app.state.config.observability`:
73
+
74
+ ```ts
75
+ export const observabilityModule = module({
76
+ name: "questpie-observability",
77
+ plugin: observabilityPlugin(),
78
+ services: {
79
+ observability: service({
80
+ namespace: null,
81
+ lifecycle: "singleton",
82
+ create: ({ app, logger }) =>
83
+ createObservabilityService(app.state.config?.observability, logger),
84
+ }),
85
+ },
86
+ });
87
+ ```
88
+
89
+ ### DON'T DO THIS
90
+
91
+ Do not make runtime options the primary API for codegen-aware modules:
92
+
93
+ ```ts title="modules.ts"
94
+ export default [
95
+ observabilityModule({
96
+ serviceName: "barbershop",
97
+ }),
98
+ ] as const;
99
+ ```
100
+
101
+ Do not conditionally hide codegen-aware modules or plugins behind env/runtime checks:
102
+
103
+ ```ts title="modules.ts"
104
+ export default [
105
+ process.env.OTEL_ENABLED ? observabilityModule : undefined,
106
+ ].filter(Boolean);
107
+ ```
108
+
109
+ Factory modules are acceptable only for simple runtime-only modules whose plugin identity and codegen contributions do not change. For reusable packages that ship a `CodegenPlugin`, prefer **static module + `config/*.ts` singleton factory**.
110
+
111
+ ## Admin Auth Contract - Critical
112
+
113
+ `adminModule` includes the starter auth model and owns the canonical Better Auth `user` collection shape used by admin setup and login guards. That contract includes `user.role` with at least `admin` and `user` values. Do not replace `collection("user")` from scratch in apps that use `adminModule`; merge `starterModule.collections.user` and extend it when custom user fields or layout are needed.
44
114
 
45
115
  ## Reference Topics
46
116
 
47
117
  ### Core
48
118
 
49
- | Topic | File | Covers |
50
- |---|---|---|
51
- | Quickstart | `references/quickstart.md` | Scaffold, configure, codegen, migrate, serve — zero to running app |
52
- | Data Modeling | `references/data-modeling.md` | Collections, globals, fields, relations, options, localization |
53
- | Field Types | `references/field-types.md` | All built-in field types with options and operators |
54
- | Rules | `references/rules.md` | Access control (row/field level), hooks lifecycle, validation |
55
- | Business Logic | `references/business-logic.md` | Routes, jobs, services, email templates, context injection |
56
- | CRUD API | `references/crud-api.md` | Server-side `find`, `create`, `update`, `delete`, globals API |
57
- | Query Operators | `references/query-operators.md` | `where` clause operators by field type |
119
+ | Topic | File | Covers |
120
+ | ----------------- | ------------------------------- | ------------------------------------------------------------------ |
121
+ | Quickstart | `references/quickstart.md` | Scaffold, configure, codegen, migrate, serve — zero to running app |
122
+ | Data Modeling | `references/data-modeling.md` | Collections, globals, fields, relations, options, localization |
123
+ | Field Types | `references/field-types.md` | All built-in field types with options and operators |
124
+ | Type Inference | `references/type-inference.md` | The infer-first map: `CollectionDoc`, `AccessContext` helpers, per-op rule typing, cycle rules |
125
+ | Rules | `references/rules.md` | Access control (row/field level), hooks lifecycle, validation, derived request context |
126
+ | Business Logic | `references/business-logic.md` | Routes, jobs, services, email templates, context injection |
127
+ | Durable Workflows | `references/workflows.md` | Long-running workflows, steps, events, cron, admin UI |
128
+ | Sandboxed Code | `references/sandbox.md` | `ctx.executor.run()`, isolation modes, capability model, Deno engine deployment |
129
+ | CRUD API | `references/crud-api.md` | `find`, `create`, `updateById`/`updateMany`, `deleteById`/`deleteMany`, atomic conditional updates, globals API |
130
+ | Query Operators | `references/query-operators.md` | `where` clause operators by field type |
58
131
 
59
132
  ### Infrastructure
60
133
 
61
- | Topic | File | Covers |
62
- |---|---|---|
63
- | Production | `references/production.md` | Queue, search, realtime, storage, email, KV adapter setup |
64
- | Auth | `references/auth.md` | Better Auth integration, session, providers, access patterns |
65
- | Adapters | `references/infrastructure-adapters.md` | All adapter configs: pg-boss, S3, SMTP, pgNotify, Redis |
134
+ | Topic | File | Covers |
135
+ | ---------- | --------------------------------------- | ------------------------------------------------------------ |
136
+ | Production | `references/production.md` | Queue, search, realtime, storage, email, KV adapter setup |
137
+ | Environment | `references/env.md` | `env.ts` + `env.client.ts`: boot-validated, typed env, generated client modules |
138
+ | Auth | `references/auth.md` | Better Auth integration, session, providers, access patterns |
139
+ | Adapters | `references/infrastructure-adapters.md` | All adapter configs: pg-boss, S3, SMTP, pgNotify, Redis |
140
+ | MCP | `references/mcp.md` | MCP setup, CRUD tools, route tools, custom tools, security |
66
141
 
67
142
  ### Extend
68
143
 
69
- | Topic | File | Covers |
70
- |---|---|---|
71
- | Extend | `references/extend.md` | Custom modules, fields, operators, adapters, codegen plugins |
72
- | Codegen Plugin API | `references/codegen-plugin-api.md` | Plugin architecture, category declarations, templates |
73
- | Multi-Tenancy | `references/multi-tenancy.md` | Scope isolation, workspace filtering, ScopeProvider |
144
+ | Topic | File | Covers |
145
+ | ------------------ | ---------------------------------- | ------------------------------------------------------------ |
146
+ | Extend | `references/extend.md` | Custom modules, fields, operators, adapters, codegen plugins |
147
+ | Codegen Plugin API | `references/codegen-plugin-api.md` | Plugin architecture, category declarations, templates |
148
+ | Multi-Tenancy | `references/multi-tenancy.md` | `appConfig({ context })` resolver, scope isolation, ScopeProvider |
74
149
 
75
150
  ### Client
76
151
 
77
- | Topic | File | Covers |
78
- |---|---|---|
152
+ | Topic | File | Covers |
153
+ | -------------- | ------------------------------ | ---------------------------------------------------------------- |
79
154
  | TanStack Query | `references/tanstack-query.md` | `q.collections.*`, `q.globals.*`, `q.routes.*`, realtime queries |
80
155
 
81
156
  ## Key Patterns — Quick Reference
@@ -86,53 +161,71 @@ Reference these guidelines when:
86
161
  import { collection } from "#questpie/factories";
87
162
 
88
163
  export default collection("posts")
89
- .fields(({ f }) => ({
90
- title: f.text().required(),
91
- status: f.select([{ value: "draft", label: "Draft" }]),
92
- author: f.relation("users").required(),
93
- }))
94
- .access({
95
- read: true,
96
- create: ({ session }) => !!session,
97
- update: ({ session, doc }) => doc.authorId === session?.user?.id,
98
- })
99
- .hooks({
100
- beforeChange: async ({ data, operation }) => {
101
- if (operation === "create") data.slug = slugify(data.title);
102
- return data;
103
- },
104
- })
105
- .options({ versioning: true, timestamps: true });
164
+ .fields(({ f }) => ({
165
+ title: f.text().required(),
166
+ status: f.select([{ value: "draft", label: "Draft" }]),
167
+ author: f.relation("user").required(),
168
+ }))
169
+ .access({
170
+ read: true,
171
+ create: ({ session }) => !!session,
172
+ // update rules get the existing row as `data` (typed, non-optional)
173
+ update: ({ session, data }) => data.author === session?.user?.id,
174
+ })
175
+ .hooks({
176
+ beforeChange: async ({ data, operation }) => {
177
+ if (operation === "create") data.slug = slugify(data.title);
178
+ return data;
179
+ },
180
+ })
181
+ .options({ versioning: true, timestamps: true });
182
+ ```
183
+
184
+ ### Extend a Module Collection (don't redefine!)
185
+
186
+ ```ts
187
+ import { starterModule } from "questpie/app";
188
+ import { collection } from "#questpie/factories";
189
+
190
+ // Registering the same key from scratch REPLACES the module's collection
191
+ // (drops its fields/hooks/auth wiring). Merge instead — fully typed:
192
+ export default collection("user")
193
+ .merge(starterModule.collections.user)
194
+ .fields(({ f }) => ({
195
+ isAnonymous: f.boolean().default(false),
196
+ }));
106
197
  ```
107
198
 
108
199
  ### Route
109
200
 
110
201
  ```ts
111
- import { route } from "questpie";
202
+ import { route } from "questpie/services";
112
203
  import z from "zod";
113
204
 
114
205
  export default route()
115
- .post()
116
- .schema(z.object({ period: z.enum(["day", "week", "month"]) }))
117
- .handler(async ({ input, collections }) => {
118
- return collections.posts.find({ where: { status: "published" } });
119
- });
206
+ .post()
207
+ .schema(z.object({ period: z.enum(["day", "week", "month"]) }))
208
+ .handler(async ({ input, collections }) => {
209
+ return collections.posts.find({ where: { status: "published" } });
210
+ });
120
211
  ```
121
212
 
122
213
  ### Job
123
214
 
124
215
  ```ts
125
- import { job } from "questpie";
216
+ import { job } from "questpie/services";
126
217
  import z from "zod";
127
218
 
128
219
  export default job({
129
- name: "sendReminder",
130
- schema: z.object({ userId: z.string() }),
131
- retryDelay: 5, // seconds (not ms!)
132
- handler: async ({ payload, email, collections }) => {
133
- const user = await collections.users.findOne({ where: { id: payload.userId } });
134
- await email.send("reminder", { to: user.email, data: { name: user.name } });
135
- },
220
+ name: "sendReminder",
221
+ schema: z.object({ userId: z.string() }),
222
+ retryDelay: 5, // seconds (not ms!)
223
+ handler: async ({ payload, email, collections }) => {
224
+ const user = await collections.users.findOne({
225
+ where: { id: payload.userId },
226
+ });
227
+ await email.send("reminder", { to: user.email, data: { name: user.name } });
228
+ },
136
229
  });
137
230
  ```
138
231
 
@@ -141,16 +234,18 @@ export default job({
141
234
  ```ts
142
235
  import { createClient } from "questpie/client";
143
236
  import type { AppConfig } from "#questpie";
237
+ import { env } from "#questpie/env.client.vite"; // generated from env.client.ts
144
238
 
145
239
  const client = createClient<AppConfig>({
146
- baseURL: typeof window !== "undefined" ? window.location.origin : process.env.APP_URL,
147
- basePath: "/api",
240
+ baseURL:
241
+ typeof window !== "undefined" ? window.location.origin : env.APP_URL,
242
+ basePath: "/api",
148
243
  });
149
244
 
150
245
  const { docs } = await client.collections.posts.find({
151
- where: { status: "published" },
152
- orderBy: { createdAt: "desc" },
153
- with: { author: true },
246
+ where: { status: "published" },
247
+ orderBy: { createdAt: "desc" },
248
+ with: { author: true },
154
249
  });
155
250
  ```
156
251
 
@@ -164,17 +259,34 @@ await queue.sendReminder.publish({ userId: "abc" });
164
259
 
165
260
  ## Common Mistakes
166
261
 
167
- | Severity | Mistake | Fix |
168
- |---|---|---|
169
- | CRITICAL | Files in wrong directory | Collections in `collections/`, routes in `routes/`, etc. |
170
- | CRITICAL | Missing `export default` on convention files | Codegen silently ignores files without default export |
262
+ | Severity | Mistake | Fix |
263
+ | -------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------- |
264
+ | CRITICAL | Files in wrong directory | Collections in `collections/`, routes in `routes/`, etc. |
265
+ | CRITICAL | Missing `export default` on convention files | Codegen silently ignores files without default export |
171
266
  | CRITICAL | Importing route/job/service from `#questpie/factories` | Use `"questpie"` — only collection/global/block/adminConfig use `#questpie/factories` |
172
- | HIGH | Forgetting `questpie generate` after adding files | Re-run codegen on any file add/remove in convention dirs |
173
- | HIGH | Job handler uses `input` instead of `payload` | Jobs destructure `{ payload }`, routes destructure `{ input }` |
174
- | HIGH | `queue.send("name", data)` | Use `queue.jobName.publish(data)` |
175
- | HIGH | `beforeCreate` / `afterCreate` hook names | Use `beforeChange` / `afterChange` with `operation === "create"` guard |
176
- | MEDIUM | Using npm/yarn instead of Bun | QUESTPIE requires Bun as package manager |
177
- | MEDIUM | Editing `.generated/` files | Never edit re-run `questpie generate` |
267
+ | CRITICAL | Redefining a module collection (e.g. starter `user`) from scratch | `.merge(starterModule.collections.user)` then add fields see Extend pattern |
268
+ | HIGH | Forgetting `questpie generate` after adding files | Re-run codegen on any file add/remove in convention dirs |
269
+ | HIGH | Job handler uses `input` instead of `payload` | Jobs destructure `{ payload }`, routes destructure `{ input }` |
270
+ | HIGH | `queue.send("name", data)` | Use `queue.jobName.publish(data)` |
271
+ | HIGH | Raw `process.env.X` / `process.env.X!` in app code | Declare in `env.ts` with `env()` typed, boot-validated (see `references/env.md`) |
272
+ | HIGH | `beforeCreate` / `afterCreate` hook names | Use `beforeChange` / `afterChange` with `operation === "create"` guard |
273
+ | HIGH | Module-level app singleton for Better Auth callbacks | `getContext<App>()` works inside `onLinkAccount`/`databaseHooks`/plugin hooks — see `references/auth.md` |
274
+ | HIGH | Hand-writing a type the schema already knows | Use the inference one-liner (`CollectionDoc`, `AccessContext`, `ctx.data`, …) — see `references/type-inference.md` |
275
+ | HIGH | Runtime options in codegen-aware modules | Use static `module({...})` + plugin-discovered `config/*.ts` factory |
276
+ | HIGH | Exposing MCP HTTP as trusted system access | HTTP MCP is user mode only; use stdio only in trusted local/system contexts |
277
+ | HIGH | Bare `Date` as where-equality (`{ createdAt: someDate }`) | Use the explicit operator: `{ createdAt: { eq: someDate } }` — see `references/crud-api.md` keyset recipe |
278
+ | MEDIUM | Using npm/yarn instead of Bun | QUESTPIE requires Bun as package manager |
279
+ | MEDIUM | Editing `.generated/` files | Never edit — re-run `questpie generate` |
280
+
281
+ ## Preview And Workflow Rules
282
+
283
+ - Live Preview uses the existing admin `FormView`, Preview button, `LivePreviewMode`, and iframe. Do not introduce a separate visual-edit form API, a second default form view, or parallel preview API names.
284
+ - Preserve save, autosave, Cmd+S, history, workflow transitions, locks, and actions in the normal form lifecycle.
285
+ - Frontend visual editing needs `useCollectionPreview`, `PreviewProvider`, `PreviewField`, and usually `BlockRenderer`; load the `questpie-admin` skill for the full frontend preparation checklist.
286
+ - For publishable pages with workflow enabled, workflow stage is the publication source. Public frontend reads use `stage: "published"`.
287
+ - If public client/HTTP access is enabled, anonymous read access should require `input?.stage === "published"`; editor/preview reads can omit `stage` only when a session is present.
288
+ - Preview/draft-mode reads may load the working stage for authorized editors.
289
+ - Do not add duplicate `isPublished` guidance when workflow already controls publishing.
178
290
 
179
291
  ## Full Compiled Document
180
292
 
@@ -0,0 +1,213 @@
1
+ {
2
+ "_readme": "Allowlist + surface map for scripts/skill-coverage.ts. Reviewed together with the skill: every public VALUE export must be mentioned in skills/questpie/** or tagged internal here (with a reason). Type-only exports are reported but never gate. Run: bun run scripts/skill-coverage.ts (--strict to gate, --json/--all for detail).",
3
+ "skillRoot": "skills/questpie",
4
+ "surfaces": [
5
+ { "package": "questpie", "entries": ["packages/questpie/src/exports"] },
6
+ { "package": "@questpie/tanstack-query", "entries": ["packages/tanstack-query/src/index.ts"] },
7
+ { "package": "@questpie/workflows", "entries": ["packages/workflows/src/exports"] },
8
+ { "package": "@questpie/mcp", "entries": ["packages/mcp/src/exports"] },
9
+ { "package": "@questpie/sandbox", "entries": ["packages/sandbox/src/exports"] },
10
+ { "package": "@questpie/hono", "entries": ["packages/hono/src/server.ts", "packages/hono/src/client.ts"] },
11
+ { "package": "@questpie/elysia", "entries": ["packages/elysia/src/server.ts", "packages/elysia/src/client.ts"] },
12
+ { "package": "@questpie/next", "entries": ["packages/next/src/server.ts"] },
13
+ {
14
+ "package": "@questpie/openapi",
15
+ "entries": ["packages/openapi/src/index.ts", "packages/openapi/src/server.ts", "packages/openapi/src/plugin.ts"]
16
+ }
17
+ ],
18
+ "skippedPackages": {
19
+ "@questpie/admin": "covered by the separate questpie-admin skill (audit hook: map it there)",
20
+ "@questpie/executor-engine (packages/executor)": "engine side of the sandbox primitive; apps target ctx.sandbox",
21
+ "@questpie/ai": "product layer, not framework surface",
22
+ "create-questpie": "scaffolder CLI, not a library surface",
23
+ "@questpie/vite-plugin-iconify": "admin build tooling; covered by the questpie-admin skill"
24
+ },
25
+ "internal": {
26
+ "createContextFactory": "only consumed by generated code (.generated/index.ts)",
27
+ "extractAppServices": "context plumbing; apps receive services on ctx",
28
+ "createWorkflowClient": "service factory internal; ctx.workflows.trigger is the taught surface",
29
+ "introspectRoutes": "powers openapi/mcp generators",
30
+ "handleError": "HTTP adapter internal",
31
+ "RouteBuilder": "class behind route(); apps use the factory",
32
+ "SandboxBroker": "engine side of sandbox bindings",
33
+ "hostFetch": "sandbox host RPC internal",
34
+ "coreBackendMessages": "override path covered by generic messages merge",
35
+ "ExecutorService": "service class behind ctx.executor.run (the taught surface); constructed by the core service factory",
36
+ "InProcessExecutorAdapter": "default trusted adapter, applied automatically; override via executor.trusted",
37
+ "HTTP_FETCH_BODY_CAP_BYTES": "executor wire constant",
38
+ "parseBindingMethod": "executor broker internal",
39
+ "checkBindingCapability": "sandbox broker internal",
40
+ "knowledgePathMatches": "sandbox broker internal",
41
+ "normalizeKnowledgePath": "sandbox broker internal",
42
+ "DOCUMENT_STORE_COLLECTION": "sandbox broker internal constant",
43
+ "buildGuestBindings": "sandbox guest-side internal",
44
+ "classifyIpLiteral": "sandbox egress validation internal",
45
+ "parseHostEntry": "sandbox egress validation internal",
46
+ "validateEgressHosts": "sandbox egress validation internal",
47
+ "validateHostEgress": "sandbox egress validation internal",
48
+ "BINDINGS_TOKEN_HEADER": "sandbox wire-protocol constant",
49
+ "FRAME_MARKER": "sandbox wire-protocol constant",
50
+ "toVectorLiteral": "pgvector adapter internal util",
51
+ "createSearchService": "service wiring internal; ctx.search is the taught surface",
52
+ "SearchServiceWrapper": "see createSearchService",
53
+ "FilesError": "files-sdk pass-through; taught via Files SDK docs",
54
+ "transfer": "files-sdk pass-through; taught via Files SDK docs",
55
+ "RESEND_API_BASE_URL": "adapter default constant",
56
+ "PLUNK_API_BASE_URL": "adapter default constant",
57
+ "BullMQAdapter": "class form; bullMQAdapter() factory is the taught surface",
58
+ "CloudflareKVAdapter": "class form; cloudflareKVAdapter() factory is the taught surface",
59
+ "CloudflareQueuesAdapter": "class form; cloudflareQueuesAdapter() factory is the taught surface",
60
+ "CloudflareRealtimeAdapter": "class form; cloudflareRealtimeAdapter() factory is the taught surface",
61
+ "PgBossAdapter": "class form; pgBossAdapter() factory is the taught surface",
62
+ "PgNotifyAdapter": "class form; pgNotifyAdapter() factory is the taught surface",
63
+ "RedisStreamsAdapter": "class form; redisStreamsAdapter() factory is the taught surface",
64
+ "PlunkAdapter": "class form; plunkAdapter() factory is the taught surface",
65
+ "ResendAdapter": "class form; resendAdapter() factory is the taught surface",
66
+ "HttpSandboxAdapter": "class form; httpSandboxAdapter() factory is the taught surface",
67
+ "OpenAIEmbeddingProvider": "class form; createOpenAIEmbeddingProvider() factory is the taught surface",
68
+ "CustomEmbeddingProvider": "class form; createCustomEmbeddingProvider() factory is the taught surface",
69
+ "createCloudflareFetchHandler": "granular handler; createCloudflareWorkerHandlers umbrella is taught",
70
+ "createCloudflareQueueHandler": "granular handler; createCloudflareWorkerHandlers umbrella is taught",
71
+ "createCloudflareRealtimeDurableObjectHandler": "granular handler; createCloudflareWorkerHandlers umbrella is taught",
72
+ "createCloudflareScheduledHandler": "granular handler; createCloudflareWorkerHandlers umbrella is taught",
73
+ "publishScheduledJobs": "Cloudflare scheduled-handler internal",
74
+ "toCloudflareQueuePushBatch": "Cloudflare queue-handler internal",
75
+ "assertCloudflareCompatible": "boot-time compatibility check, runs automatically",
76
+ "getCloudflareCompatibilityIssues": "see assertCloudflareCompatible",
77
+ "CloudflareCompatibilityError": "see assertCloudflareCompatible",
78
+ "CLOUD_ENV": "QUESTPIE Cloud env detection constant",
79
+ "isQuestpieCloud": "QUESTPIE Cloud env detection helper",
80
+ "createAdapterContext": "HTTP adapter wiring internal",
81
+ "createAdapterRoutes": "HTTP adapter wiring internal",
82
+ "evaluateRouteAccess": "route dispatcher internal",
83
+ "executeJsonRoute": "route dispatcher internal",
84
+ "executeRawRoute": "route dispatcher internal",
85
+ "isJsonRoute": "route dispatcher internal",
86
+ "isRawRoute": "route dispatcher internal",
87
+ "executeAccessRule": "CRUD access-control engine internal",
88
+ "mergeAuthOptions": "auth config merge internal (createApp applies it)",
89
+ "guardHookRecursion": "hook engine internal",
90
+ "GlobalCRUDGenerator": "CRUD engine internal; ctx.globals is the taught surface",
91
+ "createQueueClient": "service wiring internal; ctx.queue is the taught surface",
92
+ "startJobWorker": "worker wiring internal; app.queue.listen() is the taught surface",
93
+ "runJobWorkerOnce": "worker wiring internal; app.queue.runOnce() is the taught surface",
94
+ "createComponentCallbackProxy": "server-driven admin UI internal",
95
+ "program": "CLI entry object; the questpie CLI commands are the taught surface",
96
+ "builtinFields": "field registry internal; f.* factories are the taught surface",
97
+ "createFieldBuilder": "builder engine internal",
98
+ "createFieldsCallbackContext": "builder engine internal",
99
+ "extractFieldDefinitions": "builder engine internal",
100
+ "wrapBuilderWithExtensions": "builder engine internal",
101
+ "wrapFieldComplete": "builder engine internal",
102
+ "createCollectionValidationSchemas": "validation engine internal",
103
+ "mergeFieldsForValidation": "validation engine internal",
104
+ "softDeleteUniqueIndex": "schema generation internal",
105
+ "introspectCollection": "introspection engine internal (powers /schema routes)",
106
+ "introspectCollections": "introspection engine internal",
107
+ "introspectGlobal": "introspection engine internal",
108
+ "introspectGlobals": "introspection engine internal",
109
+ "getCurrentTransaction": "transaction plumbing; withTransaction/onAfterCommit are the taught surface",
110
+ "getTransactionContext": "transaction plumbing",
111
+ "isInTransaction": "transaction plumbing",
112
+ "isNotNull": "internal type guard util",
113
+ "DrizzleMigrationGenerator": "CLI migration machinery",
114
+ "MigrationRunner": "CLI migration machinery",
115
+ "OperationSnapshotManager": "CLI migration machinery",
116
+ "SeedRunner": "CLI seed machinery",
117
+ "resolveAutoSeedCategories": "CLI seed machinery",
118
+ "createInsertSchema": "drizzle-to-zod internal",
119
+ "createUpdateSchema": "drizzle-to-zod internal",
120
+ "drizzleColumnsToZod": "drizzle-to-zod internal",
121
+ "drizzleColumnToZod": "drizzle-to-zod internal",
122
+ "parseDatabaseError": "error mapping internal; ApiError is the taught surface",
123
+ "CMS_ERROR_CODES": "raw code map; ApiError + docs reference/error-codes are the taught surface",
124
+ "getHTTPStatusFromCode": "error mapping internal",
125
+ "mergeAdminConfig": "admin config merge internal (createApp applies it)",
126
+ "mergeAdminSidebar": "admin config merge internal",
127
+ "isAuthoritativeSidebar": "admin sidebar internal",
128
+ "shouldAutoAppendUnlistedSidebar": "admin sidebar internal",
129
+ "serializeFormLayoutProps": "server-driven admin UI internal",
130
+ "serializeReactivePropValue": "server-driven admin UI internal",
131
+ "serializeReactivePropsRecord": "server-driven admin UI internal",
132
+ "isReactiveConfig": "server-driven admin UI internal",
133
+ "isReactivePropPlaceholder": "server-driven admin UI internal",
134
+ "trackDependencies": "reactive admin fields internal",
135
+ "trackDepsFunction": "reactive admin fields internal",
136
+ "getDebounce": "reactive admin fields internal",
137
+ "extractDependencies": "reactive admin fields internal",
138
+ "createValidationTranslator": "i18n plumbing; messages merge + ctx.t are the taught surface",
139
+ "createZodErrorMap": "i18n plumbing",
140
+ "i18nParams": "i18n plumbing",
141
+ "isI18nLocaleMap": "i18n plumbing",
142
+ "isI18nTranslationKey": "i18n plumbing",
143
+ "mergeValidationMessages": "i18n plumbing",
144
+ "resolveI18nText": "i18n plumbing",
145
+ "validationMessagesCS": "built-in locale pack, loaded automatically",
146
+ "validationMessagesDE": "built-in locale pack",
147
+ "validationMessagesEN": "built-in locale pack",
148
+ "validationMessagesES": "built-in locale pack",
149
+ "validationMessagesFR": "built-in locale pack",
150
+ "validationMessagesPL": "built-in locale pack",
151
+ "validationMessagesPT": "built-in locale pack",
152
+ "validationMessagesSK": "built-in locale pack",
153
+ "dedupeBy": "shared util pass-through",
154
+ "deepMerge": "shared util pass-through; mergeRecord & friends are the taught merge surface",
155
+ "isNullish": "shared util pass-through",
156
+ "isPlainObject": "shared util pass-through",
157
+ "toCamelCase": "shared util pass-through",
158
+ "toKebabCase": "shared util pass-through",
159
+ "toPascalCase": "shared util pass-through",
160
+ "toSnakeCase": "shared util pass-through",
161
+ "DEFAULT_LOCALE": "framework default constant",
162
+ "DEFAULT_LOCALE_CONFIG": "framework default constant",
163
+ "questpieSearchTable": "search infrastructure table (managed by adapter migrations)",
164
+ "questpieSearchFacetsTable": "search infrastructure table",
165
+ "questpieRealtimeLogTable": "realtime outbox table (managed by adapter migrations)",
166
+ "extractFacetValues": "search indexing internal",
167
+ "indexRecordsJob": "search reindex job, registered automatically",
168
+ "indexRecordsSchema": "see indexRecordsJob",
169
+ "categoryRecordEntry": "codegen template emission util",
170
+ "categoryTypeEntry": "codegen template emission util",
171
+ "importStatement": "codegen template emission util",
172
+ "safeKey": "codegen template emission util",
173
+ "sortedValues": "codegen template emission util",
174
+ "sourceBasename": "codegen template emission util",
175
+ "checkRetroactiveMatch": "workflow engine internal",
176
+ "computeMatchHash": "workflow engine internal",
177
+ "createCompletedStepsMap": "workflow engine internal",
178
+ "cronFiredInWindow": "workflow engine internal",
179
+ "cronMatches": "workflow engine internal",
180
+ "dispatchEvent": "workflow engine internal; ctx.workflows.dispatchEvent is the taught surface",
181
+ "defaultWorkflowAccess": "default applied automatically; override via workflowsConfig({ access })",
182
+ "executeWorkflowHandler": "workflow engine internal",
183
+ "getMatchHashesForDispatch": "workflow engine internal",
184
+ "matchesCriteria": "workflow engine internal",
185
+ "parseCron": "workflow engine internal",
186
+ "parseDuration": "workflow engine internal",
187
+ "resolveDate": "workflow engine internal",
188
+ "runCompensations": "workflow engine internal",
189
+ "WILDCARD_HASH": "workflow engine internal constant",
190
+ "WorkflowLoggerImpl": "workflow engine internal",
191
+ "StepExecutionContext": "workflow engine internal",
192
+ "NonDeterministicError": "engine-raised error, surfaced in run records",
193
+ "StepFailedError": "engine-raised error, surfaced in run records",
194
+ "StepRetryError": "engine-raised error, surfaced in run records",
195
+ "StepSuspendError": "engine-raised control-flow error",
196
+ "WorkflowError": "engine-raised error, surfaced in run records",
197
+ "WorkflowTimeoutError": "engine-raised error, surfaced in run records",
198
+ "WorkflowsPage": "registered via workflowsClientModule (taught)",
199
+ "WorkflowListPage": "registered via workflowsClientModule",
200
+ "WorkflowDetailPage": "registered via workflowsClientModule"
201
+ },
202
+ "concepts": [
203
+ { "name": "auth-callback context (getContext in Better Auth callbacks)", "patterns": ["onLinkAccount"] },
204
+ { "name": "partial context overrides ({ accessMode } inherits session/db/locale)", "patterns": ["partial context override"] },
205
+ { "name": "job-level cron (options.cron)", "patterns": ["options:\\s*\\{\\s*cron"] },
206
+ { "name": "raw routes (.raw())", "patterns": ["\\.raw\\(\\)"] },
207
+ { "name": "signed URLs for private files", "patterns": ["generateSignedUrlToken"] },
208
+ { "name": "sandboxed code execution (ctx.executor)", "patterns": ["ctx\\.executor\\.run"] },
209
+ { "name": "client-side auth (authClient)", "patterns": ["createAdminAuthClient", "authClient"] },
210
+ { "name": "infer-first map (type-inference reference)", "patterns": ["CollectionDoc<"] },
211
+ { "name": "realtime invalidation topics", "patterns": ["buildCollectionTopic"] }
212
+ ]
213
+ }