@stackweld/templates 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 (117) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/.turbo/turbo-lint.log +694 -0
  3. package/.turbo/turbo-test.log +15 -0
  4. package/.turbo/turbo-typecheck.log +4 -0
  5. package/dist/__tests__/templates.test.d.ts +2 -0
  6. package/dist/__tests__/templates.test.d.ts.map +1 -0
  7. package/dist/__tests__/templates.test.js +81 -0
  8. package/dist/__tests__/templates.test.js.map +1 -0
  9. package/dist/index.d.ts +36 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +68 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/templates/astro-landing.d.ts +3 -0
  14. package/dist/templates/astro-landing.d.ts.map +1 -0
  15. package/dist/templates/astro-landing.js +36 -0
  16. package/dist/templates/astro-landing.js.map +1 -0
  17. package/dist/templates/django-react.d.ts +3 -0
  18. package/dist/templates/django-react.d.ts.map +1 -0
  19. package/dist/templates/django-react.js +123 -0
  20. package/dist/templates/django-react.js.map +1 -0
  21. package/dist/templates/django-rest-api.d.ts +3 -0
  22. package/dist/templates/django-rest-api.d.ts.map +1 -0
  23. package/dist/templates/django-rest-api.js +95 -0
  24. package/dist/templates/django-rest-api.js.map +1 -0
  25. package/dist/templates/express-api.d.ts +3 -0
  26. package/dist/templates/express-api.d.ts.map +1 -0
  27. package/dist/templates/express-api.js +142 -0
  28. package/dist/templates/express-api.js.map +1 -0
  29. package/dist/templates/fastapi-react.d.ts +3 -0
  30. package/dist/templates/fastapi-react.d.ts.map +1 -0
  31. package/dist/templates/fastapi-react.js +120 -0
  32. package/dist/templates/fastapi-react.js.map +1 -0
  33. package/dist/templates/go-microservice.d.ts +3 -0
  34. package/dist/templates/go-microservice.d.ts.map +1 -0
  35. package/dist/templates/go-microservice.js +131 -0
  36. package/dist/templates/go-microservice.js.map +1 -0
  37. package/dist/templates/hono-microservice.d.ts +3 -0
  38. package/dist/templates/hono-microservice.d.ts.map +1 -0
  39. package/dist/templates/hono-microservice.js +80 -0
  40. package/dist/templates/hono-microservice.js.map +1 -0
  41. package/dist/templates/htmx-django.d.ts +3 -0
  42. package/dist/templates/htmx-django.d.ts.map +1 -0
  43. package/dist/templates/htmx-django.js +96 -0
  44. package/dist/templates/htmx-django.js.map +1 -0
  45. package/dist/templates/laravel-app.d.ts +3 -0
  46. package/dist/templates/laravel-app.d.ts.map +1 -0
  47. package/dist/templates/laravel-app.js +95 -0
  48. package/dist/templates/laravel-app.js.map +1 -0
  49. package/dist/templates/mern-stack.d.ts +3 -0
  50. package/dist/templates/mern-stack.d.ts.map +1 -0
  51. package/dist/templates/mern-stack.js +122 -0
  52. package/dist/templates/mern-stack.js.map +1 -0
  53. package/dist/templates/monorepo-starter.d.ts +3 -0
  54. package/dist/templates/monorepo-starter.d.ts.map +1 -0
  55. package/dist/templates/monorepo-starter.js +136 -0
  56. package/dist/templates/monorepo-starter.js.map +1 -0
  57. package/dist/templates/nestjs-api.d.ts +3 -0
  58. package/dist/templates/nestjs-api.d.ts.map +1 -0
  59. package/dist/templates/nestjs-api.js +111 -0
  60. package/dist/templates/nestjs-api.js.map +1 -0
  61. package/dist/templates/nuxt3-app.d.ts +3 -0
  62. package/dist/templates/nuxt3-app.d.ts.map +1 -0
  63. package/dist/templates/nuxt3-app.js +77 -0
  64. package/dist/templates/nuxt3-app.js.map +1 -0
  65. package/dist/templates/python-ai-lab.d.ts +3 -0
  66. package/dist/templates/python-ai-lab.d.ts.map +1 -0
  67. package/dist/templates/python-ai-lab.js +152 -0
  68. package/dist/templates/python-ai-lab.js.map +1 -0
  69. package/dist/templates/remix-fullstack.d.ts +3 -0
  70. package/dist/templates/remix-fullstack.d.ts.map +1 -0
  71. package/dist/templates/remix-fullstack.js +79 -0
  72. package/dist/templates/remix-fullstack.js.map +1 -0
  73. package/dist/templates/saas-starter.d.ts +3 -0
  74. package/dist/templates/saas-starter.d.ts.map +1 -0
  75. package/dist/templates/saas-starter.js +128 -0
  76. package/dist/templates/saas-starter.js.map +1 -0
  77. package/dist/templates/solidstart-app.d.ts +3 -0
  78. package/dist/templates/solidstart-app.d.ts.map +1 -0
  79. package/dist/templates/solidstart-app.js +72 -0
  80. package/dist/templates/solidstart-app.js.map +1 -0
  81. package/dist/templates/sveltekit-fullstack.d.ts +3 -0
  82. package/dist/templates/sveltekit-fullstack.d.ts.map +1 -0
  83. package/dist/templates/sveltekit-fullstack.js +89 -0
  84. package/dist/templates/sveltekit-fullstack.js.map +1 -0
  85. package/dist/templates/t3-stack.d.ts +3 -0
  86. package/dist/templates/t3-stack.d.ts.map +1 -0
  87. package/dist/templates/t3-stack.js +92 -0
  88. package/dist/templates/t3-stack.js.map +1 -0
  89. package/dist/templates/tauri-desktop.d.ts +3 -0
  90. package/dist/templates/tauri-desktop.d.ts.map +1 -0
  91. package/dist/templates/tauri-desktop.js +55 -0
  92. package/dist/templates/tauri-desktop.js.map +1 -0
  93. package/package.json +33 -0
  94. package/src/__tests__/templates.test.ts +98 -0
  95. package/src/index.ts +97 -0
  96. package/src/templates/astro-landing.ts +40 -0
  97. package/src/templates/django-react.ts +127 -0
  98. package/src/templates/django-rest-api.ts +99 -0
  99. package/src/templates/express-api.ts +147 -0
  100. package/src/templates/fastapi-react.ts +122 -0
  101. package/src/templates/go-microservice.ts +133 -0
  102. package/src/templates/hono-microservice.ts +81 -0
  103. package/src/templates/htmx-django.ts +100 -0
  104. package/src/templates/laravel-app.ts +96 -0
  105. package/src/templates/mern-stack.ts +126 -0
  106. package/src/templates/monorepo-starter.ts +138 -0
  107. package/src/templates/nestjs-api.ts +112 -0
  108. package/src/templates/nuxt3-app.ts +78 -0
  109. package/src/templates/python-ai-lab.ts +155 -0
  110. package/src/templates/remix-fullstack.ts +80 -0
  111. package/src/templates/saas-starter.ts +131 -0
  112. package/src/templates/solidstart-app.ts +73 -0
  113. package/src/templates/sveltekit-fullstack.ts +90 -0
  114. package/src/templates/t3-stack.ts +94 -0
  115. package/src/templates/tauri-desktop.ts +57 -0
  116. package/tsconfig.json +10 -0
  117. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,131 @@
