@usequark/quark-create-app 1.23.11 → 1.23.12
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/LICENSE +21 -0
- package/README.md +26 -26
- package/package.json +55 -55
- package/src/index.js +17 -17
- package/src/mobile-template.test.js +1 -1
- package/src/scaffold-output.test.js +50 -0
- package/src/template-scripts.test.js +1 -1
- package/src/utils.js +1 -1
- package/templates/base-project/.cursor/rules/quark.mdc +17 -17
- package/templates/base-project/.github/copilot-instructions.md +5 -5
- package/templates/base-project/.github/skills/project-context/SKILL.md +6 -6
- package/templates/base-project/CLAUDE.md +12 -12
- package/templates/base-project/README.md +3 -3
- package/templates/base-project/apps/web/next.config.js +5 -5
- package/templates/base-project/apps/web/package.json +5 -5
- package/templates/base-project/apps/web/src/app/_components/HomeThemeToggle.js +1 -1
- package/templates/base-project/apps/web/src/app/api/auth/apple/route.js +2 -2
- package/templates/base-project/apps/web/src/app/api/auth/google/route.js +2 -2
- package/templates/base-project/apps/web/src/app/api/auth/refresh/route.js +1 -1
- package/templates/base-project/apps/web/src/app/api/auth/register/route.js +3 -3
- package/templates/base-project/apps/web/src/app/api/auth/token/route.js +2 -2
- package/templates/base-project/apps/web/src/app/api/csrf/route.js +1 -1
- package/templates/base-project/apps/web/src/app/api/device/register/route.js +2 -2
- package/templates/base-project/apps/web/src/app/api/error-handler.js +1 -1
- package/templates/base-project/apps/web/src/app/api/files/[id]/route.js +2 -2
- package/templates/base-project/apps/web/src/app/api/files/route.js +2 -2
- package/templates/base-project/apps/web/src/app/api/health/route.js +2 -2
- package/templates/base-project/apps/web/src/app/api/users/[id]/route.js +2 -2
- package/templates/base-project/apps/web/src/app/api/users/me/route.js +2 -2
- package/templates/base-project/apps/web/src/app/api/users/route.js +2 -2
- package/templates/base-project/apps/web/src/app/auth/error/page.js +1 -1
- package/templates/base-project/apps/web/src/app/auth/forgot-password/page.js +1 -1
- package/templates/base-project/apps/web/src/app/auth/register/RegisterPageClient.js +1 -1
- package/templates/base-project/apps/web/src/app/auth/signin/SignInPageClient.js +1 -1
- package/templates/base-project/apps/web/src/app/layout.js +1 -1
- package/templates/base-project/apps/web/src/app/manifest.js +1 -1
- package/templates/base-project/apps/web/src/app/page.js +19 -19
- package/templates/base-project/apps/web/src/app/robots.js +1 -1
- package/templates/base-project/apps/web/src/app/sitemap.js +1 -1
- package/templates/base-project/apps/web/src/lib/analytics/umami-replay.js +1 -1
- package/templates/base-project/apps/web/src/lib/auth-middleware.js +1 -1
- package/templates/base-project/apps/web/src/lib/auth-signup.js +1 -1
- package/templates/base-project/apps/web/src/lib/auth.js +2 -2
- package/templates/base-project/apps/web/src/lib/jwt.js +1 -1
- package/templates/base-project/apps/web/src/lib/proxy-auth.js +1 -1
- package/templates/base-project/apps/web/src/lib/seo/site-metadata.js +1 -1
- package/templates/base-project/apps/web/src/preflight.js +3 -3
- package/templates/base-project/apps/web/src/proxy.js +1 -1
- package/templates/base-project/docs/START_HERE.md +2 -2
- package/templates/base-project/packages/db/package.json +2 -2
- package/templates/base-project/packages/db/src/client.js +3 -3
- package/templates/base-project/packages/db/src/umami.js +1 -1
- package/templates/base-project/scripts/check-loading.mjs +1 -1
- package/templates/base-project/scripts/doctor.js +1 -1
- package/templates/base-project/skills/add-endpoint/SKILL.md +1 -1
- package/templates/base-project/skills/ecommerce/SKILL.md +2 -2
- package/templates/base-project/skills/ecommerce-cart/SKILL.md +3 -3
- package/templates/base-project/skills/ecommerce-catalog/SKILL.md +3 -3
- package/templates/base-project/skills/ecommerce-checkout/SKILL.md +2 -2
- package/templates/base-project/skills/i18n/SKILL.md +6 -6
- package/templates/base-project/skills/payment/SKILL.md +8 -8
- package/templates/config/package.json +1 -1
- package/templates/config/src/app-url.js +1 -1
- package/templates/config/src/environment.js +1 -1
- package/templates/config/src/load-config.js +2 -2
- package/templates/config/src/redis.js +1 -1
- package/templates/config/src/validate-env.js +2 -2
- package/templates/jobs/README.md +2 -2
- package/templates/mobile/lib/errors.ts +1 -1
- package/templates/ui/src/theme-constants.js +1 -1
- package/templates/worker/README.md +2 -2
- package/templates/worker/package.json +4 -4
- package/templates/worker/src/handlers/email-job-validation.js +1 -1
- package/templates/worker/src/handlers/email.js +5 -5
- package/templates/worker/src/handlers/files.js +4 -4
- package/templates/worker/src/handlers/index.js +1 -1
- package/templates/worker/src/handlers/push-notification.js +3 -3
- package/templates/worker/src/index.js +6 -6
- package/templates/worker/src/lib/railway.js +2 -2
- package/templates/worker/src/lib/tokens.js +1 -1
|
@@ -32,17 +32,17 @@ __QUARK_OPTIONAL_PACKAGES__├── docker-compose.yml
|
|
|
32
32
|
- **ESM only** — `import`/`export`. Never `require()` or `module.exports`.
|
|
33
33
|
- **No TypeScript** — `.js` and `.jsx` files only.
|
|
34
34
|
- **Zod required** — all Server Actions and API routes must validate with Zod.
|
|
35
|
-
- **No `throw new Error()`** — use `AppError` / `ValidationError` from `@
|
|
36
|
-
- **No `console.log`** — use `createLogger(name)` from `@
|
|
35
|
+
- **No `throw new Error()`** — use `AppError` / `ValidationError` from `@usequark/quark-core/errors`.
|
|
36
|
+
- **No `console.log`** — use `createLogger(name)` from `@usequark/quark-core`.
|
|
37
37
|
- **DB models** — every Prisma model must include `createdAt DateTime @default(now())` and `updatedAt DateTime @updatedAt`.
|
|
38
38
|
|
|
39
39
|
## Package Imports
|
|
40
40
|
|
|
41
41
|
```javascript
|
|
42
|
-
// Published (from npm) - @
|
|
43
|
-
import { AppError, ValidationError } from "@
|
|
44
|
-
import { createLogger } from "@
|
|
45
|
-
import { getCurrentSession } from "@
|
|
42
|
+
// Published (from npm) - @usequark/ prefix:
|
|
43
|
+
import { AppError, ValidationError } from "@usequark/quark-core/errors";
|
|
44
|
+
import { createLogger } from "@usequark/quark-core";
|
|
45
|
+
import { getCurrentSession } from "@usequark/quark-core";
|
|
46
46
|
|
|
47
47
|
// Workspace packages - ALWAYS use @__QUARK_SCOPE__/:
|
|
48
48
|
import { prisma } from "@__QUARK_SCOPE__/db";
|
|
@@ -68,9 +68,9 @@ Import from `@__QUARK_SCOPE__/ui` — never `@/components/ui/*`. Every component
|
|
|
68
68
|
```javascript
|
|
69
69
|
"use server";
|
|
70
70
|
import { z } from "zod";
|
|
71
|
-
import { ValidationError, AppError } from "@
|
|
72
|
-
import { getCurrentSession } from "@
|
|
73
|
-
import { createLogger } from "@
|
|
71
|
+
import { ValidationError, AppError } from "@usequark/quark-core/errors";
|
|
72
|
+
import { getCurrentSession } from "@usequark/quark-core";
|
|
73
|
+
import { createLogger } from "@usequark/quark-core";
|
|
74
74
|
import { prisma } from "@__QUARK_SCOPE__/db";
|
|
75
75
|
|
|
76
76
|
const log = createLogger("action:example");
|
|
@@ -91,7 +91,7 @@ export async function createExample(formData) {
|
|
|
91
91
|
|
|
92
92
|
```javascript
|
|
93
93
|
import { NextResponse } from "next/server";
|
|
94
|
-
import { AppError } from "@
|
|
94
|
+
import { AppError } from "@usequark/quark-core/errors";
|
|
95
95
|
|
|
96
96
|
export async function GET(request) {
|
|
97
97
|
try {
|
|
@@ -114,7 +114,7 @@ export async function GET(request) {
|
|
|
114
114
|
## Auth
|
|
115
115
|
|
|
116
116
|
```javascript
|
|
117
|
-
import { getCurrentSession } from "@
|
|
117
|
+
import { getCurrentSession } from "@usequark/quark-core";
|
|
118
118
|
const session = await getCurrentSession();
|
|
119
119
|
if (!session) redirect("/login"); // Server Component
|
|
120
120
|
if (!session) throw new AppError("Unauthorized", 401); // Server Action
|
|
@@ -124,7 +124,7 @@ if (!session) throw new AppError("Unauthorized", 401); // Server Action
|
|
|
124
124
|
|
|
125
125
|
```javascript
|
|
126
126
|
// Dispatch:
|
|
127
|
-
import { createQueue, addJob } from "@
|
|
127
|
+
import { createQueue, addJob } from "@usequark/quark-core";
|
|
128
128
|
import { JOB_NAMES } from "@__QUARK_SCOPE__/jobs";
|
|
129
129
|
await addJob(createQueue("default"), JOB_NAMES.SEND_WELCOME_EMAIL, { userId });
|
|
130
130
|
|
|
@@ -38,7 +38,7 @@ __QUARK_FEATURE_ROWS__
|
|
|
38
38
|
Optional features can be added later with:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
npx @
|
|
41
|
+
npx @usequark/quark-create-app add <feature>
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
### PWA (Optional)
|
|
@@ -84,8 +84,8 @@ pnpm clean:check # Review reclaimable build artifacts
|
|
|
84
84
|
pnpm clean # Remove local build artifacts
|
|
85
85
|
pnpm clean:deep # Also remove repo-local temp workspaces
|
|
86
86
|
QUARK_SKIP_AUTO_CLEAN=1 pnpm dev # Disable dev auto-clean for this run
|
|
87
|
-
npx @
|
|
88
|
-
npx @
|
|
87
|
+
npx @usequark/quark-create-app update --scaffold-check # Review scaffold-managed drift
|
|
88
|
+
npx @usequark/quark-create-app update --scaffold-check --fail-on-drift # CI-friendly drift check
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
## Launch
|
|
@@ -53,13 +53,13 @@ const nextConfig = {
|
|
|
53
53
|
// Node built-ins (child_process, net, worker_threads, dns, fs).
|
|
54
54
|
serverExternalPackages: ["bullmq"],
|
|
55
55
|
|
|
56
|
-
// Support workspace package resolution (including @
|
|
56
|
+
// Support workspace package resolution (including @usequark/quark-db which uses
|
|
57
57
|
// the Prisma driver-adapter pattern - pure JS, no native engine binary)
|
|
58
58
|
transpilePackages: [
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
59
|
+
"@usequark/quark-core",
|
|
60
|
+
"@usequark/quark-db",
|
|
61
|
+
"@usequark/quark-ui",
|
|
62
|
+
"@usequark/quark-jobs",
|
|
63
63
|
],
|
|
64
64
|
|
|
65
65
|
// Security headers
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"@aws-sdk/client-s3": "^3.1140.0",
|
|
20
20
|
"@aws-sdk/s3-request-presigner": "^3.1140.0",
|
|
21
21
|
"@prisma/client": "^7.10.0",
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
22
|
+
"@usequark/quark-core": "^2.0.0",
|
|
23
|
+
"@usequark/quark-db": "workspace:*",
|
|
24
|
+
"@usequark/quark-jobs": "workspace:*",
|
|
25
|
+
"@usequark/quark-ui": "workspace:*",
|
|
26
26
|
"ioredis": "^6.0.0",
|
|
27
27
|
"jose": "^6.2.12",
|
|
28
28
|
"next": "16.3.6",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"@tailwindcss/postcss": "^4.3.3",
|
|
38
38
|
"@types/node": "^26.6.2",
|
|
39
39
|
"tailwindcss": "^4.3.3",
|
|
40
|
-
"@
|
|
40
|
+
"@usequark/quark-config": "workspace:*"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateBody } from "@
|
|
2
|
-
import { user } from "@
|
|
1
|
+
import { validateBody } from "@usequark/quark-core";
|
|
2
|
+
import { user } from "@usequark/quark-db";
|
|
3
3
|
import { importJWK, jwtVerify } from "jose";
|
|
4
4
|
import { NextResponse } from "next/server";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateBody } from "@
|
|
2
|
-
import { user } from "@
|
|
1
|
+
import { validateBody } from "@usequark/quark-core";
|
|
2
|
+
import { user } from "@usequark/quark-db";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { issueTokenPair } from "../../../../lib/jwt";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLogger, validateBody } from "@
|
|
1
|
+
import { createLogger, validateBody } from "@usequark/quark-core";
|
|
2
2
|
import { NextResponse } from "next/server";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { issueTokenPair, verifyMobileToken } from "../../../../lib/jwt";
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
hashPassword,
|
|
4
4
|
validateBody,
|
|
5
5
|
withCsrfProtection,
|
|
6
|
-
} from "@
|
|
7
|
-
import { user, userRegisterSchema } from "@
|
|
8
|
-
import { JOB_NAMES, JOB_QUEUES } from "@
|
|
6
|
+
} from "@usequark/quark-core";
|
|
7
|
+
import { user, userRegisterSchema } from "@usequark/quark-db";
|
|
8
|
+
import { JOB_NAMES, JOB_QUEUES } from "@usequark/quark-jobs";
|
|
9
9
|
import { NextResponse } from "next/server";
|
|
10
10
|
import { isSignupEnabled } from "@/lib/auth-signup";
|
|
11
11
|
import { handleError } from "../../error-handler";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateBody, verifyPassword } from "@
|
|
2
|
-
import { user } from "@
|
|
1
|
+
import { validateBody, verifyPassword } from "@usequark/quark-core";
|
|
2
|
+
import { user } from "@usequark/quark-db";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { issueTokenPair } from "../../../../lib/jwt";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* and returns it to the client for inclusion in request headers.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { generateCsrfToken } from "@
|
|
7
|
+
import { generateCsrfToken } from "@usequark/quark-core";
|
|
8
8
|
import { NextResponse } from "next/server";
|
|
9
9
|
import { auth } from "@/lib/auth";
|
|
10
10
|
import { getCsrfCookieOptions } from "@/lib/csrf-cookie";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateBody } from "@
|
|
2
|
-
import { prisma } from "@
|
|
1
|
+
import { validateBody } from "@usequark/quark-core";
|
|
2
|
+
import { prisma } from "@usequark/quark-db";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { extractBearerPayload } from "../../../../lib/jwt";
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
ForbiddenError,
|
|
10
10
|
NotFoundError,
|
|
11
11
|
withCsrfProtection,
|
|
12
|
-
} from "@
|
|
13
|
-
import { file } from "@
|
|
12
|
+
} from "@usequark/quark-core";
|
|
13
|
+
import { file } from "@usequark/quark-db";
|
|
14
14
|
import { NextResponse } from "next/server";
|
|
15
15
|
import { requireAuth } from "@/lib/auth-middleware";
|
|
16
16
|
import { handleError } from "../../error-handler";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
parsePaginationQuery,
|
|
12
12
|
validateFile,
|
|
13
13
|
withCsrfProtection,
|
|
14
|
-
} from "@
|
|
15
|
-
import { file } from "@
|
|
14
|
+
} from "@usequark/quark-core";
|
|
15
|
+
import { file } from "@usequark/quark-db";
|
|
16
16
|
import { NextResponse } from "next/server";
|
|
17
17
|
import { requireAuth } from "@/lib/auth-middleware";
|
|
18
18
|
import { handleError } from "../error-handler";
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
createStorage,
|
|
10
10
|
getRegisteredQueues,
|
|
11
11
|
pingRedis,
|
|
12
|
-
} from "@
|
|
13
|
-
import { pingDatabase } from "@
|
|
12
|
+
} from "@usequark/quark-core";
|
|
13
|
+
import { pingDatabase } from "@usequark/quark-db";
|
|
14
14
|
import { NextResponse } from "next/server";
|
|
15
15
|
|
|
16
16
|
const logger = createLogger("health");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateBody, withCsrfProtection } from "@
|
|
2
|
-
import { user, userUpdateSchema } from "@
|
|
1
|
+
import { validateBody, withCsrfProtection } from "@usequark/quark-core";
|
|
2
|
+
import { user, userUpdateSchema } from "@usequark/quark-db";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
4
|
import { requireRole } from "@/lib/auth-middleware";
|
|
5
5
|
import { handleError } from "../../error-handler";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateBody, withCsrfProtection } from "@
|
|
2
|
-
import { user, userUpdateSchema } from "@
|
|
1
|
+
import { validateBody, withCsrfProtection } from "@usequark/quark-core";
|
|
2
|
+
import { user, userUpdateSchema } from "@usequark/quark-db";
|
|
3
3
|
import { NextResponse } from "next/server";
|
|
4
4
|
import { extractBearerPayload } from "../../../../lib/jwt";
|
|
5
5
|
import { handleError } from "../../error-handler";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
parsePaginationQuery,
|
|
3
3
|
validateBody,
|
|
4
4
|
withCsrfProtection,
|
|
5
|
-
} from "@
|
|
6
|
-
import { user, userCreateSchema } from "@
|
|
5
|
+
} from "@usequark/quark-core";
|
|
6
|
+
import { user, userCreateSchema } from "@usequark/quark-db";
|
|
7
7
|
import { NextResponse } from "next/server";
|
|
8
8
|
import { requireRole } from "@/lib/auth-middleware";
|
|
9
9
|
import { handleError } from "../error-handler";
|
|
@@ -2,7 +2,7 @@ import "./globals.css";
|
|
|
2
2
|
import {
|
|
3
3
|
THEME_ATTR,
|
|
4
4
|
THEME_STORAGE_KEY,
|
|
5
|
-
} from "@
|
|
5
|
+
} from "@usequark/quark-ui/theme-constants";
|
|
6
6
|
import { buildUmamiBeforeSendScript } from "../lib/analytics/umami-before-send.js";
|
|
7
7
|
import { getUmamiConfig } from "../lib/analytics/umami-config.js";
|
|
8
8
|
import { getSiteMetadata } from "../lib/seo/site-metadata.js";
|
|
@@ -8,7 +8,7 @@ const PANELS = [
|
|
|
8
8
|
title: "Need a landing page?",
|
|
9
9
|
description:
|
|
10
10
|
"Build a high-converting landing page with a hero section, social proof, and lead capture",
|
|
11
|
-
prompt: `You are a senior full-stack engineer building a production-ready landing page for a local business using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
11
|
+
prompt: `You are a senior full-stack engineer building a production-ready landing page for a local business using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod validation, Biome linting). The app runs on Railway with PostgreSQL and Redis. ESM only, no TypeScript, no console.log in app code — use createLogger from @usequark/quark-core. No throw new Error — use AppError/ValidationError. All Server Actions must validate with Zod. Every Prisma model needs createdAt and updatedAt. Import UI from @usequark/quark-ui, never deep-import.
|
|
12
12
|
|
|
13
13
|
Goal: Build an SEO-optimised landing page for a local business (e.g., plumber, restaurant, salon).
|
|
14
14
|
|
|
@@ -16,13 +16,13 @@ Ask the user: What is the business name and type? What services do they offer? D
|
|
|
16
16
|
|
|
17
17
|
Build: Hero section with business name and tagline, services list, testimonials carousel, contact form with server-side Zod validation, SEO metadata (title, description, OG tags), responsive layout. Add a ContactInquiry Prisma model for form submissions with status tracking.
|
|
18
18
|
|
|
19
|
-
Patterns to follow: Use AppError/ValidationError for error handling, prisma from @
|
|
19
|
+
Patterns to follow: Use AppError/ValidationError for error handling, prisma from @usequark/quark-db, validateBody with Zod, withCsrfProtection on POST routes.`,
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
title: "Want a dashboard?",
|
|
23
23
|
description:
|
|
24
24
|
"Create an interactive analytics portal with live charts, auth, and customizable metrics",
|
|
25
|
-
prompt: `You are a senior full-stack engineer building a management dashboard using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
25
|
+
prompt: `You are a senior full-stack engineer building a management dashboard using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis, BullMQ for background jobs. ESM only, no TypeScript. Use createLogger from @usequark/quark-core for logging, AppError/ValidationError for errors. All Server Actions validate with Zod. Import UI from @usequark/quark-ui.
|
|
26
26
|
|
|
27
27
|
Goal: Build an SEO performance dashboard where users can track site metrics, keyword rankings, and crawl health.
|
|
28
28
|
|
|
@@ -36,7 +36,7 @@ Patterns to follow: Use requireAuth() for protected routes, prisma queries with
|
|
|
36
36
|
title: "Building a SaaS?",
|
|
37
37
|
description:
|
|
38
38
|
"Ship a multi-tenant SaaS foundation with subscription billing, team seats, and background jobs",
|
|
39
|
-
prompt: `You are a senior full-stack engineer building a multi-tenant SaaS application using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
39
|
+
prompt: `You are a senior full-stack engineer building a multi-tenant SaaS application using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis, BullMQ. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod required on all Server Actions. Import UI from @usequark/quark-ui.
|
|
40
40
|
|
|
41
41
|
Goal: Build a SaaS platform with user auth, team workspaces, Stripe subscription billing, and background job processing.
|
|
42
42
|
|
|
@@ -50,7 +50,7 @@ Patterns to follow: Use Workspace-scoped queries (filter by workspaceId), requir
|
|
|
50
50
|
title: "Running a store?",
|
|
51
51
|
description:
|
|
52
52
|
"Launch an e-commerce store with a searchable catalog, shopping cart, and Stripe checkout",
|
|
53
|
-
prompt: `You are a senior full-stack engineer building an e-commerce storefront using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
53
|
+
prompt: `You are a senior full-stack engineer building an e-commerce storefront using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis, BullMQ. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
54
54
|
|
|
55
55
|
Goal: Build a product catalog with shopping cart, Stripe checkout, and order management.
|
|
56
56
|
|
|
@@ -64,7 +64,7 @@ Patterns to follow: Use Decimal for prices, cascade deletes for owned relationsh
|
|
|
64
64
|
title: "Publishing content?",
|
|
65
65
|
description:
|
|
66
66
|
"Start a modern blog engine with MDX posts, category tags, instant search, and RSS",
|
|
67
|
-
prompt: `You are a senior full-stack engineer building a content platform using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
67
|
+
prompt: `You are a senior full-stack engineer building a content platform using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
68
68
|
|
|
69
69
|
Goal: Build a blog with MDX support, tag filtering, syntax highlighting, and an RSS feed.
|
|
70
70
|
|
|
@@ -78,7 +78,7 @@ Patterns to follow: Use Post model with published Boolean, include author relati
|
|
|
78
78
|
title: "Need a booking system?",
|
|
79
79
|
description:
|
|
80
80
|
"Set up automated scheduling with calendar sync, client availability, and event reminders",
|
|
81
|
-
prompt: `You are a senior full-stack engineer building a booking system using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
81
|
+
prompt: `You are a senior full-stack engineer building a booking system using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis, BullMQ for notifications. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
82
82
|
|
|
83
83
|
Goal: Build an appointment booking system with service listings, calendar availability, and email notifications.
|
|
84
84
|
|
|
@@ -92,21 +92,21 @@ Patterns to follow: Use DateTime fields for scheduling, unique constraints to pr
|
|
|
92
92
|
title: "Building a portfolio?",
|
|
93
93
|
description:
|
|
94
94
|
"Showcase your work with a developer portfolio, project highlights, and a contact form",
|
|
95
|
-
prompt: `You are a senior full-stack engineer building a developer portfolio using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
95
|
+
prompt: `You are a senior full-stack engineer building a developer portfolio using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
96
96
|
|
|
97
97
|
Goal: Build a personal developer portfolio with project showcase, case study pages, and a contact form.
|
|
98
98
|
|
|
99
99
|
Ask the user: What is the developer's name and tagline? What projects should be featured (give 3-5 examples with descriptions, tech stacks, and links)? Do they need a blog section? What social links (GitHub, LinkedIn, Twitter)? Should the theme toggle between dark and light?
|
|
100
100
|
|
|
101
|
-
Build: Project and Skill Prisma models, home page with hero + featured projects grid, individual project pages with description, tech stack badges, and live/repo links, about page with skills and experience, contact form with Zod validation, dark/light theme toggle (use ThemeProvider from @
|
|
101
|
+
Build: Project and Skill Prisma models, home page with hero + featured projects grid, individual project pages with description, tech stack badges, and live/repo links, about page with skills and experience, contact form with Zod validation, dark/light theme toggle (use ThemeProvider from @usequark/quark-ui), responsive design.
|
|
102
102
|
|
|
103
|
-
Patterns to follow: Use Card components from @
|
|
103
|
+
Patterns to follow: Use Card components from @usequark/quark-ui, Badge for tech stack, contact form with ContactInquiry model, SEO metadata per page.`,
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
title: "Need an admin panel?",
|
|
107
107
|
description:
|
|
108
108
|
"Manage your app with an internal admin portal featuring CRUD workflows, roles, and audit logs",
|
|
109
|
-
prompt: `You are a senior full-stack engineer building an admin panel using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
109
|
+
prompt: `You are a senior full-stack engineer building an admin panel using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
110
110
|
|
|
111
111
|
Goal: Build an internal admin dashboard with role-based access, data tables, and audit logging.
|
|
112
112
|
|
|
@@ -120,7 +120,7 @@ Patterns to follow: Use adminConfig.modelOverrides for model customization, repl
|
|
|
120
120
|
title: "Building a real-time app?",
|
|
121
121
|
description:
|
|
122
122
|
"Go live with real-time collaboration using WebSockets, presence indicators, and state sync",
|
|
123
|
-
prompt: `You are a senior full-stack engineer building a real-time collaborative app using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
123
|
+
prompt: `You are a senior full-stack engineer building a real-time collaborative app using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis (for pub/sub and presence), BullMQ for background processing. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
124
124
|
|
|
125
125
|
Goal: Build a real-time collaborative application with live updates, user presence, and persistent state.
|
|
126
126
|
|
|
@@ -134,7 +134,7 @@ Patterns to follow: Use Redis for real-time pub/sub, BullMQ for debounced persis
|
|
|
134
134
|
title: "Integrating AI features?",
|
|
135
135
|
description:
|
|
136
136
|
"Add AI capabilities with streaming responses, prompt templates, vector search, and token tracking",
|
|
137
|
-
prompt: `You are a senior full-stack engineer building AI-powered features using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
137
|
+
prompt: `You are a senior full-stack engineer building AI-powered features using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis, BullMQ for background processing. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
138
138
|
|
|
139
139
|
Goal: Add AI capabilities to an existing Quark application — streaming chat, prompt management, vector search, and usage tracking.
|
|
140
140
|
|
|
@@ -148,7 +148,7 @@ Patterns to follow: Use Server-Sent Events for streaming, Prisma for conversatio
|
|
|
148
148
|
title: "Building a community?",
|
|
149
149
|
description:
|
|
150
150
|
"Launch a discussion forum with user profiles, nested comments, upvoting, and moderation",
|
|
151
|
-
prompt: `You are a senior full-stack engineer building a community platform using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
151
|
+
prompt: `You are a senior full-stack engineer building a community platform using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis, BullMQ for background jobs. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
152
152
|
|
|
153
153
|
Goal: Build a discussion forum with user-generated content, threading, voting, and moderation tools.
|
|
154
154
|
|
|
@@ -162,7 +162,7 @@ Patterns to follow: Use nested set or parent relation for comment threading, opt
|
|
|
162
162
|
title: "Creating an API?",
|
|
163
163
|
description:
|
|
164
164
|
"Build a scalable REST or GraphQL API with rate limiting, OpenAPI docs, and secure auth",
|
|
165
|
-
prompt: `You are a senior full-stack engineer building an API layer using Quark (Next.js 16, App Router, Route Handlers, Prisma, Zod, Biome). Stack: PostgreSQL, Redis for rate limiting and caching. ESM only, no TypeScript. Use AppError/ValidationError from @
|
|
165
|
+
prompt: `You are a senior full-stack engineer building an API layer using Quark (Next.js 16, App Router, Route Handlers, Prisma, Zod, Biome). Stack: PostgreSQL, Redis for rate limiting and caching. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all API routes. Import UI from @usequark/quark-ui where needed.
|
|
166
166
|
|
|
167
167
|
Goal: Build a well-documented, secure API with authentication, rate limiting, and OpenAPI specification.
|
|
168
168
|
|
|
@@ -176,7 +176,7 @@ Patterns to follow: Use Next.js Route Handlers for REST endpoints, Redis INCR wi
|
|
|
176
176
|
title: "Need a marketplace?",
|
|
177
177
|
description:
|
|
178
178
|
"Connect buyers and sellers with vendor onboarding, split payments, and search filters",
|
|
179
|
-
prompt: `You are a senior full-stack engineer building a marketplace platform using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
179
|
+
prompt: `You are a senior full-stack engineer building a marketplace platform using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis, BullMQ for background jobs. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
180
180
|
|
|
181
181
|
Goal: Build a two-sided marketplace connecting buyers and sellers with vendor management and payment splitting.
|
|
182
182
|
|
|
@@ -190,7 +190,7 @@ Patterns to follow: Use Stripe Connect for marketplace payments, full-text searc
|
|
|
190
190
|
title: "Building a mobile app?",
|
|
191
191
|
description:
|
|
192
192
|
"Kickstart a cross-platform mobile app with native navigation, offline storage, and push alerts",
|
|
193
|
-
prompt: `You are a senior full-stack engineer building a mobile app backend and web companion using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
193
|
+
prompt: `You are a senior full-stack engineer building a mobile app backend and web companion using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL, Redis, BullMQ for background jobs. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
194
194
|
|
|
195
195
|
Goal: Build the backend API and data layer for a cross-platform mobile app, with a responsive web companion.
|
|
196
196
|
|
|
@@ -204,7 +204,7 @@ Patterns to follow: Use JWT for mobile auth (separate from NextAuth web session)
|
|
|
204
204
|
title: "Setting up docs?",
|
|
205
205
|
description:
|
|
206
206
|
"Publish developer documentation with full-text search, code blocks, and version switching",
|
|
207
|
-
prompt: `You are a senior full-stack engineer building a documentation site using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @
|
|
207
|
+
prompt: `You are a senior full-stack engineer building a documentation site using Quark (Next.js 16, App Router, Server Actions, Prisma, Tailwind via @usequark/quark-ui, Zod, Biome). Stack: PostgreSQL for search indexing. ESM only, no TypeScript. Use AppError/ValidationError from @usequark/quark-core/errors, createLogger for logging. Zod on all Server Actions. Import UI from @usequark/quark-ui.
|
|
208
208
|
|
|
209
209
|
Goal: Build a developer documentation site with search, code examples, and version management.
|
|
210
210
|
|
|
@@ -235,7 +235,7 @@ export default function Home() {
|
|
|
235
235
|
</a>
|
|
236
236
|
<span className="quark-home-sep">·</span>
|
|
237
237
|
<a
|
|
238
|
-
href="https://www.npmjs.com/package/@
|
|
238
|
+
href="https://www.npmjs.com/package/@usequark/quark-create-app"
|
|
239
239
|
target="_blank"
|
|
240
240
|
rel="noopener noreferrer"
|
|
241
241
|
className="quark-home-link"
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
createAuthConfig,
|
|
4
4
|
createLogger,
|
|
5
5
|
verifyPassword,
|
|
6
|
-
} from "@
|
|
7
|
-
import { Prisma, prisma, user } from "@
|
|
6
|
+
} from "@usequark/quark-core";
|
|
7
|
+
import { Prisma, prisma, user } from "@usequark/quark-db";
|
|
8
8
|
import NextAuth from "next-auth";
|
|
9
9
|
import CredentialsProvider from "next-auth/providers/credentials";
|
|
10
10
|
import GithubProvider from "next-auth/providers/github";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { loadConfig } from "@
|
|
4
|
-
import { createLogger } from "@
|
|
5
|
-
import { pingDatabase } from "@
|
|
3
|
+
import { loadConfig } from "@usequark/quark-config";
|
|
4
|
+
import { createLogger } from "@usequark/quark-core";
|
|
5
|
+
import { pingDatabase } from "@usequark/quark-db";
|
|
6
6
|
|
|
7
7
|
const logger = createLogger("web-preflight");
|
|
8
8
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* 2. Rate limiting, CORS, security headers for all API routes.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { getAllowedOrigins } from "@
|
|
11
|
+
import { getAllowedOrigins } from "@usequark/quark-config/app-url";
|
|
12
12
|
import { NextResponse } from "next/server";
|
|
13
13
|
|
|
14
14
|
import { buildContentSecurityPolicy } from "./lib/analytics/umami-csp.js";
|
|
@@ -48,13 +48,13 @@ That is the fastest way to move from "starter" to "product code."
|
|
|
48
48
|
Before taking Quark infrastructure updates, review scaffold-managed drift from the project root:
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
npx @
|
|
51
|
+
npx @usequark/quark-create-app update --scaffold-check
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
If you want CI to fail when scaffold-managed files drift, use:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
npx @
|
|
57
|
+
npx @usequark/quark-create-app update --scaffold-check --fail-on-drift
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
## Recover disk space
|