@monkilab/backbone 0.1.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 (181) hide show
  1. package/README.md +86 -0
  2. package/bin/cli.mjs +2 -0
  3. package/dist/__tests__/create.test.d.ts +2 -0
  4. package/dist/__tests__/create.test.d.ts.map +1 -0
  5. package/dist/__tests__/create.test.js +109 -0
  6. package/dist/__tests__/create.test.js.map +1 -0
  7. package/dist/__tests__/generators/convex.test.d.ts +2 -0
  8. package/dist/__tests__/generators/convex.test.d.ts.map +1 -0
  9. package/dist/__tests__/generators/convex.test.js +101 -0
  10. package/dist/__tests__/generators/convex.test.js.map +1 -0
  11. package/dist/__tests__/generators/github-actions.test.d.ts +2 -0
  12. package/dist/__tests__/generators/github-actions.test.d.ts.map +1 -0
  13. package/dist/__tests__/generators/github-actions.test.js +92 -0
  14. package/dist/__tests__/generators/github-actions.test.js.map +1 -0
  15. package/dist/__tests__/generators/ionic.test.d.ts +2 -0
  16. package/dist/__tests__/generators/ionic.test.d.ts.map +1 -0
  17. package/dist/__tests__/generators/ionic.test.js +94 -0
  18. package/dist/__tests__/generators/ionic.test.js.map +1 -0
  19. package/dist/__tests__/generators/llm-lib.test.d.ts +2 -0
  20. package/dist/__tests__/generators/llm-lib.test.d.ts.map +1 -0
  21. package/dist/__tests__/generators/llm-lib.test.js +67 -0
  22. package/dist/__tests__/generators/llm-lib.test.js.map +1 -0
  23. package/dist/__tests__/generators/nextjs.test.d.ts +2 -0
  24. package/dist/__tests__/generators/nextjs.test.d.ts.map +1 -0
  25. package/dist/__tests__/generators/nextjs.test.js +88 -0
  26. package/dist/__tests__/generators/nextjs.test.js.map +1 -0
  27. package/dist/__tests__/generators/nx.test.d.ts +2 -0
  28. package/dist/__tests__/generators/nx.test.d.ts.map +1 -0
  29. package/dist/__tests__/generators/nx.test.js +87 -0
  30. package/dist/__tests__/generators/nx.test.js.map +1 -0
  31. package/dist/__tests__/generators/supabase.test.d.ts +2 -0
  32. package/dist/__tests__/generators/supabase.test.d.ts.map +1 -0
  33. package/dist/__tests__/generators/supabase.test.js +98 -0
  34. package/dist/__tests__/generators/supabase.test.js.map +1 -0
  35. package/dist/__tests__/generators/ui-lib.test.d.ts +2 -0
  36. package/dist/__tests__/generators/ui-lib.test.d.ts.map +1 -0
  37. package/dist/__tests__/generators/ui-lib.test.js +67 -0
  38. package/dist/__tests__/generators/ui-lib.test.js.map +1 -0
  39. package/dist/__tests__/index.test.d.ts +2 -0
  40. package/dist/__tests__/index.test.d.ts.map +1 -0
  41. package/dist/__tests__/index.test.js +117 -0
  42. package/dist/__tests__/index.test.js.map +1 -0
  43. package/dist/__tests__/prompts.test.d.ts +2 -0
  44. package/dist/__tests__/prompts.test.d.ts.map +1 -0
  45. package/dist/__tests__/prompts.test.js +78 -0
  46. package/dist/__tests__/prompts.test.js.map +1 -0
  47. package/dist/cli/create.d.ts +3 -0
  48. package/dist/cli/create.d.ts.map +1 -0
  49. package/dist/cli/create.js +58 -0
  50. package/dist/cli/create.js.map +1 -0
  51. package/dist/cli/generators/convex.d.ts +8 -0
  52. package/dist/cli/generators/convex.d.ts.map +1 -0
  53. package/dist/cli/generators/convex.js +51 -0
  54. package/dist/cli/generators/convex.js.map +1 -0
  55. package/dist/cli/generators/github-actions.d.ts +6 -0
  56. package/dist/cli/generators/github-actions.d.ts.map +1 -0
  57. package/dist/cli/generators/github-actions.js +16 -0
  58. package/dist/cli/generators/github-actions.js.map +1 -0
  59. package/dist/cli/generators/ionic.d.ts +13 -0
  60. package/dist/cli/generators/ionic.d.ts.map +1 -0
  61. package/dist/cli/generators/ionic.js +57 -0
  62. package/dist/cli/generators/ionic.js.map +1 -0
  63. package/dist/cli/generators/llm-lib.d.ts +10 -0
  64. package/dist/cli/generators/llm-lib.d.ts.map +1 -0
  65. package/dist/cli/generators/llm-lib.js +38 -0
  66. package/dist/cli/generators/llm-lib.js.map +1 -0
  67. package/dist/cli/generators/nextjs.d.ts +16 -0
  68. package/dist/cli/generators/nextjs.d.ts.map +1 -0
  69. package/dist/cli/generators/nextjs.js +59 -0
  70. package/dist/cli/generators/nextjs.js.map +1 -0
  71. package/dist/cli/generators/nx.d.ts +7 -0
  72. package/dist/cli/generators/nx.d.ts.map +1 -0
  73. package/dist/cli/generators/nx.js +59 -0
  74. package/dist/cli/generators/nx.js.map +1 -0
  75. package/dist/cli/generators/supabase.d.ts +8 -0
  76. package/dist/cli/generators/supabase.d.ts.map +1 -0
  77. package/dist/cli/generators/supabase.js +54 -0
  78. package/dist/cli/generators/supabase.js.map +1 -0
  79. package/dist/cli/generators/ui-lib.d.ts +10 -0
  80. package/dist/cli/generators/ui-lib.d.ts.map +1 -0
  81. package/dist/cli/generators/ui-lib.js +38 -0
  82. package/dist/cli/generators/ui-lib.js.map +1 -0
  83. package/dist/cli/index.d.ts +2 -0
  84. package/dist/cli/index.d.ts.map +1 -0
  85. package/dist/cli/index.js +22 -0
  86. package/dist/cli/index.js.map +1 -0
  87. package/dist/cli/prompts.d.ts +6 -0
  88. package/dist/cli/prompts.d.ts.map +1 -0
  89. package/dist/cli/prompts.js +18 -0
  90. package/dist/cli/prompts.js.map +1 -0
  91. package/dist/cli/templates/packages/llm/src/index.d.ts +2 -0
  92. package/dist/cli/templates/packages/llm/src/index.d.ts.map +1 -0
  93. package/dist/cli/templates/packages/llm/src/index.js +2 -0
  94. package/dist/cli/templates/packages/llm/src/index.js.map +1 -0
  95. package/dist/cli/templates/packages/ui/src/index.d.ts +2 -0
  96. package/dist/cli/templates/packages/ui/src/index.d.ts.map +1 -0
  97. package/dist/cli/templates/packages/ui/src/index.js +2 -0
  98. package/dist/cli/templates/packages/ui/src/index.js.map +1 -0
  99. package/dist/cli/types.d.ts +11 -0
  100. package/dist/cli/types.d.ts.map +1 -0
  101. package/dist/cli/types.js +2 -0
  102. package/dist/cli/types.js.map +1 -0
  103. package/dist/index.d.ts +2 -0
  104. package/dist/index.d.ts.map +1 -0
  105. package/dist/index.js +46 -0
  106. package/dist/index.js.map +1 -0
  107. package/package.json +30 -0
  108. package/src/cli/templates/.github/workflows/deploy.yml +26 -0
  109. package/src/cli/templates/apps/mobile/capacitor.config.ts.tpl +12 -0
  110. package/src/cli/templates/apps/mobile/index.html +12 -0
  111. package/src/cli/templates/apps/mobile/package.json +30 -0
  112. package/src/cli/templates/apps/mobile/project.json +18 -0
  113. package/src/cli/templates/apps/mobile/src/App.tsx.tpl +21 -0
  114. package/src/cli/templates/apps/mobile/src/main.tsx.tpl +11 -0
  115. package/src/cli/templates/apps/mobile/src/pages/Home.tsx.tpl +22 -0
  116. package/src/cli/templates/apps/mobile/src/theme/tailwind.css +1 -0
  117. package/src/cli/templates/apps/mobile/tsconfig.json.tpl +17 -0
  118. package/src/cli/templates/apps/mobile/vite.config.ts.tpl +9 -0
  119. package/src/cli/templates/apps/web/app/globals.css +1 -0
  120. package/src/cli/templates/apps/web/app/layout.tsx.tpl +19 -0
  121. package/src/cli/templates/apps/web/app/page.tsx.tpl +3 -0
  122. package/src/cli/templates/apps/web/jest.config.ts.tpl +11 -0
  123. package/src/cli/templates/apps/web/next.config.ts.tpl +5 -0
  124. package/src/cli/templates/apps/web/package.json +29 -0
  125. package/src/cli/templates/apps/web/playwright.config.ts.tpl +13 -0
  126. package/src/cli/templates/apps/web/postcss.config.js +7 -0
  127. package/src/cli/templates/apps/web/project.json +39 -0
  128. package/src/cli/templates/apps/web/tsconfig.json +23 -0
  129. package/src/cli/templates/nx/README.md +19 -0
  130. package/src/cli/templates/nx/nx.json +25 -0
  131. package/src/cli/templates/nx/package.json +22 -0
  132. package/src/cli/templates/nx/tsconfig.base.json +21 -0
  133. package/src/cli/templates/packages/llm/package.json +17 -0
  134. package/src/cli/templates/packages/llm/src/index.ts +2 -0
  135. package/src/cli/templates/packages/llm/tsconfig.json +8 -0
  136. package/src/cli/templates/packages/ui/package.json +19 -0
  137. package/src/cli/templates/packages/ui/src/index.ts +2 -0
  138. package/src/cli/templates/packages/ui/tsconfig.json +8 -0
  139. package/templates/.github/workflows/deploy.yml +20 -0
  140. package/templates/apps/mobile/capacitor.config.ts +7 -0
  141. package/templates/apps/mobile/ionic.config.json +5 -0
  142. package/templates/apps/mobile/jest.config.ts +7 -0
  143. package/templates/apps/mobile/project.json +13 -0
  144. package/templates/apps/mobile/src/app/globals.css +1 -0
  145. package/templates/apps/mobile/src/app/layout.tsx +7 -0
  146. package/templates/apps/mobile/src/app/page.tsx +8 -0
  147. package/templates/apps/mobile/tailwind.config.js +6 -0
  148. package/templates/apps/mobile/tsconfig.json +6 -0
  149. package/templates/apps/web/jest.config.ts +7 -0
  150. package/templates/apps/web/next.config.ts +3 -0
  151. package/templates/apps/web/postcss.config.js +1 -0
  152. package/templates/apps/web/project.json +12 -0
  153. package/templates/apps/web/src/app/globals.css +1 -0
  154. package/templates/apps/web/src/app/layout.tsx +10 -0
  155. package/templates/apps/web/src/app/page.tsx +3 -0
  156. package/templates/apps/web/tailwind.config.js +6 -0
  157. package/templates/apps/web/tsconfig.json +6 -0
  158. package/templates/backend/convex/apps/web/src/lib/backend.ts +7 -0
  159. package/templates/backend/convex/convex/.gitkeep +0 -0
  160. package/templates/backend/convex/convex.config.ts +2 -0
  161. package/templates/backend/supabase/apps/web/src/lib/backend.ts +8 -0
  162. package/templates/backend/supabase/supabase/config.toml +16 -0
  163. package/templates/backend/supabase/supabase/migrations/.gitkeep +0 -0
  164. package/templates/docs/README.md +3 -0
  165. package/templates/nx/.env.example +9 -0
  166. package/templates/nx/.prettierrc +1 -0
  167. package/templates/nx/jest.preset.js +2 -0
  168. package/templates/nx/nx.json +25 -0
  169. package/templates/nx/package.json +33 -0
  170. package/templates/nx/playwright.config.ts +19 -0
  171. package/templates/nx/tsconfig.base.json +20 -0
  172. package/templates/packages/llm/jest.config.ts +6 -0
  173. package/templates/packages/llm/project.json +11 -0
  174. package/templates/packages/llm/src/email/resend.ts +4 -0
  175. package/templates/packages/llm/src/index.ts +2 -0
  176. package/templates/packages/llm/tsconfig.json +6 -0
  177. package/templates/packages/ui/jest.config.ts +6 -0
  178. package/templates/packages/ui/project.json +11 -0
  179. package/templates/packages/ui/src/index.ts +2 -0
  180. package/templates/packages/ui/tsconfig.json +6 -0
  181. package/templates/templates/README.md +3 -0
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "{{projectName}}-web",
3
+ "$schema": "../../node_modules/nx/schemas/project.schema.json",
4
+ "sourceRoot": "apps/web/src",
5
+ "projectType": "application",
6
+ "tags": [],
7
+ "targets": {
8
+ "build": {
9
+ "executor": "@nx/next:build",
10
+ "outputs": ["{options.outputPath}"],
11
+ "defaultConfiguration": "production",
12
+ "options": {
13
+ "outputPath": "dist/apps/web"
14
+ }
15
+ },
16
+ "serve": {
17
+ "executor": "@nx/next:server",
18
+ "defaultConfiguration": "development",
19
+ "options": {
20
+ "buildTarget": "web:build",
21
+ "dev": true
22
+ }
23
+ },
24
+ "test": {
25
+ "executor": "nx:run-commands",
26
+ "options": {
27
+ "command": "jest",
28
+ "cwd": "{projectRoot}"
29
+ }
30
+ },
31
+ "e2e": {
32
+ "executor": "nx:run-commands",
33
+ "options": {
34
+ "command": "playwright test",
35
+ "cwd": "{projectRoot}"
36
+ }
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2017",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "esModuleInterop": true,
10
+ "module": "esnext",
11
+ "moduleResolution": "bundler",
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "jsx": "preserve",
15
+ "incremental": true,
16
+ "plugins": [{ "name": "next" }],
17
+ "paths": {
18
+ "@/*": ["./src/*"]
19
+ }
20
+ },
21
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
22
+ "exclude": ["node_modules"]
23
+ }
@@ -0,0 +1,19 @@
1
+ # {{projectName}}
2
+
3
+ This workspace was generated by [OpenCastle](https://opencastle.dev).
4
+
5
+ ## Getting Started
6
+
7
+ ```bash
8
+ npm install
9
+ npx nx run-many --target=build --all
10
+ ```
11
+
12
+ ## Structure
13
+
14
+ | Directory | Purpose |
15
+ |--------------|--------------------------------|
16
+ | `apps/` | Application projects |
17
+ | `packages/` | Shared library packages |
18
+ | `templates/` | Project scaffolding templates |
19
+ | `docs/` | Documentation |
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "./node_modules/nx/schemas/nx-schema.json",
3
+ "defaultBase": "main",
4
+ "workspaceLayout": {
5
+ "appsDir": "apps",
6
+ "libsDir": "packages"
7
+ },
8
+ "affected": {
9
+ "defaultBase": "main"
10
+ },
11
+ "tasksRunnerOptions": {
12
+ "default": {
13
+ "runner": "nx/tasks-runners/default",
14
+ "options": {
15
+ "cacheableOperations": ["build", "lint", "test", "e2e"]
16
+ }
17
+ }
18
+ },
19
+ "targetDefaults": {
20
+ "build": {
21
+ "dependsOn": ["^build"]
22
+ }
23
+ },
24
+ "npmScope": "{{projectName}}"
25
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@monkilab/{{projectName}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "license": "MIT",
6
+ "scripts": {
7
+ "build": "nx run-many --target=build --all",
8
+ "test": "nx run-many --target=test --all",
9
+ "lint": "nx run-many --target=lint --all"
10
+ },
11
+ "dependencies": {
12
+ "resend": "^4.0.0"
13
+ },
14
+ "devDependencies": {
15
+ "nx": "^19.0.0",
16
+ "typescript": "^5.4.0"
17
+ },
18
+ "workspaces": [
19
+ "apps/*",
20
+ "packages/*"
21
+ ]
22
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "compileOnSave": false,
3
+ "compilerOptions": {
4
+ "rootDir": ".",
5
+ "sourceMap": true,
6
+ "declaration": false,
7
+ "moduleResolution": "bundler",
8
+ "emitDecoratorMetadata": true,
9
+ "experimentalDecorators": true,
10
+ "importHelpers": true,
11
+ "target": "ES2022",
12
+ "module": "ESNext",
13
+ "lib": ["ES2022", "dom"],
14
+ "skipLibCheck": true,
15
+ "skipDefaultLibCheck": true,
16
+ "strict": true,
17
+ "baseUrl": ".",
18
+ "paths": {}
19
+ },
20
+ "exclude": ["node_modules", "tmp"]
21
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "{{scope}}/{{projectName}}-llm",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "lint": "eslint src"
12
+ },
13
+ "dependencies": {},
14
+ "devDependencies": {
15
+ "typescript": "^5.4.0"
16
+ }
17
+ }
@@ -0,0 +1,2 @@
1
+ // {{scope}}/{{projectName}}-llm — entry point
2
+ export {};
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "rootDir": "src"
6
+ },
7
+ "include": ["src"]
8
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "{{scope}}/{{projectName}}-ui",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "lint": "eslint src"
12
+ },
13
+ "dependencies": {
14
+ "tailwindcss": "^4.0.0"
15
+ },
16
+ "devDependencies": {
17
+ "typescript": "^5.4.0"
18
+ }
19
+ }
@@ -0,0 +1,2 @@
1
+ // {{scope}}/{{projectName}}-ui — entry point
2
+ export {};
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "rootDir": "src"
6
+ },
7
+ "include": ["src"]
8
+ }
@@ -0,0 +1,20 @@
1
+ name: Deploy to Coolify
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: actions/setup-node@v4
13
+ with:
14
+ node-version: '22'
15
+ cache: 'npm'
16
+ - name: Trigger Coolify deployment
17
+ run: |
18
+ curl --request GET \
19
+ --url "${{ secrets.COOLIFY_WEBHOOK_URL }}" \
20
+ --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'
@@ -0,0 +1,7 @@
1
+ import type { CapacitorConfig } from '@capacitor/cli';
2
+ const config: CapacitorConfig = {
3
+ appId: 'com.monkilabs.{{PROJECT_NAME}}',
4
+ appName: '{{PROJECT_NAME}}',
5
+ webDir: 'dist/apps/mobile',
6
+ };
7
+ export default config;
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "integrations": { "capacitor": {} },
4
+ "type": "react"
5
+ }
@@ -0,0 +1,7 @@
1
+ export default {
2
+ displayName: 'mobile',
3
+ preset: '../../jest.preset.js',
4
+ transform: { '^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.json' }] },
5
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
6
+ coverageDirectory: '../../coverage/apps/mobile',
7
+ };
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "mobile",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "apps/mobile/src",
5
+ "projectType": "application",
6
+ "targets": {
7
+ "build": { "executor": "@nxext/ionic-react:build", "options": { "outputPath": "dist/apps/mobile" } },
8
+ "serve": { "executor": "@nxext/ionic-react:serve", "options": {} },
9
+ "cap-sync": { "executor": "@nxext/ionic-react:cap-sync", "options": {} },
10
+ "test": { "executor": "@nx/jest:jest", "options": { "jestConfig": "apps/mobile/jest.config.ts" } },
11
+ "lint": { "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": ["apps/mobile/**/*.{ts,tsx}"] } }
12
+ }
13
+ }
@@ -0,0 +1 @@
1
+ @import "tailwindcss";
@@ -0,0 +1,7 @@
1
+ import './globals.css';
2
+ import type { ReactNode } from 'react';
3
+ import { IonApp, setupIonicReact } from '@ionic/react';
4
+ setupIonicReact();
5
+ export default function RootLayout({ children }: { children: ReactNode }) {
6
+ return <IonApp>{children}</IonApp>;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { IonContent, IonPage } from '@ionic/react';
2
+ export default function HomePage() {
3
+ return (
4
+ <IonPage>
5
+ <IonContent><h1>{{PROJECT_NAME}}</h1></IonContent>
6
+ </IonPage>
7
+ );
8
+ }
@@ -0,0 +1,6 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: ['./src/**/*.{ts,tsx}'],
4
+ theme: {},
5
+ plugins: [],
6
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": { "jsx": "react-jsx", "lib": ["ES2022", "dom"], "module": "ESNext" },
4
+ "include": ["src/**/*", "capacitor.config.ts"],
5
+ "exclude": ["node_modules", "jest.config.ts"]
6
+ }
@@ -0,0 +1,7 @@
1
+ export default {
2
+ displayName: 'web',
3
+ preset: '../../jest.preset.js',
4
+ transform: { '^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.json' }] },
5
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
6
+ coverageDirectory: '../../coverage/apps/web',
7
+ };
@@ -0,0 +1,3 @@
1
+ import type { NextConfig } from 'next';
2
+ const nextConfig: NextConfig = {};
3
+ export default nextConfig;
@@ -0,0 +1 @@
1
+ export default { plugins: { '@tailwindcss/postcss': {} } };
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "web",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "apps/web/src",
5
+ "projectType": "application",
6
+ "targets": {
7
+ "build": { "executor": "@nx/next:build", "options": { "outputPath": "dist/apps/web" } },
8
+ "serve": { "executor": "@nx/next:server", "options": { "buildTarget": "web:build", "dev": true } },
9
+ "test": { "executor": "@nx/jest:jest", "options": { "jestConfig": "apps/web/jest.config.ts" } },
10
+ "lint": { "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": ["apps/web/**/*.{ts,tsx}"] } }
11
+ }
12
+ }
@@ -0,0 +1 @@
1
+ @import "tailwindcss";
@@ -0,0 +1,10 @@
1
+ import './globals.css';
2
+ import type { ReactNode } from 'react';
3
+ export const metadata = { title: '{{PROJECT_NAME}}', description: '{{PROJECT_NAME}} web app' };
4
+ export default function RootLayout({ children }: { children: ReactNode }) {
5
+ return (
6
+ <html lang="en">
7
+ <body>{children}</body>
8
+ </html>
9
+ );
10
+ }
@@ -0,0 +1,3 @@
1
+ export default function HomePage() {
2
+ return <main><h1>{{PROJECT_NAME}}</h1></main>;
3
+ }
@@ -0,0 +1,6 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: ['./src/**/*.{ts,tsx}'],
4
+ theme: {},
5
+ plugins: [],
6
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": { "jsx": "preserve", "lib": ["ES2022", "dom"], "module": "ESNext" },
4
+ "include": ["src/**/*", "next.config.ts"],
5
+ "exclude": ["node_modules", "jest.config.ts"]
6
+ }
@@ -0,0 +1,7 @@
1
+ import { ConvexProvider, ConvexReactClient } from 'convex/react';
2
+
3
+ const convexUrl = process.env['NEXT_PUBLIC_CONVEX_URL'];
4
+ if (!convexUrl) throw new Error('NEXT_PUBLIC_CONVEX_URL is not set');
5
+
6
+ export const convexClient = new ConvexReactClient(convexUrl);
7
+ export { ConvexProvider };
File without changes
@@ -0,0 +1,2 @@
1
+ import { defineApp } from 'convex/server';
2
+ export default defineApp();
@@ -0,0 +1,8 @@
1
+ import { createClient } from '@supabase/supabase-js';
2
+
3
+ const supabaseUrl = process.env['NEXT_PUBLIC_SUPABASE_URL'];
4
+ const supabaseAnonKey = process.env['NEXT_PUBLIC_SUPABASE_ANON_KEY'];
5
+ if (!supabaseUrl) throw new Error('NEXT_PUBLIC_SUPABASE_URL is not set');
6
+ if (!supabaseAnonKey) throw new Error('NEXT_PUBLIC_SUPABASE_ANON_KEY is not set');
7
+
8
+ export const supabase = createClient(supabaseUrl, supabaseAnonKey);
@@ -0,0 +1,16 @@
1
+ [api]
2
+ enabled = true
3
+ port = 54321
4
+ schemas = ["public"]
5
+
6
+ [db]
7
+ port = 54322
8
+ major_version = 15
9
+
10
+ [studio]
11
+ enabled = true
12
+ port = 54323
13
+
14
+ [auth]
15
+ enabled = true
16
+ site_url = "http://localhost:3000"
@@ -0,0 +1,3 @@
1
+ # Docs
2
+
3
+ Project documentation lives here.
@@ -0,0 +1,9 @@
1
+ # Copy to .env.local and fill in values
2
+ # Backend (one of: convex, supabase)
3
+ NEXT_PUBLIC_BACKEND=
4
+
5
+ # Resend
6
+ RESEND_API_KEY=
7
+
8
+ # Coolify
9
+ COOLIFY_WEBHOOK_URL=
@@ -0,0 +1 @@
1
+ { "singleQuote": true, "trailingComma": "all", "semi": true, "printWidth": 100 }
@@ -0,0 +1,2 @@
1
+ const nxPreset = require('@nx/jest/preset').default;
2
+ module.exports = { ...nxPreset };
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "./node_modules/nx/schemas/nx-schema.json",
3
+ "defaultBase": "main",
4
+ "targetDefaults": {
5
+ "build": {
6
+ "cache": true
7
+ },
8
+ "test": {
9
+ "cache": true
10
+ },
11
+ "lint": {
12
+ "cache": true
13
+ }
14
+ },
15
+ "generators": {
16
+ "@nx/js:library": {
17
+ "bundler": "tsc",
18
+ "unitTestRunner": "jest"
19
+ }
20
+ },
21
+ "workspaceLayout": {
22
+ "appsDir": "apps",
23
+ "libsDir": "packages"
24
+ }
25
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "build": "nx run-many --target=build --all",
7
+ "test": "nx run-many --target=test --all",
8
+ "lint": "nx run-many --target=lint --all"
9
+ },
10
+ "dependencies": {
11
+ "next": "^15.0.0",
12
+ "react": "^19.0.0",
13
+ "react-dom": "^19.0.0",
14
+ "@ionic/react": "^8.0.0",
15
+ "@capacitor/core": "^7.0.0",
16
+ "tailwindcss": "^4.0.0",
17
+ "resend": "^4.0.0"
18
+ },
19
+ "devDependencies": {
20
+ "nx": "^20.0.0",
21
+ "typescript": "^5.0.0",
22
+ "prettier": "^3.0.0",
23
+ "@nx/next": "^20.0.0",
24
+ "@nx/react": "^20.0.0",
25
+ "@nx/js": "^20.0.0",
26
+ "@nx/playwright": "^20.0.0",
27
+ "@nxext/ionic-react": "^20.0.0",
28
+ "jest": "^29.0.0",
29
+ "ts-jest": "^29.0.0",
30
+ "@types/jest": "^29.0.0",
31
+ "playwright": "^1.0.0"
32
+ }
33
+ }
@@ -0,0 +1,19 @@
1
+ import { defineConfig, devices } from '@playwright/test';
2
+
3
+ export default defineConfig({
4
+ testDir: './e2e',
5
+ use: {
6
+ baseURL: 'http://localhost:3000',
7
+ },
8
+ webServer: {
9
+ command: 'nx serve web',
10
+ port: 3000,
11
+ reuseExistingServer: !process.env.CI,
12
+ },
13
+ projects: [
14
+ {
15
+ name: 'chromium',
16
+ use: { ...devices['Desktop Chrome'] },
17
+ },
18
+ ],
19
+ });
@@ -0,0 +1,20 @@
1
+ {
2
+ "compileOnSave": false,
3
+ "compilerOptions": {
4
+ "rootDir": ".",
5
+ "sourceMap": true,
6
+ "declaration": false,
7
+ "moduleResolution": "bundler",
8
+ "strict": true,
9
+ "noUnusedLocals": true,
10
+ "noUnusedParameters": true,
11
+ "esModuleInterop": true,
12
+ "skipLibCheck": true,
13
+ "target": "ES2022",
14
+ "module": "ESNext",
15
+ "lib": ["ES2022", "dom"],
16
+ "baseUrl": ".",
17
+ "paths": {}
18
+ },
19
+ "exclude": ["node_modules", "tmp"]
20
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ displayName: 'llm',
3
+ preset: '../../jest.preset.js',
4
+ transform: { '^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.json' }] },
5
+ coverageDirectory: '../../coverage/packages/llm',
6
+ };
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "llm",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "packages/llm/src",
5
+ "projectType": "library",
6
+ "targets": {
7
+ "build": { "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/llm", "main": "packages/llm/src/index.ts", "tsConfig": "packages/llm/tsconfig.json" } },
8
+ "test": { "executor": "@nx/jest:jest", "options": { "jestConfig": "packages/llm/jest.config.ts" } },
9
+ "lint": { "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": ["packages/llm/**/*.{ts,tsx}"] } }
10
+ }
11
+ }
@@ -0,0 +1,4 @@
1
+ import { Resend } from 'resend';
2
+
3
+ // Initialised lazily; throws at call-time (not import-time) if env var is missing.
4
+ export const resend = new Resend(process.env['RESEND_API_KEY']);
@@ -0,0 +1,2 @@
1
+ // Export LLM prompts and tools here
2
+ export * from './email/resend';
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": { "declaration": true, "outDir": "../../dist/packages/llm" },
4
+ "include": ["src/**/*"],
5
+ "exclude": ["node_modules", "jest.config.ts"]
6
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ displayName: 'ui',
3
+ preset: '../../jest.preset.js',
4
+ transform: { '^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.json' }] },
5
+ coverageDirectory: '../../coverage/packages/ui',
6
+ };
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "ui",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "packages/ui/src",
5
+ "projectType": "library",
6
+ "targets": {
7
+ "build": { "executor": "@nx/js:tsc", "options": { "outputPath": "dist/packages/ui", "main": "packages/ui/src/index.ts", "tsConfig": "packages/ui/tsconfig.json" } },
8
+ "test": { "executor": "@nx/jest:jest", "options": { "jestConfig": "packages/ui/jest.config.ts" } },
9
+ "lint": { "executor": "@nx/eslint:lint", "options": { "lintFilePatterns": ["packages/ui/**/*.{ts,tsx}"] } }
10
+ }
11
+ }
@@ -0,0 +1,2 @@
1
+ // Export shared UI components here
2
+ export {};
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": { "jsx": "react-jsx", "declaration": true, "outDir": "../../dist/packages/ui" },
4
+ "include": ["src/**/*"],
5
+ "exclude": ["node_modules", "jest.config.ts"]
6
+ }
@@ -0,0 +1,3 @@
1
+ # Templates
2
+
3
+ Custom code generation templates for this project live here.