1
+ import type { Template } from "@stackweld/core";
2
+
3
+ export const saasStarter: Template = {
4
+ id: "saas-starter",
5
+ name: "SaaS Starter",
6
+ description:
7
+ "Production-ready SaaS boilerplate with Next.js, Prisma, PostgreSQL, Redis, NextAuth, shadcn/ui, and Stripe-ready architecture",
8
+ technologyIds: [
9
+ "nextjs",
10
+ "react",
11
+ "nodejs",
12
+ "typescript",
13
+ "tailwindcss",
14
+ "shadcn-ui",
15
+ "prisma",
16
+ "postgresql",
17
+ "redis",
18
+ "nextauth",
19
+ ],
20
+ profile: "production",
21
+ scaffoldSteps: [
22
+ {
23
+ name: "Create Next.js app",
24
+ command:
25
+ "npx create-next-app@latest {{projectName}} --typescript --tailwind --eslint --app --src-dir --import-alias '@/*'",
26
+ },
27
+ {
28
+ name: "Install Prisma",
29
+ command: "cd {{projectName}} && npm install prisma @prisma/client",
30
+ },
31
+ {
32
+ name: "Initialize Prisma",
33
+ command: "cd {{projectName}} && npx prisma init --datasource-provider postgresql",
34
+ },
35
+ {
36
+ name: "Install NextAuth",
37
+ command: "cd {{projectName}} && npm install next-auth@beta",
38
+ },
39
+ {
40
+ name: "Install Redis client",
41
+ command: "cd {{projectName}} && npm install ioredis",
42
+ },
43
+ {
44
+ name: "Initialize shadcn/ui",
45
+ command: "cd {{projectName}} && npx shadcn@latest init -d",
46
+ },
47
+ {
48
+ name: "Install Stripe",
49
+ command: "cd {{projectName}} && npm install stripe @stripe/stripe-js",
50
+ },
51
+ ],
52
+ overrides: [
53
+ {
54
+ path: ".env.example",
55
+ content: [
56
+ "# Database",
57
+ "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{{projectName}}",
58
+ "",
59
+ "# Redis",
60
+ "REDIS_URL=redis://localhost:6379",
61
+ "",
62
+ "# Auth",
63
+ "NEXTAUTH_SECRET=your-secret-key-change-me",
64
+ "NEXTAUTH_URL=http://localhost:3000",
65
+ "",
66
+ "# Stripe",
67
+ "STRIPE_SECRET_KEY=sk_test_...",
68
+ "STRIPE_PUBLISHABLE_KEY=pk_test_...",
69
+ "STRIPE_WEBHOOK_SECRET=whsec_...",
70
+ "",
71
+ "# App",
72
+ "NEXT_PUBLIC_APP_URL=http://localhost:3000",
73
+ ].join("\n"),
74
+ },
75
+ {
76
+ path: "docker-compose.yml",
77
+ content: [
78
+ "services:",
79
+ " db:",
80
+ " image: postgres:17",
81
+ " restart: unless-stopped",
82
+ " ports:",
83
+ ' - "5432:5432"',
84
+ " environment:",
85
+ " POSTGRES_USER: postgres",
86
+ " POSTGRES_PASSWORD: postgres",
87
+ " POSTGRES_DB: {{projectName}}",
88
+ " volumes:",
89
+ " - pgdata:/var/lib/postgresql/data",
90
+ " healthcheck:",
91
+ ' test: ["CMD-SHELL", "pg_isready -U postgres"]',
92
+ " interval: 5s",
93
+ " timeout: 5s",
94
+ " retries: 5",
95
+ "",
96
+ " redis:",
97
+ " image: redis:7-alpine",
98
+ " restart: unless-stopped",
99
+ " ports:",
100
+ ' - "6379:6379"',
101
+ " healthcheck:",
102
+ ' test: ["CMD", "redis-cli", "ping"]',
103
+ " interval: 5s",
104
+ " timeout: 5s",
105
+ " retries: 5",
106
+ "",
107
+ "volumes:",
108
+ " pgdata:",
109
+ ].join("\n"),
110
+ },
111
+ ],
112
+ hooks: [
113
+ {
114
+ timing: "post-scaffold",
115
+ name: "Generate Prisma client",
116
+ command: "cd {{projectName}} && npx prisma generate",
117
+ description: "Generate the Prisma client from schema",
118
+ requiresConfirmation: false,
119
+ },
120
+ {
121
+ timing: "post-scaffold",
122
+ name: "Install dependencies",
123
+ command: "cd {{projectName}} && npm install",
124
+ description: "Install all npm dependencies",
125
+ requiresConfirmation: false,
126
+ },
127
+ ],
128
+ variables: {
129
+ projectName: "my-saas-app",
130
+ },
131
+ };
@@ -0,0 +1,73 @@
1
+ import type { Template } from "@stackweld/core";
2
+
3
+ export const solidstartApp: Template = {
4
+ id: "solidstart-app",
5
+ name: "SolidStart App",
6
+ description: "Full-stack SolidStart application with TypeScript, Tailwind CSS, and PostgreSQL",
7
+ technologyIds: ["solidjs", "nodejs", "typescript", "tailwindcss", "postgresql"],
8
+ profile: "standard",
9
+ scaffoldSteps: [
10
+ {
11
+ name: "Create SolidStart project",
12
+ command: "mkdir -p {{projectName}} && cd {{projectName}} && npm init solid@latest . -- --yes",
13
+ },
14
+ {
15
+ name: "Install Tailwind",
16
+ command: "cd {{projectName}} && npm install -D tailwindcss @tailwindcss/vite",
17
+ },
18
+ {
19
+ name: "Install PostgreSQL client",
20
+ command: "cd {{projectName}} && npm install postgres",
21
+ },
22
+ {
23
+ name: "Install dotenv",
24
+ command: "cd {{projectName}} && npm install dotenv",
25
+ },
26
+ ],
27
+ overrides: [
28
+ {
29
+ path: ".env.example",
30
+ content: [
31
+ "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{{projectName}}",
32
+ "SESSION_SECRET=your-secret-key-change-me",
33
+ ].join("\n"),
34
+ },
35
+ {
36
+ path: "docker-compose.yml",
37
+ content: [
38
+ "services:",
39
+ " db:",
40
+ " image: postgres:17",
41
+ " restart: unless-stopped",
42
+ " ports:",
43
+ ' - "5432:5432"',
44
+ " environment:",
45
+ " POSTGRES_USER: postgres",
46
+ " POSTGRES_PASSWORD: postgres",
47
+ " POSTGRES_DB: {{projectName}}",
48
+ " volumes:",
49
+ " - pgdata:/var/lib/postgresql/data",
50
+ " healthcheck:",
51
+ ' test: ["CMD-SHELL", "pg_isready -U postgres"]',
52
+ " interval: 5s",
53
+ " timeout: 5s",
54
+ " retries: 5",
55
+ "",
56
+ "volumes:",
57
+ " pgdata:",
58
+ ].join("\n"),
59
+ },
60
+ ],
61
+ hooks: [
62
+ {
63
+ timing: "post-scaffold",
64
+ name: "Install dependencies",
65
+ command: "cd {{projectName}} && npm install",
66
+ description: "Install all npm dependencies",
67
+ requiresConfirmation: false,
68
+ },
69
+ ],
70
+ variables: {
71
+ projectName: "my-solidstart-app",
72
+ },
73
+ };
@@ -0,0 +1,90 @@
1
+ import type { Template } from "@stackweld/core";
2
+
3
+ export const sveltekitFullstack: Template = {
4
+ id: "sveltekit-fullstack",
5
+ name: "SvelteKit Full-Stack",
6
+ description: "Full-stack SvelteKit app with Prisma ORM, PostgreSQL, and Tailwind CSS",
7
+ technologyIds: [
8
+ "sveltekit",
9
+ "svelte",
10
+ "nodejs",
11
+ "typescript",
12
+ "tailwindcss",
13
+ "prisma",
14
+ "postgresql",
15
+ ],
16
+ profile: "standard",
17
+ scaffoldSteps: [
18
+ {
19
+ name: "Create SvelteKit project",
20
+ command: "npx sv create {{projectName}} --template minimal --types ts",
21
+ },
22
+ {
23
+ name: "Install Tailwind CSS",
24
+ command: "cd {{projectName}} && npx sv add tailwindcss",
25
+ },
26
+ {
27
+ name: "Install Prisma",
28
+ command: "npm install prisma @prisma/client",
29
+ workingDir: "{{projectName}}",
30
+ },
31
+ {
32
+ name: "Initialize Prisma",
33
+ command: "npx prisma init --datasource-provider postgresql",
34
+ workingDir: "{{projectName}}",
35
+ },
36
+ ],
37
+ overrides: [
38
+ {
39
+ path: ".env.example",
40
+ content: [
41
+ "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{{projectName}}",
42
+ "PUBLIC_APP_NAME={{projectName}}",
43
+ ].join("\n"),
44
+ },
45
+ {
46
+ path: "docker-compose.yml",
47
+ content: [
48
+ "services:",
49
+ " db:",
50
+ " image: postgres:17",
51
+ " restart: unless-stopped",
52
+ " ports:",
53
+ ' - "5432:5432"',
54
+ " environment:",
55
+ " POSTGRES_USER: postgres",
56
+ " POSTGRES_PASSWORD: postgres",
57
+ " POSTGRES_DB: {{projectName}}",
58
+ " volumes:",
59
+ " - pgdata:/var/lib/postgresql/data",
60
+ " healthcheck:",
61
+ ' test: ["CMD-SHELL", "pg_isready -U postgres"]',
62
+ " interval: 5s",
63
+ " timeout: 5s",
64
+ " retries: 5",
65
+ "",
66
+ "volumes:",
67
+ " pgdata:",
68
+ ].join("\n"),
69
+ },
70
+ ],
71
+ hooks: [
72
+ {
73
+ timing: "post-scaffold",
74
+ name: "Install dependencies",
75
+ command: "cd {{projectName}} && npm install",
76
+ description: "Install all npm dependencies",
77
+ requiresConfirmation: false,
78
+ },
79
+ {
80
+ timing: "post-scaffold",
81
+ name: "Generate Prisma client",
82
+ command: "cd {{projectName}} && npx prisma generate",
83
+ description: "Generate the Prisma client from schema",
84
+ requiresConfirmation: false,
85
+ },
86
+ ],
87
+ variables: {
88
+ projectName: "my-sveltekit-app",
89
+ },
90
+ };
@@ -0,0 +1,94 @@
1
+ import type { Template } from "@stackweld/core";
2
+
3
+ export const t3Stack: Template = {
4
+ id: "t3-stack",
5
+ name: "T3 Stack",
6
+ description: "Full-stack TypeScript app with Next.js, tRPC, Prisma, Tailwind CSS, and NextAuth",
7
+ technologyIds: [
8
+ "nextjs",
9
+ "react",
10
+ "nodejs",
11
+ "typescript",
12
+ "tailwindcss",
13
+ "prisma",
14
+ "postgresql",
15
+ "nextauth",
16
+ ],
17
+ profile: "standard",
18
+ scaffoldSteps: [
19
+ {
20
+ name: "Create Next.js app",
21
+ command:
22
+ "npx create-next-app@latest {{projectName}} --typescript --tailwind --eslint --app --src-dir --import-alias '@/*'",
23
+ },
24
+ {
25
+ name: "Install Prisma",
26
+ command: "npm install prisma @prisma/client",
27
+ workingDir: "{{projectName}}",
28
+ },
29
+ {
30
+ name: "Initialize Prisma",
31
+ command: "npx prisma init --datasource-provider postgresql",
32
+ workingDir: "{{projectName}}",
33
+ },
34
+ {
35
+ name: "Install NextAuth",
36
+ command: "npm install next-auth@beta",
37
+ workingDir: "{{projectName}}",
38
+ },
39
+ ],
40
+ overrides: [
41
+ {
42
+ path: ".env.example",
43
+ content: [
44
+ "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{{projectName}}",
45
+ "NEXTAUTH_SECRET=your-secret-key-change-me",
46
+ "NEXTAUTH_URL=http://localhost:3000",
47
+ ].join("\n"),
48
+ },
49
+ {
50
+ path: "docker-compose.yml",
51
+ content: [
52
+ "services:",
53
+ " db:",
54
+ " image: postgres:17",
55
+ " restart: unless-stopped",
56
+ " ports:",
57
+ ' - "5432:5432"',
58
+ " environment:",
59
+ " POSTGRES_USER: postgres",
60
+ " POSTGRES_PASSWORD: postgres",
61
+ " POSTGRES_DB: {{projectName}}",
62
+ " volumes:",
63
+ " - pgdata:/var/lib/postgresql/data",
64
+ " healthcheck:",
65
+ ' test: ["CMD-SHELL", "pg_isready -U postgres"]',
66
+ " interval: 5s",
67
+ " timeout: 5s",
68
+ " retries: 5",
69
+ "",
70
+ "volumes:",
71
+ " pgdata:",
72
+ ].join("\n"),
73
+ },
74
+ ],
75
+ hooks: [
76
+ {
77
+ timing: "post-scaffold",
78
+ name: "Install dependencies",
79
+ command: "cd {{projectName}} && npm install",
80
+ description: "Install all npm dependencies",
81
+ requiresConfirmation: false,
82
+ },
83
+ {
84
+ timing: "post-scaffold",
85
+ name: "Generate Prisma client",
86
+ command: "cd {{projectName}} && npx prisma generate",
87
+ description: "Generate the Prisma client from schema",
88
+ requiresConfirmation: false,
89
+ },
90
+ ],
91
+ variables: {
92
+ projectName: "my-t3-app",
93
+ },
94
+ };
@@ -0,0 +1,57 @@
1
+ import type { Template } from "@stackweld/core";
2
+
3
+ export const tauriDesktop: Template = {
4
+ id: "tauri-desktop",
5
+ name: "Tauri Desktop",
6
+ description: "Cross-platform desktop app with Tauri, React, TypeScript, Tailwind CSS, and SQLite",
7
+ technologyIds: ["react", "nodejs", "typescript", "tailwindcss", "sqlite"],
8
+ profile: "standard",
9
+ scaffoldSteps: [
10
+ {
11
+ name: "Create Vite + React project",
12
+ command: "npx create-vite@latest {{projectName}} -- --template react-ts",
13
+ },
14
+ {
15
+ name: "Install Tailwind",
16
+ command: "cd {{projectName}} && npm install -D tailwindcss @tailwindcss/vite",
17
+ },
18
+ {
19
+ name: "Install Tauri CLI",
20
+ command: "cd {{projectName}} && npm install -D @tauri-apps/cli",
21
+ },
22
+ {
23
+ name: "Install Tauri API",
24
+ command: "cd {{projectName}} && npm install @tauri-apps/api",
25
+ },
26
+ {
27
+ name: "Initialize Tauri",
28
+ command:
29
+ "cd {{projectName}} && npx tauri init --app-name {{projectName}} --window-title {{projectName}} --dist-dir ../dist --dev-path http://localhost:5173 --ci",
30
+ },
31
+ ],
32
+ overrides: [
33
+ {
34
+ path: ".env.example",
35
+ content: ["VITE_APP_NAME={{projectName}}", "VITE_APP_VERSION=0.1.0"].join("\n"),
36
+ },
37
+ ],
38
+ hooks: [
39
+ {
40
+ timing: "post-scaffold",
41
+ name: "Install dependencies",
42
+ command: "cd {{projectName}} && npm install",
43
+ description: "Install all npm dependencies",
44
+ requiresConfirmation: false,
45
+ },
46
+ {
47
+ timing: "post-scaffold",
48
+ name: "Verify Rust toolchain",
49
+ command: "rustup show",
50
+ description: "Verify Rust is installed (required by Tauri)",
51
+ requiresConfirmation: true,
52
+ },
53
+ ],
54
+ variables: {
55
+ projectName: "my-tauri-app",
56
+ },
57
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "rootDir": "src",
6
+ "composite": true
7
+ },
8
+ "include": ["src"],
9
+ "references": [{ "path": "../core" }, { "path": "../registry" }]
10
+ }