@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,15 @@
1
+
2
+ > @stackweld/templates@0.2.0 test /home/orlando/Desktop/XPlus-Finance/PROYECTOS_NUEVOS/Stackweld/stackweld/packages/templates
3
+ > vitest run --passWithNoTests
4
+
5
+
6
+  RUN  v4.1.2 /home/orlando/Desktop/XPlus-Finance/PROYECTOS_NUEVOS/Stackweld/stackweld/packages/templates
7
+
8
+ ✓ src/__tests__/templates.test.ts (9 tests) 108ms
9
+ ✓ dist/__tests__/templates.test.js (9 tests) 118ms
10
+
11
+  Test Files  2 passed (2)
12
+  Tests  18 passed (18)
13
+  Start at  09:04:49
14
+  Duration  896ms (transform 551ms, setup 0ms, import 1.03s, tests 225ms, environment 0ms)
15
+
@@ -0,0 +1,4 @@
1
+
2
+ > @stackpilot/templates@0.1.0 typecheck /home/orlando/Desktop/XPlus-Finance/PROYECTOS_NUEVOS/StackPilot/stackpilot/packages/templates
3
+ > tsc --noEmit
4
+
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=templates.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/templates.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,81 @@
1
+ import { loadAllTechnologies } from "@stackweld/registry";
2
+ import { describe, expect, it } from "vitest";
3
+ import { findTemplatesByTechnologies, getAllTemplates, getTemplate, listTemplateIds, } from "../index.js";
4
+ describe("Templates Registry", () => {
5
+ it("has 5 built-in templates", () => {
6
+ const templates = getAllTemplates();
7
+ expect(templates.length).toBe(20);
8
+ });
9
+ it("each template has required fields", () => {
10
+ const templates = getAllTemplates();
11
+ for (const t of templates) {
12
+ expect(t.id).toBeTruthy();
13
+ expect(t.name).toBeTruthy();
14
+ expect(t.description).toBeTruthy();
15
+ expect(t.technologyIds.length).toBeGreaterThan(0);
16
+ expect(t.profile).toBeTruthy();
17
+ expect(Array.isArray(t.scaffoldSteps)).toBe(true);
18
+ expect(Array.isArray(t.overrides)).toBe(true);
19
+ expect(Array.isArray(t.hooks)).toBe(true);
20
+ expect(t.variables).toBeDefined();
21
+ }
22
+ });
23
+ it("gets template by ID", () => {
24
+ const t = getTemplate("t3-stack");
25
+ expect(t).not.toBeNull();
26
+ expect(t?.name).toBe("T3 Stack");
27
+ });
28
+ it("returns null for unknown template", () => {
29
+ expect(getTemplate("nonexistent")).toBeNull();
30
+ });
31
+ it("lists template IDs", () => {
32
+ const ids = listTemplateIds();
33
+ expect(ids).toContain("t3-stack");
34
+ expect(ids).toContain("django-rest-api");
35
+ expect(ids).toContain("fastapi-react");
36
+ expect(ids).toContain("go-microservice");
37
+ expect(ids).toContain("astro-landing");
38
+ expect(ids).toContain("sveltekit-fullstack");
39
+ expect(ids).toContain("nuxt3-app");
40
+ expect(ids).toContain("express-api");
41
+ expect(ids).toContain("hono-microservice");
42
+ expect(ids).toContain("django-react");
43
+ });
44
+ it("finds templates by technology", () => {
45
+ const results = findTemplatesByTechnologies(["nextjs"]);
46
+ expect(results.length).toBeGreaterThan(0);
47
+ expect(results.some((t) => t.id === "t3-stack")).toBe(true);
48
+ });
49
+ it("all template technologyIds exist in registry", () => {
50
+ const templates = getAllTemplates();
51
+ const techs = loadAllTechnologies();
52
+ const techIds = new Set(techs.map((t) => t.id));
53
+ for (const template of templates) {
54
+ for (const tid of template.technologyIds) {
55
+ expect(techIds.has(tid), `Template "${template.id}" references unknown technology "${tid}"`).toBe(true);
56
+ }
57
+ }
58
+ });
59
+ it("scaffold steps have name and command", () => {
60
+ const templates = getAllTemplates();
61
+ for (const t of templates) {
62
+ for (const step of t.scaffoldSteps) {
63
+ expect(step.name).toBeTruthy();
64
+ expect(step.command).toBeTruthy();
65
+ }
66
+ }
67
+ });
68
+ it("hooks have required fields", () => {
69
+ const templates = getAllTemplates();
70
+ for (const t of templates) {
71
+ for (const hook of t.hooks) {
72
+ expect(hook.timing).toBeTruthy();
73
+ expect(hook.name).toBeTruthy();
74
+ expect(hook.command).toBeTruthy();
75
+ expect(hook.description).toBeTruthy();
76
+ expect(typeof hook.requiresConfirmation).toBe("boolean");
77
+ }
78
+ }
79
+ });
80
+ });
81
+ //# sourceMappingURL=templates.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.test.js","sourceRoot":"","sources":["../../src/__tests__/templates.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,2BAA2B,EAC3B,eAAe,EACf,WAAW,EACX,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,SAAS,GAAG,eAAe,EAAE,CAAC;QACpC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,SAAS,GAAG,eAAe,EAAE,CAAC;QACpC,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE,CAAC;YAC1B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;YAC1B,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;YAC5B,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,UAAU,EAAE,CAAC;YACnC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;YAClD,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU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AC,EAAE,oCAAoC,GAAG,GAAG,CACnE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACf,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC9C,MAAM,SAAS,GAAG,eAAe,EAAE,CAAC;QACpC,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE,CAAC;YAC1B,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;gBACnC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;gBAC/B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;YACpC,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,SAAS,GAAG,eAAe,EAAE,CAAC;QACpC,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE,CAAC;YAC1B,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;gBAC3B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,CAAC;gBACjC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;gBAC/B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;gBAClC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,UAAU,EAAE,CAAC;gBACtC,MAAM,CAAC,OAAO,IAAI,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @stackweld/templates — Built-in template registry.
3
+ * Each template is a preconfigured stack recipe with scaffold steps,
4
+ * file overrides, and lifecycle hooks.
5
+ */
6
+ import type { Template } from "@stackweld/core";
7
+ import { astroLanding } from "./templates/astro-landing.js";
8
+ import { djangoReact } from "./templates/django-react.js";
9
+ import { djangoRestApi } from "./templates/django-rest-api.js";
10
+ import { expressApi } from "./templates/express-api.js";
11
+ import { fastapiReact } from "./templates/fastapi-react.js";
12
+ import { goMicroservice } from "./templates/go-microservice.js";
13
+ import { honoMicroservice } from "./templates/hono-microservice.js";
14
+ import { htmxDjango } from "./templates/htmx-django.js";
15
+ import { laravelApp } from "./templates/laravel-app.js";
16
+ import { mernStack } from "./templates/mern-stack.js";
17
+ import { monorepoStarter } from "./templates/monorepo-starter.js";
18
+ import { nestjsApi } from "./templates/nestjs-api.js";
19
+ import { nuxt3App } from "./templates/nuxt3-app.js";
20
+ import { pythonAiLab } from "./templates/python-ai-lab.js";
21
+ import { remixFullstack } from "./templates/remix-fullstack.js";
22
+ import { saasStarter } from "./templates/saas-starter.js";
23
+ import { solidstartApp } from "./templates/solidstart-app.js";
24
+ import { sveltekitFullstack } from "./templates/sveltekit-fullstack.js";
25
+ import { t3Stack } from "./templates/t3-stack.js";
26
+ import { tauriDesktop } from "./templates/tauri-desktop.js";
27
+ /** Get all available templates. */
28
+ export declare function getAllTemplates(): Template[];
29
+ /** Get a template by ID. */
30
+ export declare function getTemplate(id: string): Template | null;
31
+ /** List all template IDs. */
32
+ export declare function listTemplateIds(): string[];
33
+ /** Find templates that match a given set of technology IDs. */
34
+ export declare function findTemplatesByTechnologies(technologyIds: string[]): Template[];
35
+ export { astroLanding, djangoReact, djangoRestApi, expressApi, fastapiReact, goMicroservice, honoMicroservice, htmxDjango, laravelApp, mernStack, monorepoStarter, nestjsApi, nuxt3App, pythonAiLab, remixFullstack, saasStarter, solidstartApp, sveltekitFullstack, t3Stack, tauriDesktop, };
36
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA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AG,IAAI,CAEvD;AAED,6BAA6B;AAC7B,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAE1C;AAED,+DAA+D;AAC/D,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAG/E;AAGD,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,SAAS,EACT,QAAQ,EACR,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,YAAY,GACb,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,68 @@
1
+ /**
2
+ * @stackweld/templates — Built-in template registry.
3
+ * Each template is a preconfigured stack recipe with scaffold steps,
4
+ * file overrides, and lifecycle hooks.
5
+ */
6
+ import { astroLanding } from "./templates/astro-landing.js";
7
+ import { djangoReact } from "./templates/django-react.js";
8
+ import { djangoRestApi } from "./templates/django-rest-api.js";
9
+ import { expressApi } from "./templates/express-api.js";
10
+ import { fastapiReact } from "./templates/fastapi-react.js";
11
+ import { goMicroservice } from "./templates/go-microservice.js";
12
+ import { honoMicroservice } from "./templates/hono-microservice.js";
13
+ import { htmxDjango } from "./templates/htmx-django.js";
14
+ import { laravelApp } from "./templates/laravel-app.js";
15
+ import { mernStack } from "./templates/mern-stack.js";
16
+ import { monorepoStarter } from "./templates/monorepo-starter.js";
17
+ import { nestjsApi } from "./templates/nestjs-api.js";
18
+ import { nuxt3App } from "./templates/nuxt3-app.js";
19
+ import { pythonAiLab } from "./templates/python-ai-lab.js";
20
+ import { remixFullstack } from "./templates/remix-fullstack.js";
21
+ import { saasStarter } from "./templates/saas-starter.js";
22
+ import { solidstartApp } from "./templates/solidstart-app.js";
23
+ import { sveltekitFullstack } from "./templates/sveltekit-fullstack.js";
24
+ import { t3Stack } from "./templates/t3-stack.js";
25
+ import { tauriDesktop } from "./templates/tauri-desktop.js";
26
+ const templates = [
27
+ t3Stack,
28
+ djangoRestApi,
29
+ fastapiReact,
30
+ goMicroservice,
31
+ astroLanding,
32
+ sveltekitFullstack,
33
+ nuxt3App,
34
+ expressApi,
35
+ honoMicroservice,
36
+ djangoReact,
37
+ mernStack,
38
+ saasStarter,
39
+ nestjsApi,
40
+ remixFullstack,
41
+ solidstartApp,
42
+ laravelApp,
43
+ pythonAiLab,
44
+ tauriDesktop,
45
+ monorepoStarter,
46
+ htmxDjango,
47
+ ];
48
+ const templateMap = new Map(templates.map((t) => [t.id, t]));
49
+ /** Get all available templates. */
50
+ export function getAllTemplates() {
51
+ return [...templates];
52
+ }
53
+ /** Get a template by ID. */
54
+ export function getTemplate(id) {
55
+ return templateMap.get(id) ?? null;
56
+ }
57
+ /** List all template IDs. */
58
+ export function listTemplateIds() {
59
+ return templates.map((t) => t.id);
60
+ }
61
+ /** Find templates that match a given set of technology IDs. */
62
+ export function findTemplatesByTechnologies(technologyIds) {
63
+ const idSet = new Set(technologyIds);
64
+ return templates.filter((t) => t.technologyIds.some((tid) => idSet.has(tid)));
65
+ }
66
+ // Re-export individual templates
67
+ export { astroLanding, djangoReact, djangoRestApi, expressApi, fastapiReact, goMicroservice, honoMicroservice, htmxDjango, laravelApp, mernStack, monorepoStarter, nestjsApi, nuxt3App, pythonAiLab, remixFullstack, saasStarter, solidstartApp, sveltekitFullstack, t3Stack, tauriDesktop, };
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,E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E7D,mCAAmC;AACnC,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,CAAC;AAED,4BAA4B;AAC5B,MAAM,UAAU,WAAW,CAAC,EAAU;IACpC,OAAO,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;AACrC,CAAC;AAED,6BAA6B;AAC7B,MAAM,UAAU,eAAe;IAC7B,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACpC,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,2BAA2B,CAAC,aAAuB;IACjE,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC;IACrC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC;AAED,iCAAiC;AACjC,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,SAAS,EACT,QAAQ,EACR,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,YAAY,GACb,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Template } from "@stackweld/core";
2
+ export declare const astroLanding: Template;
3
+ //# sourceMappingURL=astro-landing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro-landing.d.ts","sourceRoot":"","sources":["../../src/templates/astro-landing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE,QAqC1B,CAAC"}
@@ -0,0 +1,36 @@
1
+ export const astroLanding = {
2
+ id: "astro-landing",
3
+ name: "Astro Landing Page",
4
+ description: "Fast static landing page with Astro, Tailwind CSS, and TypeScript",
5
+ technologyIds: ["astro", "nodejs", "typescript", "tailwindcss"],
6
+ profile: "lightweight",
7
+ scaffoldSteps: [
8
+ {
9
+ name: "Create Astro project",
10
+ command: "npm create astro@latest {{projectName}} -- --template minimal --install --no-git --typescript strict",
11
+ },
12
+ {
13
+ name: "Add Tailwind integration",
14
+ command: "cd {{projectName}} && npx astro add tailwind -y",
15
+ },
16
+ ],
17
+ overrides: [
18
+ {
19
+ path: ".env.example",
20
+ content: ["PUBLIC_SITE_URL=http://localhost:4321", "PUBLIC_SITE_TITLE={{projectName}}"].join("\n"),
21
+ },
22
+ ],
23
+ hooks: [
24
+ {
25
+ timing: "post-scaffold",
26
+ name: "Install dependencies",
27
+ command: "cd {{projectName}} && npm install",
28
+ description: "Install npm dependencies",
29
+ requiresConfirmation: false,
30
+ },
31
+ ],
32
+ variables: {
33
+ projectName: "my-landing",
34
+ },
35
+ };
36
+ //# sourceMappingURL=astro-landing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astro-landing.js","sourceRoot":"","sources":["../../src/templates/astro-landing.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAa;IACpC,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,mEAAmE;IAChF,aAAa,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,CAAC;IAC/D,OAAO,EAAE,aAAa;IACtB,aAAa,EAAE;QACb;YACE,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EACL,sGAAsG;SACzG;QACD;YACE,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,iDAAiD;SAC3D;KACF;IACD,SAAS,EAAE;QACT;YACE,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,CAAC,uCAAuC,EAAE,mCAAmC,CAAC,CAAC,IAAI,CAC1F,IAAI,CACL;SACF;KACF;IACD,KAAK,EAAE;QACL;YACE,MAAM,EAAE,eAAe;YACvB,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,mCAAmC;YAC5C,WAAW,EAAE,0BAA0B;YACvC,oBAAoB,EAAE,KAAK;SAC5B;KACF;IACD,SAAS,EAAE;QACT,WAAW,EAAE,YAAY;KAC1B;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Template } from "@stackweld/core";
2
+ export declare const djangoReact: Template;
3
+ //# sourceMappingURL=django-react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"django-react.d.ts","sourceRoot":"","sources":["../../src/templates/django-react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,WAAW,EAAE,QA4HzB,CAAC"}
@@ -0,0 +1,123 @@
1
+ export const djangoReact = {
2
+ id: "django-react",
3
+ name: "Django + React",
4
+ description: "Full-stack app with Django backend, React frontend, PostgreSQL, Redis, Tailwind CSS, and Docker",
5
+ technologyIds: [
6
+ "django",
7
+ "python",
8
+ "react",
9
+ "nodejs",
10
+ "typescript",
11
+ "postgresql",
12
+ "redis",
13
+ "tailwindcss",
14
+ ],
15
+ profile: "production",
16
+ scaffoldSteps: [
17
+ {
18
+ name: "Create project directory",
19
+ command: "mkdir -p {{projectName}}/{backend,frontend}",
20
+ },
21
+ {
22
+ name: "Setup Python backend",
23
+ command: "python3 -m venv {{projectName}}/backend/.venv && {{projectName}}/backend/.venv/bin/pip install django djangorestframework psycopg2-binary django-redis django-cors-headers python-dotenv gunicorn",
24
+ },
25
+ {
26
+ name: "Create Django project",
27
+ command: "{{projectName}}/backend/.venv/bin/django-admin startproject config {{projectName}}/backend",
28
+ },
29
+ {
30
+ name: "Create React frontend",
31
+ command: "npx create-vite@latest {{projectName}}/frontend -- --template react-ts",
32
+ },
33
+ {
34
+ name: "Install Tailwind in frontend",
35
+ command: "cd {{projectName}}/frontend && npm install -D tailwindcss @tailwindcss/vite",
36
+ },
37
+ ],
38
+ overrides: [
39
+ {
40
+ path: ".env.example",
41
+ content: [
42
+ "# Backend",
43
+ "DEBUG=True",
44
+ "SECRET_KEY=change-me-in-production",
45
+ "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{{projectName}}",
46
+ "REDIS_URL=redis://localhost:6379/0",
47
+ "ALLOWED_HOSTS=localhost,127.0.0.1",
48
+ "CORS_ALLOWED_ORIGINS=http://localhost:5173",
49
+ "",
50
+ "# Frontend",
51
+ "VITE_API_URL=http://localhost:8000",
52
+ ].join("\n"),
53
+ },
54
+ {
55
+ path: "docker-compose.yml",
56
+ content: [
57
+ "services:",
58
+ " db:",
59
+ " image: postgres:17",
60
+ " restart: unless-stopped",
61
+ " ports:",
62
+ ' - "5432:5432"',
63
+ " environment:",
64
+ " POSTGRES_USER: postgres",
65
+ " POSTGRES_PASSWORD: postgres",
66
+ " POSTGRES_DB: {{projectName}}",
67
+ " volumes:",
68
+ " - pgdata:/var/lib/postgresql/data",
69
+ " healthcheck:",
70
+ ' test: ["CMD-SHELL", "pg_isready -U postgres"]',
71
+ " interval: 5s",
72
+ " timeout: 5s",
73
+ " retries: 5",
74
+ "",
75
+ " redis:",
76
+ " image: redis:7-alpine",
77
+ " restart: unless-stopped",
78
+ " ports:",
79
+ ' - "6379:6379"',
80
+ " healthcheck:",
81
+ ' test: ["CMD", "redis-cli", "ping"]',
82
+ " interval: 5s",
83
+ " timeout: 5s",
84
+ " retries: 5",
85
+ "",
86
+ "volumes:",
87
+ " pgdata:",
88
+ ].join("\n"),
89
+ },
90
+ {
91
+ path: "backend/requirements.txt",
92
+ content: [
93
+ "django>=5.1",
94
+ "djangorestframework>=3.15",
95
+ "psycopg2-binary>=2.9",
96
+ "django-redis>=5.4",
97
+ "django-cors-headers>=4.4",
98
+ "python-dotenv>=1.0",
99
+ "gunicorn>=22.0",
100
+ ].join("\n"),
101
+ },
102
+ ],
103
+ hooks: [
104
+ {
105
+ timing: "post-scaffold",
106
+ name: "Install frontend dependencies",
107
+ command: "cd {{projectName}}/frontend && npm install",
108
+ description: "Install npm dependencies for the React frontend",
109
+ requiresConfirmation: false,
110
+ },
111
+ {
112
+ timing: "post-scaffold",
113
+ name: "Freeze backend requirements",
114
+ command: "cd {{projectName}}/backend && .venv/bin/pip freeze > requirements.lock",
115
+ description: "Generate locked requirements file for the backend",
116
+ requiresConfirmation: false,
117
+ },
118
+ ],
119
+ variables: {
120
+ projectName: "my-django-react-app",
121
+ },
122
+ };
123
+ //# sourceMappingURL=django-react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"django-react.js","sourceRoot":"","sources":["../../src/templates/django-react.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAa;IACnC,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,iGAAiG;IACnG,aAAa,EAAE;QACb,QAAQ;QACR,QAAQ;QACR,OAAO;QACP,QAAQ;QACR,YAAY;QACZ,YAAY;QACZ,OAAO;QACP,aAAa;KACd;IACD,OAAO,EAAE,YAAY;IACrB,aAAa,EAAE;QACb;YACE,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,6CAA6C;SACvD;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EACL,mMAAmM;SACtM;QACD;YACE,IAAI,EAAE,uBAAuB;YAC7B,OAAO,EACL,4FAA4F;SAC/F;QACD;YACE,IAAI,EAAE,uBAAuB;YAC7B,OAAO,EAAE,wEAAwE;SAClF;QACD;YACE,IAAI,EAAE,8BAA8B;YACpC,OAAO,EAAE,6EAA6E;SACvF;KACF;IACD,SAAS,EAAE;QACT;YACE,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;gBACP,WAAW;gBACX,YAAY;gBACZ,oCAAoC;gBACpC,4EAA4E;gBAC5E,oCAAo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@ -0,0 +1,3 @@
1
+ import type { Template } from "@stackweld/core";
2
+ export declare const djangoRestApi: Template;
3
+ //# sourceMappingURL=django-rest-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"django-rest-api.d.ts","sourceRoot":"","sources":["../../src/templates/django-rest-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,aAAa,EAAE,QAgG3B,CAAC"}
@@ -0,0 +1,95 @@
1
+ export const djangoRestApi = {
2
+ id: "django-rest-api",
3
+ name: "Django REST API",
4
+ description: "Production-ready REST API with Django, Django REST Framework, PostgreSQL, and Redis",
5
+ technologyIds: ["django", "python", "postgresql", "redis"],
6
+ profile: "standard",
7
+ scaffoldSteps: [
8
+ {
9
+ name: "Create virtual environment",
10
+ command: "python3 -m venv {{projectName}}/.venv",
11
+ },
12
+ {
13
+ name: "Create Django project",
14
+ command: "{{projectName}}/.venv/bin/pip install django djangorestframework && {{projectName}}/.venv/bin/django-admin startproject config {{projectName}}",
15
+ },
16
+ {
17
+ name: "Install additional dependencies",
18
+ command: "{{projectName}}/.venv/bin/pip install psycopg2-binary django-redis django-cors-headers python-dotenv",
19
+ },
20
+ ],
21
+ overrides: [
22
+ {
23
+ path: ".env.example",
24
+ content: [
25
+ "DEBUG=True",
26
+ "SECRET_KEY=change-me-in-production",
27
+ "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{{projectName}}",
28
+ "REDIS_URL=redis://localhost:6379/0",
29
+ "ALLOWED_HOSTS=localhost,127.0.0.1",
30
+ "CORS_ALLOWED_ORIGINS=http://localhost:3000",
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
+ " redis:",
55
+ " image: redis:7-alpine",
56
+ " restart: unless-stopped",
57
+ " ports:",
58
+ ' - "6379:6379"',
59
+ " healthcheck:",
60
+ ' test: ["CMD", "redis-cli", "ping"]',
61
+ " interval: 5s",
62
+ " timeout: 5s",
63
+ " retries: 5",
64
+ "",
65
+ "volumes:",
66
+ " pgdata:",
67
+ ].join("\n"),
68
+ },
69
+ {
70
+ path: "requirements.txt",
71
+ content: [
72
+ "django>=5.1",
73
+ "djangorestframework>=3.15",
74
+ "psycopg2-binary>=2.9",
75
+ "django-redis>=5.4",
76
+ "django-cors-headers>=4.4",
77
+ "python-dotenv>=1.0",
78
+ "gunicorn>=22.0",
79
+ ].join("\n"),
80
+ },
81
+ ],
82
+ hooks: [
83
+ {
84
+ timing: "post-scaffold",
85
+ name: "Freeze requirements",
86
+ command: "cd {{projectName}} && .venv/bin/pip freeze > requirements.lock",
87
+ description: "Generate locked requirements file",
88
+ requiresConfirmation: false,
89
+ },
90
+ ],
91
+ variables: {
92
+ projectName: "my-django-api",
93
+ },
94
+ };
95
+ //# sourceMappingURL=django-rest-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"django-rest-api.js","sourceRoot":"","sources":["../../src/templates/django-rest-api.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAa;IACrC,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,qFAAqF;IACvF,aAAa,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC;IAC1D,OAAO,EAAE,UAAU;IACnB,aAAa,EAAE;QACb;YACE,IAAI,EAAE,4BA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AAmC;YAChD,oBAAoB,EAAE,KAAK;SAC5B;KACF;IACD,SAAS,EAAE;QACT,WAAW,EAAE,eAAe;KAC7B;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Template } from "@stackweld/core";
2
+ export declare const expressApi: Template;
3
+ //# sourceMappingURL=express-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"express-api.d.ts","sourceRoot":"","sources":["../../src/templates/express-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,UAAU,EAAE,QAgJxB,CAAC"}