@withmata/blueprints 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/.claude/commands/audit.md +179 -0
  2. package/.claude/commands/discover.md +92 -0
  3. package/.claude/commands/new-blueprint.md +265 -0
  4. package/.claude/commands/new-project.md +230 -0
  5. package/.claude/commands/scaffold-auth.md +310 -0
  6. package/.claude/commands/scaffold-db.md +270 -0
  7. package/.claude/commands/scaffold-foundation.md +158 -0
  8. package/.cursor/commands/audit.md +179 -0
  9. package/.cursor/commands/discover.md +92 -0
  10. package/.cursor/commands/new-blueprint.md +265 -0
  11. package/.cursor/commands/new-project.md +230 -0
  12. package/.cursor/commands/scaffold-auth.md +310 -0
  13. package/.cursor/commands/scaffold-db.md +270 -0
  14. package/.cursor/commands/scaffold-foundation.md +158 -0
  15. package/.opencode/commands/audit.md +183 -0
  16. package/.opencode/commands/discover.md +96 -0
  17. package/.opencode/commands/new-blueprint.md +269 -0
  18. package/.opencode/commands/new-project.md +234 -0
  19. package/.opencode/commands/scaffold-auth.md +314 -0
  20. package/.opencode/commands/scaffold-db.md +274 -0
  21. package/.opencode/commands/scaffold-foundation.md +162 -0
  22. package/ENGINEERING.md +47 -0
  23. package/blueprints/discovery/product-discovery/BLUEPRINT.md +361 -0
  24. package/blueprints/discovery/product-discovery/templates/archetype-template.md +143 -0
  25. package/blueprints/discovery/product-discovery/templates/product-brief.md +65 -0
  26. package/blueprints/discovery/product-discovery/templates/product-thesis.md +64 -0
  27. package/blueprints/discovery/product-discovery/templates/research-summary.md +43 -0
  28. package/blueprints/features/auth-better-auth/BLUEPRINT.md +794 -0
  29. package/blueprints/features/auth-better-auth/files/client/auth-client.ts +31 -0
  30. package/blueprints/features/auth-better-auth/files/client/context/organization.ts +236 -0
  31. package/blueprints/features/auth-better-auth/files/client/hooks/use-create-organization.ts +45 -0
  32. package/blueprints/features/auth-better-auth/files/client/hooks/use-has-permission.ts +26 -0
  33. package/blueprints/features/auth-better-auth/files/client/hooks/use-organization.ts +64 -0
  34. package/blueprints/features/auth-better-auth/files/client/schema/auth.ts +21 -0
  35. package/blueprints/features/auth-better-auth/files/client/schema/organization.ts +51 -0
  36. package/blueprints/features/auth-better-auth/files/client/types/organization.ts +20 -0
  37. package/blueprints/features/auth-better-auth/files/db/auth-schema.ts +184 -0
  38. package/blueprints/features/auth-better-auth/files/db/drizzle.config.ts +21 -0
  39. package/blueprints/features/auth-better-auth/files/middleware/route-protection.ts +84 -0
  40. package/blueprints/features/auth-better-auth/files/server/auth-db.ts +18 -0
  41. package/blueprints/features/auth-better-auth/files/server/auth.ts +159 -0
  42. package/blueprints/features/auth-better-auth/files/server/env.ts +44 -0
  43. package/blueprints/features/auth-better-auth/files/server/middleware.ts +144 -0
  44. package/blueprints/features/db-drizzle-postgres/BLUEPRINT.md +596 -0
  45. package/blueprints/features/db-drizzle-postgres/files/db/drizzle.config.ts +18 -0
  46. package/blueprints/features/db-drizzle-postgres/files/db/env.example +3 -0
  47. package/blueprints/features/db-drizzle-postgres/files/db/package.json +33 -0
  48. package/blueprints/features/db-drizzle-postgres/files/db/src/client.ts +34 -0
  49. package/blueprints/features/db-drizzle-postgres/files/db/src/example-entity.ts +73 -0
  50. package/blueprints/features/db-drizzle-postgres/files/db/src/index.ts +8 -0
  51. package/blueprints/features/db-drizzle-postgres/files/db/src/scripts/seed.ts +50 -0
  52. package/blueprints/features/db-drizzle-postgres/files/db/tsconfig.json +13 -0
  53. package/blueprints/features/tailwind-v4/BLUEPRINT.md +29 -0
  54. package/blueprints/features/ui-shared-components/BLUEPRINT.md +35 -0
  55. package/blueprints/foundation/monorepo-turbo/BLUEPRINT.md +378 -0
  56. package/blueprints/foundation/monorepo-turbo/files/apps/web/app/globals.css +2 -0
  57. package/blueprints/foundation/monorepo-turbo/files/apps/web/app/layout.tsx +23 -0
  58. package/blueprints/foundation/monorepo-turbo/files/apps/web/app/page.tsx +7 -0
  59. package/blueprints/foundation/monorepo-turbo/files/apps/web/env.ts +13 -0
  60. package/blueprints/foundation/monorepo-turbo/files/apps/web/next.config.ts +12 -0
  61. package/blueprints/foundation/monorepo-turbo/files/apps/web/package.json +28 -0
  62. package/blueprints/foundation/monorepo-turbo/files/apps/web/postcss.config.mjs +5 -0
  63. package/blueprints/foundation/monorepo-turbo/files/apps/web/tsconfig.json +18 -0
  64. package/blueprints/foundation/monorepo-turbo/files/config/tailwind-config/package.json +14 -0
  65. package/blueprints/foundation/monorepo-turbo/files/config/tailwind-config/postcss.config.mjs +5 -0
  66. package/blueprints/foundation/monorepo-turbo/files/config/tailwind-config/shared-styles.css +88 -0
  67. package/blueprints/foundation/monorepo-turbo/files/config/typescript-config/base.json +19 -0
  68. package/blueprints/foundation/monorepo-turbo/files/config/typescript-config/nextjs.json +12 -0
  69. package/blueprints/foundation/monorepo-turbo/files/config/typescript-config/package.json +5 -0
  70. package/blueprints/foundation/monorepo-turbo/files/config/typescript-config/react-library.json +7 -0
  71. package/blueprints/foundation/monorepo-turbo/files/root/biome.json +46 -0
  72. package/blueprints/foundation/monorepo-turbo/files/root/gitignore +35 -0
  73. package/blueprints/foundation/monorepo-turbo/files/root/package.json +25 -0
  74. package/blueprints/foundation/monorepo-turbo/files/root/pnpm-workspace.yaml +5 -0
  75. package/blueprints/foundation/monorepo-turbo/files/root/turbo.json +30 -0
  76. package/dist/index.js +453 -0
  77. package/package.json +53 -0
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "{{SCOPE}}/web",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "private": true,
6
+ "scripts": {
7
+ "dev": "next dev --port 3000",
8
+ "build": "next build",
9
+ "start": "next start"
10
+ },
11
+ "dependencies": {
12
+ "@t3-oss/env-nextjs": "^0.13",
13
+ "next": "^15",
14
+ "react": "^19",
15
+ "react-dom": "^19",
16
+ "zod": "^3"
17
+ },
18
+ "devDependencies": {
19
+ "{{SCOPE}}/tailwind-config": "workspace:*",
20
+ "{{SCOPE}}/typescript-config": "workspace:*",
21
+ "@tailwindcss/postcss": "^4",
22
+ "@types/node": "^22",
23
+ "@types/react": "^19",
24
+ "@types/react-dom": "^19",
25
+ "tailwindcss": "^4",
26
+ "typescript": "^5.9"
27
+ }
28
+ }
@@ -0,0 +1,5 @@
1
+ const config = {
2
+ plugins: ["@tailwindcss/postcss"],
3
+ };
4
+
5
+ export default config;
@@ -0,0 +1,18 @@
1
+ {
2
+ "extends": "{{SCOPE}}/typescript-config/nextjs.json",
3
+ "compilerOptions": {
4
+ "plugins": [
5
+ {
6
+ "name": "next"
7
+ }
8
+ ]
9
+ },
10
+ "include": [
11
+ "**/*.ts",
12
+ "**/*.tsx",
13
+ "next-env.d.ts",
14
+ "next.config.ts",
15
+ ".next/types/**/*.ts"
16
+ ],
17
+ "exclude": ["node_modules"]
18
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "{{SCOPE}}/tailwind-config",
3
+ "version": "0.0.0",
4
+ "type": "module",
5
+ "private": true,
6
+ "exports": {
7
+ ".": "./shared-styles.css",
8
+ "./postcss": "./postcss.config.mjs"
9
+ },
10
+ "devDependencies": {
11
+ "@tailwindcss/postcss": "^4",
12
+ "tailwindcss": "^4"
13
+ }
14
+ }
@@ -0,0 +1,5 @@
1
+ export const postcssConfig = {
2
+ plugins: {
3
+ "@tailwindcss/postcss": {},
4
+ },
5
+ };
@@ -0,0 +1,88 @@
1
+ @import "tailwindcss";
2
+
3
+ @custom-variant dark (&:is(.dark *));
4
+
5
+ /* ==========================================================================
6
+ Theme tokens — OKLCH color space
7
+ These are set up for shadcn/ui compatibility. The UI feature blueprint
8
+ will add additional imports (tw-animate-css, shadcn/tailwind.css, etc.)
9
+ ========================================================================== */
10
+
11
+ @theme inline {
12
+ --color-background: var(--background);
13
+ --color-foreground: var(--foreground);
14
+ --font-sans: var(--font-sans);
15
+ --color-ring: var(--ring);
16
+ --color-input: var(--input);
17
+ --color-border: var(--border);
18
+ --color-destructive: var(--destructive);
19
+ --color-accent-foreground: var(--accent-foreground);
20
+ --color-accent: var(--accent);
21
+ --color-muted-foreground: var(--muted-foreground);
22
+ --color-muted: var(--muted);
23
+ --color-secondary-foreground: var(--secondary-foreground);
24
+ --color-secondary: var(--secondary);
25
+ --color-primary-foreground: var(--primary-foreground);
26
+ --color-primary: var(--primary);
27
+ --color-popover-foreground: var(--popover-foreground);
28
+ --color-popover: var(--popover);
29
+ --color-card-foreground: var(--card-foreground);
30
+ --color-card: var(--card);
31
+ --radius-sm: calc(var(--radius) - 4px);
32
+ --radius-md: calc(var(--radius) - 2px);
33
+ --radius-lg: var(--radius);
34
+ --radius-xl: calc(var(--radius) + 4px);
35
+ --radius-2xl: calc(var(--radius) + 8px);
36
+ }
37
+
38
+ :root {
39
+ --background: oklch(1 0 0);
40
+ --foreground: oklch(0.145 0 0);
41
+ --card: oklch(1 0 0);
42
+ --card-foreground: oklch(0.145 0 0);
43
+ --popover: oklch(1 0 0);
44
+ --popover-foreground: oklch(0.145 0 0);
45
+ --primary: oklch(0.488 0.243 264.376);
46
+ --primary-foreground: oklch(0.97 0.014 254.604);
47
+ --secondary: oklch(0.967 0.001 286.375);
48
+ --secondary-foreground: oklch(0.21 0.006 285.885);
49
+ --muted: oklch(0.97 0 0);
50
+ --muted-foreground: oklch(0.556 0 0);
51
+ --accent: oklch(0.97 0 0);
52
+ --accent-foreground: oklch(0.205 0 0);
53
+ --destructive: oklch(0.58 0.22 27);
54
+ --border: oklch(0.922 0 0);
55
+ --input: oklch(0.922 0 0);
56
+ --ring: oklch(0.708 0 0);
57
+ --radius: 0.625rem;
58
+ }
59
+
60
+ .dark {
61
+ --background: oklch(0.145 0 0);
62
+ --foreground: oklch(0.985 0 0);
63
+ --card: oklch(0.205 0 0);
64
+ --card-foreground: oklch(0.985 0 0);
65
+ --popover: oklch(0.205 0 0);
66
+ --popover-foreground: oklch(0.985 0 0);
67
+ --primary: oklch(0.42 0.18 266);
68
+ --primary-foreground: oklch(0.97 0.014 254.604);
69
+ --secondary: oklch(0.274 0.006 286.033);
70
+ --secondary-foreground: oklch(0.985 0 0);
71
+ --muted: oklch(0.269 0 0);
72
+ --muted-foreground: oklch(0.708 0 0);
73
+ --accent: oklch(0.371 0 0);
74
+ --accent-foreground: oklch(0.985 0 0);
75
+ --destructive: oklch(0.704 0.191 22.216);
76
+ --border: oklch(1 0 0 / 10%);
77
+ --input: oklch(1 0 0 / 15%);
78
+ --ring: oklch(0.556 0 0);
79
+ }
80
+
81
+ @layer base {
82
+ * {
83
+ @apply border-border outline-ring/50;
84
+ }
85
+ body {
86
+ @apply bg-background text-foreground;
87
+ }
88
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "declarationMap": true,
6
+ "esModuleInterop": true,
7
+ "incremental": false,
8
+ "isolatedModules": true,
9
+ "lib": ["es2022", "DOM", "DOM.Iterable"],
10
+ "module": "NodeNext",
11
+ "moduleDetection": "force",
12
+ "moduleResolution": "NodeNext",
13
+ "noUncheckedIndexedAccess": true,
14
+ "resolveJsonModule": true,
15
+ "skipLibCheck": true,
16
+ "strict": true,
17
+ "target": "ES2022"
18
+ }
19
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "plugins": [{ "name": "next" }],
6
+ "module": "ESNext",
7
+ "moduleResolution": "Bundler",
8
+ "allowJs": true,
9
+ "jsx": "preserve",
10
+ "noEmit": true
11
+ }
12
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "{{SCOPE}}/typescript-config",
3
+ "version": "0.0.0",
4
+ "private": true
5
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "jsx": "react-jsx"
6
+ }
7
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.1.1/schema.json",
3
+ "files": {
4
+ "ignoreUnknown": true
5
+ },
6
+ "vcs": {
7
+ "enabled": true,
8
+ "clientKind": "git",
9
+ "useIgnoreFile": true
10
+ },
11
+ "formatter": {
12
+ "enabled": true,
13
+ "formatWithErrors": false,
14
+ "indentStyle": "space",
15
+ "indentWidth": 2,
16
+ "lineEnding": "lf",
17
+ "lineWidth": 80,
18
+ "attributePosition": "auto"
19
+ },
20
+ "linter": {
21
+ "enabled": true,
22
+ "rules": {
23
+ "recommended": true,
24
+ "a11y": {
25
+ "noSvgWithoutTitle": "warn",
26
+ "noLabelWithoutControl": "off"
27
+ },
28
+ "suspicious": {
29
+ "noArrayIndexKey": "off"
30
+ }
31
+ }
32
+ },
33
+ "javascript": {
34
+ "formatter": {
35
+ "quoteStyle": "double"
36
+ }
37
+ },
38
+ "assist": {
39
+ "enabled": true,
40
+ "actions": {
41
+ "source": {
42
+ "organizeImports": "on"
43
+ }
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,35 @@
1
+ # Dependencies
2
+ node_modules
3
+ .pnp
4
+ .pnp.js
5
+
6
+ # Local env files
7
+ .env
8
+ .env.local
9
+ .env.development.local
10
+ .env.test.local
11
+ .env.production.local
12
+
13
+ # Testing
14
+ coverage
15
+
16
+ # Turbo
17
+ .turbo
18
+
19
+ # Vercel
20
+ .vercel
21
+
22
+ # Build Outputs
23
+ .next/
24
+ out/
25
+ build
26
+ dist
27
+
28
+ # Debug
29
+ npm-debug.log*
30
+ yarn-debug.log*
31
+ yarn-error.log*
32
+
33
+ # Misc
34
+ .DS_Store
35
+ *.pem
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "{{SCOPE}}",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "turbo run dev",
7
+ "build": "turbo run build",
8
+ "clean:cache": "rm -rf ./node_modules/.cache/turbo",
9
+ "format:check": "biome format .",
10
+ "format:fix": "biome format --write .",
11
+ "lint:check": "biome lint .",
12
+ "lint:fix": "biome lint --write ."
13
+ },
14
+ "devDependencies": {
15
+ "@biomejs/biome": "^2",
16
+ "@types/node": "^22",
17
+ "tsx": "^4",
18
+ "turbo": "^2",
19
+ "typescript": "^5.9"
20
+ },
21
+ "packageManager": "pnpm@9.12.2",
22
+ "engines": {
23
+ "node": ">=22"
24
+ }
25
+ }
@@ -0,0 +1,5 @@
1
+ packages:
2
+ - "apps/*"
3
+ - "apis/*"
4
+ - "packages/*"
5
+ - "config/*"
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://turbo.build/schema.json",
3
+ "ui": "tui",
4
+ "globalEnv": ["CI"],
5
+ "globalDependencies": ["**/.env.*local"],
6
+ "tasks": {
7
+ "build": {
8
+ "dependsOn": ["^build"],
9
+ "inputs": ["$TURBO_DEFAULT$", ".env", ".env.*"],
10
+ "outputs": [".next/**", "!.next/cache/**", "dist/**"]
11
+ },
12
+ "dev": {
13
+ "cache": false,
14
+ "persistent": true
15
+ },
16
+ "start": {
17
+ "dependsOn": ["build"],
18
+ "cache": false,
19
+ "persistent": true
20
+ },
21
+ "//#format": {},
22
+ "//#format:fix": {
23
+ "cache": false
24
+ },
25
+ "//#lint": {},
26
+ "//#lint:fix": {
27
+ "cache": false
28
+ }
29
+ }
30
+ }