@stackweld/templates 0.2.0 → 0.3.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 (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +57 -0
  3. package/package.json +17 -11
  4. package/.turbo/turbo-build.log +0 -4
  5. package/.turbo/turbo-lint.log +0 -694
  6. package/.turbo/turbo-test.log +0 -15
  7. package/.turbo/turbo-typecheck.log +0 -4
  8. package/dist/__tests__/templates.test.d.ts.map +0 -1
  9. package/dist/__tests__/templates.test.js.map +0 -1
  10. package/dist/index.d.ts.map +0 -1
  11. package/dist/index.js.map +0 -1
  12. package/dist/templates/astro-landing.d.ts.map +0 -1
  13. package/dist/templates/astro-landing.js.map +0 -1
  14. package/dist/templates/django-react.d.ts.map +0 -1
  15. package/dist/templates/django-react.js.map +0 -1
  16. package/dist/templates/django-rest-api.d.ts.map +0 -1
  17. package/dist/templates/django-rest-api.js.map +0 -1
  18. package/dist/templates/express-api.d.ts.map +0 -1
  19. package/dist/templates/express-api.js.map +0 -1
  20. package/dist/templates/fastapi-react.d.ts.map +0 -1
  21. package/dist/templates/fastapi-react.js.map +0 -1
  22. package/dist/templates/go-microservice.d.ts.map +0 -1
  23. package/dist/templates/go-microservice.js.map +0 -1
  24. package/dist/templates/hono-microservice.d.ts.map +0 -1
  25. package/dist/templates/hono-microservice.js.map +0 -1
  26. package/dist/templates/htmx-django.d.ts.map +0 -1
  27. package/dist/templates/htmx-django.js.map +0 -1
  28. package/dist/templates/laravel-app.d.ts.map +0 -1
  29. package/dist/templates/laravel-app.js.map +0 -1
  30. package/dist/templates/mern-stack.d.ts.map +0 -1
  31. package/dist/templates/mern-stack.js.map +0 -1
  32. package/dist/templates/monorepo-starter.d.ts.map +0 -1
  33. package/dist/templates/monorepo-starter.js.map +0 -1
  34. package/dist/templates/nestjs-api.d.ts.map +0 -1
  35. package/dist/templates/nestjs-api.js.map +0 -1
  36. package/dist/templates/nuxt3-app.d.ts.map +0 -1
  37. package/dist/templates/nuxt3-app.js.map +0 -1
  38. package/dist/templates/python-ai-lab.d.ts.map +0 -1
  39. package/dist/templates/python-ai-lab.js.map +0 -1
  40. package/dist/templates/remix-fullstack.d.ts.map +0 -1
  41. package/dist/templates/remix-fullstack.js.map +0 -1
  42. package/dist/templates/saas-starter.d.ts.map +0 -1
  43. package/dist/templates/saas-starter.js.map +0 -1
  44. package/dist/templates/solidstart-app.d.ts.map +0 -1
  45. package/dist/templates/solidstart-app.js.map +0 -1
  46. package/dist/templates/sveltekit-fullstack.d.ts.map +0 -1
  47. package/dist/templates/sveltekit-fullstack.js.map +0 -1
  48. package/dist/templates/t3-stack.d.ts.map +0 -1
  49. package/dist/templates/t3-stack.js.map +0 -1
  50. package/dist/templates/tauri-desktop.d.ts.map +0 -1
  51. package/dist/templates/tauri-desktop.js.map +0 -1
  52. package/src/__tests__/templates.test.ts +0 -98
  53. package/src/index.ts +0 -97
  54. package/src/templates/astro-landing.ts +0 -40
  55. package/src/templates/django-react.ts +0 -127
  56. package/src/templates/django-rest-api.ts +0 -99
  57. package/src/templates/express-api.ts +0 -147
  58. package/src/templates/fastapi-react.ts +0 -122
  59. package/src/templates/go-microservice.ts +0 -133
  60. package/src/templates/hono-microservice.ts +0 -81
  61. package/src/templates/htmx-django.ts +0 -100
  62. package/src/templates/laravel-app.ts +0 -96
  63. package/src/templates/mern-stack.ts +0 -126
  64. package/src/templates/monorepo-starter.ts +0 -138
  65. package/src/templates/nestjs-api.ts +0 -112
  66. package/src/templates/nuxt3-app.ts +0 -78
  67. package/src/templates/python-ai-lab.ts +0 -155
  68. package/src/templates/remix-fullstack.ts +0 -80
  69. package/src/templates/saas-starter.ts +0 -131
  70. package/src/templates/solidstart-app.ts +0 -73
  71. package/src/templates/sveltekit-fullstack.ts +0 -90
  72. package/src/templates/t3-stack.ts +0 -94
  73. package/src/templates/tauri-desktop.ts +0 -57
  74. package/tsconfig.json +0 -10
  75. package/tsconfig.tsbuildinfo +0 -1
@@ -1,96 +0,0 @@
1
- import type { Template } from "@stackweld/core";
2
-
3
- export const laravelApp: Template = {
4
- id: "laravel-app",
5
- name: "Laravel App",
6
- description: "Full-stack Laravel application with MySQL, Redis, and Docker",
7
- technologyIds: ["laravel", "php", "mysql", "redis", "docker"],
8
- profile: "standard",
9
- scaffoldSteps: [
10
- {
11
- name: "Create Laravel project",
12
- command: "composer create-project laravel/laravel {{projectName}}",
13
- },
14
- ],
15
- overrides: [
16
- {
17
- path: ".env.example",
18
- content: [
19
- "APP_NAME={{projectName}}",
20
- "APP_ENV=local",
21
- "APP_KEY=",
22
- "APP_DEBUG=true",
23
- "APP_URL=http://localhost:8000",
24
- "",
25
- "DB_CONNECTION=mysql",
26
- "DB_HOST=127.0.0.1",
27
- "DB_PORT=3306",
28
- "DB_DATABASE={{projectName}}",
29
- "DB_USERNAME=root",
30
- "DB_PASSWORD=secret",
31
- "",
32
- "REDIS_HOST=127.0.0.1",
33
- "REDIS_PASSWORD=null",
34
- "REDIS_PORT=6379",
35
- "",
36
- "CACHE_STORE=redis",
37
- "SESSION_DRIVER=redis",
38
- "QUEUE_CONNECTION=redis",
39
- ].join("\n"),
40
- },
41
- {
42
- path: "docker-compose.yml",
43
- content: [
44
- "services:",
45
- " mysql:",
46
- " image: mysql:8.4",
47
- " restart: unless-stopped",
48
- " ports:",
49
- ' - "3306:3306"',
50
- " environment:",
51
- " MYSQL_ROOT_PASSWORD: secret",
52
- " MYSQL_DATABASE: {{projectName}}",
53
- " volumes:",
54
- " - mysqldata:/var/lib/mysql",
55
- " healthcheck:",
56
- ' test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]',
57
- " interval: 10s",
58
- " timeout: 5s",
59
- " retries: 5",
60
- "",
61
- " redis:",
62
- " image: redis:7-alpine",
63
- " restart: unless-stopped",
64
- " ports:",
65
- ' - "6379:6379"',
66
- " healthcheck:",
67
- ' test: ["CMD", "redis-cli", "ping"]',
68
- " interval: 5s",
69
- " timeout: 5s",
70
- " retries: 5",
71
- "",
72
- "volumes:",
73
- " mysqldata:",
74
- ].join("\n"),
75
- },
76
- ],
77
- hooks: [
78
- {
79
- timing: "post-scaffold",
80
- name: "Generate app key",
81
- command: "cd {{projectName}} && php artisan key:generate",
82
- description: "Generate Laravel application encryption key",
83
- requiresConfirmation: false,
84
- },
85
- {
86
- timing: "post-scaffold",
87
- name: "Run migrations",
88
- command: "cd {{projectName}} && php artisan migrate",
89
- description: "Run database migrations (requires running MySQL)",
90
- requiresConfirmation: true,
91
- },
92
- ],
93
- variables: {
94
- projectName: "my-laravel-app",
95
- },
96
- };
@@ -1,126 +0,0 @@
1
- import type { Template } from "@stackweld/core";
2
-
3
- export const mernStack: Template = {
4
- id: "mern-stack",
5
- name: "MERN Stack",
6
- description:
7
- "Full-stack MERN app with React, Express, MongoDB, Node.js, TypeScript, and Tailwind CSS",
8
- technologyIds: ["react", "nodejs", "express", "mongodb", "typescript", "tailwindcss"],
9
- profile: "standard",
10
- scaffoldSteps: [
11
- {
12
- name: "Create React frontend",
13
- command: "npx create-vite@latest {{projectName}}/frontend -- --template react-ts",
14
- },
15
- {
16
- name: "Install Tailwind in frontend",
17
- command: "cd {{projectName}}/frontend && npm install -D tailwindcss @tailwindcss/vite",
18
- },
19
- {
20
- name: "Create backend directory",
21
- command: "mkdir -p {{projectName}}/backend/src",
22
- },
23
- {
24
- name: "Initialize backend",
25
- command: "cd {{projectName}}/backend && npm init -y",
26
- },
27
- {
28
- name: "Install backend dependencies",
29
- command: "cd {{projectName}}/backend && npm install express cors helmet dotenv mongoose",
30
- },
31
- {
32
- name: "Install backend dev dependencies",
33
- command:
34
- "cd {{projectName}}/backend && npm install -D typescript @types/node @types/express @types/cors tsx",
35
- },
36
- {
37
- name: "Initialize TypeScript",
38
- command:
39
- "cd {{projectName}}/backend && npx tsc --init --outDir dist --rootDir src --strict --esModuleInterop --resolveJsonModule",
40
- },
41
- ],
42
- overrides: [
43
- {
44
- path: ".env.example",
45
- content: [
46
- "# Backend",
47
- "PORT=3001",
48
- "NODE_ENV=development",
49
- "MONGODB_URI=mongodb://localhost:27017/{{projectName}}",
50
- "CORS_ORIGIN=http://localhost:5173",
51
- "",
52
- "# Frontend",
53
- "VITE_API_URL=http://localhost:3001",
54
- ].join("\n"),
55
- },
56
- {
57
- path: "docker-compose.yml",
58
- content: [
59
- "services:",
60
- " mongo:",
61
- " image: mongo:7",
62
- " restart: unless-stopped",
63
- " ports:",
64
- ' - "27017:27017"',
65
- " volumes:",
66
- " - mongodata:/data/db",
67
- " healthcheck:",
68
- ' test: ["CMD", "mongosh", "--eval", "db.adminCommand(\'ping\')"]',
69
- " interval: 10s",
70
- " timeout: 5s",
71
- " retries: 5",
72
- "",
73
- "volumes:",
74
- " mongodata:",
75
- ].join("\n"),
76
- },
77
- {
78
- path: "backend/src/index.ts",
79
- content: [
80
- 'import express from "express";',
81
- 'import cors from "cors";',
82
- 'import helmet from "helmet";',
83
- 'import dotenv from "dotenv";',
84
- 'import mongoose from "mongoose";',
85
- "",
86
- "dotenv.config();",
87
- "",
88
- "const app = express();",
89
- "const port = process.env.PORT || 3001;",
90
- "",
91
- "app.use(helmet());",
92
- "app.use(cors({ origin: process.env.CORS_ORIGIN }));",
93
- "app.use(express.json());",
94
- "",
95
- 'app.get("/health", (_req, res) => {',
96
- ' res.json({ status: "ok" });',
97
- "});",
98
- "",
99
- "mongoose",
100
- ' .connect(process.env.MONGODB_URI || "mongodb://localhost:27017/app")',
101
- " .then(() => {",
102
- ' console.log("Connected to MongoDB");',
103
- " app.listen(port, () => {",
104
- " console.log(`Server running on port ${port}`);",
105
- " });",
106
- " })",
107
- " .catch((err) => {",
108
- ' console.error("MongoDB connection error:", err);',
109
- " process.exit(1);",
110
- " });",
111
- ].join("\n"),
112
- },
113
- ],
114
- hooks: [
115
- {
116
- timing: "post-scaffold",
117
- name: "Install frontend dependencies",
118
- command: "cd {{projectName}}/frontend && npm install",
119
- description: "Install npm dependencies for the React frontend",
120
- requiresConfirmation: false,
121
- },
122
- ],
123
- variables: {
124
- projectName: "my-mern-app",
125
- },
126
- };
@@ -1,138 +0,0 @@
1
- import type { Template } from "@stackweld/core";
2
-
3
- export const monorepoStarter: Template = {
4
- id: "monorepo-starter",
5
- name: "Monorepo Starter",
6
- description:
7
- "Turborepo monorepo with Next.js frontend, Express API, shared packages, Prisma, PostgreSQL, Biome, and Vitest",
8
- technologyIds: [
9
- "nextjs",
10
- "react",
11
- "express",
12
- "nodejs",
13
- "typescript",
14
- "tailwindcss",
15
- "prisma",
16
- "postgresql",
17
- "turborepo",
18
- "pnpm",
19
- "biome",
20
- "vitest",
21
- ],
22
- profile: "enterprise",
23
- scaffoldSteps: [
24
- {
25
- name: "Create Turborepo project",
26
- command: "npx create-turbo@latest {{projectName}} --package-manager pnpm",
27
- },
28
- {
29
- name: "Create API package directory",
30
- command: "mkdir -p {{projectName}}/apps/api/src",
31
- },
32
- {
33
- name: "Create shared packages directory",
34
- command: "mkdir -p {{projectName}}/packages/{db,shared}",
35
- },
36
- {
37
- name: "Install Prisma in db package",
38
- command: "cd {{projectName}}/packages/db && pnpm init && pnpm add prisma @prisma/client",
39
- },
40
- {
41
- name: "Initialize Prisma",
42
- command: "cd {{projectName}}/packages/db && npx prisma init --datasource-provider postgresql",
43
- },
44
- {
45
- name: "Install Biome",
46
- command: "cd {{projectName}} && pnpm add -Dw @biomejs/biome",
47
- },
48
- {
49
- name: "Install Vitest",
50
- command: "cd {{projectName}} && pnpm add -Dw vitest",
51
- },
52
- ],
53
- overrides: [
54
- {
55
- path: ".env.example",
56
- content: [
57
- "# Database",
58
- "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{{projectName}}",
59
- "",
60
- "# API",
61
- "API_PORT=3001",
62
- "NODE_ENV=development",
63
- "",
64
- "# Frontend",
65
- "NEXT_PUBLIC_API_URL=http://localhost:3001",
66
- ].join("\n"),
67
- },
68
- {
69
- path: "docker-compose.yml",
70
- content: [
71
- "services:",
72
- " db:",
73
- " image: postgres:17",
74
- " restart: unless-stopped",
75
- " ports:",
76
- ' - "5432:5432"',
77
- " environment:",
78
- " POSTGRES_USER: postgres",
79
- " POSTGRES_PASSWORD: postgres",
80
- " POSTGRES_DB: {{projectName}}",
81
- " volumes:",
82
- " - pgdata:/var/lib/postgresql/data",
83
- " healthcheck:",
84
- ' test: ["CMD-SHELL", "pg_isready -U postgres"]',
85
- " interval: 5s",
86
- " timeout: 5s",
87
- " retries: 5",
88
- "",
89
- "volumes:",
90
- " pgdata:",
91
- ].join("\n"),
92
- },
93
- {
94
- path: "biome.json",
95
- content: [
96
- "{",
97
- ' "$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",',
98
- ' "formatter": {',
99
- ' "indentStyle": "space",',
100
- ' "indentWidth": 2,',
101
- ' "lineWidth": 100',
102
- " },",
103
- ' "linter": {',
104
- ' "rules": {',
105
- ' "recommended": true',
106
- " }",
107
- " }",
108
- "}",
109
- ].join("\n"),
110
- },
111
- ],
112
- hooks: [
113
- {
114
- timing: "post-scaffold",
115
- name: "Install all dependencies",
116
- command: "cd {{projectName}} && pnpm install",
117
- description: "Install all workspace dependencies",
118
- requiresConfirmation: false,
119
- },
120
- {
121
- timing: "post-scaffold",
122
- name: "Generate Prisma client",
123
- command: "cd {{projectName}}/packages/db && npx prisma generate",
124
- description: "Generate the Prisma client from schema",
125
- requiresConfirmation: false,
126
- },
127
- {
128
- timing: "post-scaffold",
129
- name: "Build packages",
130
- command: "cd {{projectName}} && pnpm build",
131
- description: "Build all packages in the monorepo",
132
- requiresConfirmation: true,
133
- },
134
- ],
135
- variables: {
136
- projectName: "my-monorepo",
137
- },
138
- };
@@ -1,112 +0,0 @@
1
- import type { Template } from "@stackweld/core";
2
-
3
- export const nestjsApi: Template = {
4
- id: "nestjs-api",
5
- name: "NestJS API",
6
- description: "Production-ready NestJS REST API with Prisma, PostgreSQL, Redis, and Docker",
7
- technologyIds: ["nestjs", "nodejs", "typescript", "prisma", "postgresql", "redis", "docker"],
8
- profile: "production",
9
- scaffoldSteps: [
10
- {
11
- name: "Create NestJS project",
12
- command: "npx @nestjs/cli new {{projectName}} --package-manager npm --strict",
13
- },
14
- {
15
- name: "Install Prisma",
16
- command: "cd {{projectName}} && npm install prisma @prisma/client",
17
- },
18
- {
19
- name: "Initialize Prisma",
20
- command: "cd {{projectName}} && npx prisma init --datasource-provider postgresql",
21
- },
22
- {
23
- name: "Install Redis and config",
24
- command: "cd {{projectName}} && npm install @nestjs/config ioredis @nestjs-modules/ioredis",
25
- },
26
- {
27
- name: "Install validation",
28
- command: "cd {{projectName}} && npm install class-validator class-transformer",
29
- },
30
- ],
31
- overrides: [
32
- {
33
- path: ".env.example",
34
- content: [
35
- "PORT=3000",
36
- "NODE_ENV=development",
37
- "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{{projectName}}",
38
- "REDIS_URL=redis://localhost:6379",
39
- ].join("\n"),
40
- },
41
- {
42
- path: "docker-compose.yml",
43
- content: [
44
- "services:",
45
- " db:",
46
- " image: postgres:17",
47
- " restart: unless-stopped",
48
- " ports:",
49
- ' - "5432:5432"',
50
- " environment:",
51
- " POSTGRES_USER: postgres",
52
- " POSTGRES_PASSWORD: postgres",
53
- " POSTGRES_DB: {{projectName}}",
54
- " volumes:",
55
- " - pgdata:/var/lib/postgresql/data",
56
- " healthcheck:",
57
- ' test: ["CMD-SHELL", "pg_isready -U postgres"]',
58
- " interval: 5s",
59
- " timeout: 5s",
60
- " retries: 5",
61
- "",
62
- " redis:",
63
- " image: redis:7-alpine",
64
- " restart: unless-stopped",
65
- " ports:",
66
- ' - "6379:6379"',
67
- " healthcheck:",
68
- ' test: ["CMD", "redis-cli", "ping"]',
69
- " interval: 5s",
70
- " timeout: 5s",
71
- " retries: 5",
72
- "",
73
- "volumes:",
74
- " pgdata:",
75
- ].join("\n"),
76
- },
77
- {
78
- path: "Dockerfile",
79
- content: [
80
- "FROM node:22-alpine AS builder",
81
- "WORKDIR /app",
82
- "COPY package*.json ./",
83
- "RUN npm ci",
84
- "COPY . .",
85
- "RUN npx prisma generate",
86
- "RUN npm run build",
87
- "",
88
- "FROM node:22-alpine",
89
- "WORKDIR /app",
90
- "COPY package*.json ./",
91
- "RUN npm ci --omit=dev",
92
- "COPY --from=builder /app/dist ./dist",
93
- "COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma",
94
- "COPY prisma ./prisma",
95
- "EXPOSE 3000",
96
- 'CMD ["node", "dist/main.js"]',
97
- ].join("\n"),
98
- },
99
- ],
100
- hooks: [
101
- {
102
- timing: "post-scaffold",
103
- name: "Generate Prisma client",
104
- command: "cd {{projectName}} && npx prisma generate",
105
- description: "Generate the Prisma client from schema",
106
- requiresConfirmation: false,
107
- },
108
- ],
109
- variables: {
110
- projectName: "my-nestjs-api",
111
- },
112
- };
@@ -1,78 +0,0 @@
1
- import type { Template } from "@stackweld/core";
2
-
3
- export const nuxt3App: Template = {
4
- id: "nuxt3-app",
5
- name: "Nuxt 3 App",
6
- description: "Full-stack Nuxt 3 application with Vue, Tailwind CSS, and PostgreSQL",
7
- technologyIds: ["nuxt", "vue", "nodejs", "typescript", "tailwindcss", "postgresql"],
8
- profile: "standard",
9
- scaffoldSteps: [
10
- {
11
- name: "Create Nuxt 3 project",
12
- command: "npx nuxi@latest init {{projectName}}",
13
- },
14
- {
15
- name: "Install Tailwind CSS module",
16
- command: "npm install -D @nuxtjs/tailwindcss",
17
- workingDir: "{{projectName}}",
18
- },
19
- {
20
- name: "Install database dependencies",
21
- command: "npm install postgres drizzle-orm && npm install -D drizzle-kit",
22
- workingDir: "{{projectName}}",
23
- },
24
- ],
25
- overrides: [
26
- {
27
- path: ".env.example",
28
- content: [
29
- "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{{projectName}}",
30
- "NUXT_PUBLIC_APP_NAME={{projectName}}",
31
- ].join("\n"),
32
- },
33
- {
34
- path: "docker-compose.yml",
35
- content: [
36
- "services:",
37
- " db:",
38
- " image: postgres:17",
39
- " restart: unless-stopped",
40
- " ports:",
41
- ' - "5432:5432"',
42
- " environment:",
43
- " POSTGRES_USER: postgres",
44
- " POSTGRES_PASSWORD: postgres",
45
- " POSTGRES_DB: {{projectName}}",
46
- " volumes:",
47
- " - pgdata:/var/lib/postgresql/data",
48
- " healthcheck:",
49
- ' test: ["CMD-SHELL", "pg_isready -U postgres"]',
50
- " interval: 5s",
51
- " timeout: 5s",
52
- " retries: 5",
53
- "",
54
- "volumes:",
55
- " pgdata:",
56
- ].join("\n"),
57
- },
58
- ],
59
- hooks: [
60
- {
61
- timing: "post-scaffold",
62
- name: "Install dependencies",
63
- command: "cd {{projectName}} && npm install",
64
- description: "Install all npm dependencies",
65
- requiresConfirmation: false,
66
- },
67
- {
68
- timing: "post-scaffold",
69
- name: "Prepare Nuxt",
70
- command: "cd {{projectName}} && npx nuxi prepare",
71
- description: "Generate Nuxt types and .nuxt directory",
72
- requiresConfirmation: false,
73
- },
74
- ],
75
- variables: {
76
- projectName: "my-nuxt3-app",
77
- },
78
- };