wexts 4.0.0 → 4.1.5

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 (189) hide show
  1. package/README.md +49 -49
  2. package/bin/wexts.cjs +2 -2
  3. package/package.json +153 -148
  4. package/templates/.dockerignore +43 -43
  5. package/templates/.env.example +17 -17
  6. package/templates/Dockerfile +60 -60
  7. package/templates/Procfile +1 -1
  8. package/templates/README.md +67 -67
  9. package/templates/api-sdk.ts +115 -115
  10. package/templates/docker-compose.yml +34 -34
  11. package/templates/nestjs-api/.env.example +3 -3
  12. package/templates/nestjs-api/README.md +87 -87
  13. package/templates/nestjs-api/nest-cli.json +6 -6
  14. package/templates/nestjs-api/package.json +40 -40
  15. package/templates/nestjs-api/prisma/migrations/20251123205437_init/migration.sql +24 -24
  16. package/templates/nestjs-api/prisma/migrations/migration_lock.toml +3 -3
  17. package/templates/nestjs-api/prisma/schema.prisma +29 -29
  18. package/templates/nestjs-api/src/app.module.ts +17 -17
  19. package/templates/nestjs-api/src/auth/auth.controller.ts +27 -27
  20. package/templates/nestjs-api/src/auth/auth.module.ts +37 -37
  21. package/templates/nestjs-api/src/auth/auth.service.ts +86 -86
  22. package/templates/nestjs-api/src/auth/dto/auth.dto.ts +22 -22
  23. package/templates/nestjs-api/src/auth/guards/jwt-auth.guard.ts +5 -5
  24. package/templates/nestjs-api/src/auth/strategies/jwt.strategy.ts +27 -27
  25. package/templates/nestjs-api/src/main.ts +32 -32
  26. package/templates/nestjs-api/src/prisma/prisma.module.ts +9 -9
  27. package/templates/nestjs-api/src/prisma/prisma.service.ts +14 -14
  28. package/templates/nestjs-api/src/todos/dto/todo.dto.ts +24 -24
  29. package/templates/nestjs-api/src/todos/todos.controller.ts +39 -39
  30. package/templates/nestjs-api/src/todos/todos.module.ts +11 -11
  31. package/templates/nestjs-api/src/todos/todos.service.ts +53 -53
  32. package/templates/nestjs-api/src/users/users.controller.ts +14 -14
  33. package/templates/nestjs-api/src/users/users.module.ts +12 -12
  34. package/templates/nestjs-api/src/users/users.service.ts +19 -19
  35. package/templates/nestjs-api/tsconfig.json +39 -39
  36. package/templates/nextjs-web/README.md +76 -76
  37. package/templates/nextjs-web/app/actions/auth.ts +108 -108
  38. package/templates/nextjs-web/app/dashboard/error.tsx +39 -39
  39. package/templates/nextjs-web/app/dashboard/loading.tsx +14 -14
  40. package/templates/nextjs-web/app/dashboard/page.tsx +5 -5
  41. package/templates/nextjs-web/app/globals.css +93 -93
  42. package/templates/nextjs-web/app/layout.tsx +29 -29
  43. package/templates/nextjs-web/app/login/page.tsx +5 -5
  44. package/templates/nextjs-web/app/page.tsx +28 -28
  45. package/templates/nextjs-web/app/register/page.tsx +5 -5
  46. package/templates/nextjs-web/components/ui/button.tsx +56 -56
  47. package/templates/nextjs-web/components/ui/card.tsx +79 -79
  48. package/templates/nextjs-web/components/ui/input.tsx +25 -25
  49. package/templates/nextjs-web/components/ui/label.tsx +24 -24
  50. package/templates/nextjs-web/features/auth/LoginForm.tsx +140 -140
  51. package/templates/nextjs-web/features/auth/RegisterForm.tsx +159 -159
  52. package/templates/nextjs-web/features/auth/api.ts +35 -35
  53. package/templates/nextjs-web/features/auth/index.ts +3 -3
  54. package/templates/nextjs-web/features/dashboard/DashboardView.tsx +204 -204
  55. package/templates/nextjs-web/features/dashboard/api.ts +9 -9
  56. package/templates/nextjs-web/features/dashboard/components.tsx +74 -74
  57. package/templates/nextjs-web/features/dashboard/index.ts +3 -3
  58. package/templates/nextjs-web/hooks/index.ts +4 -4
  59. package/templates/nextjs-web/lib/api-client.ts +89 -89
  60. package/templates/nextjs-web/lib/api.ts +115 -115
  61. package/templates/nextjs-web/lib/axios-global-config.ts +17 -17
  62. package/templates/nextjs-web/lib/utils.ts +6 -6
  63. package/templates/nextjs-web/lib/wexts-client.ts +4 -4
  64. package/templates/nextjs-web/next-env.d.ts +6 -6
  65. package/templates/nextjs-web/next.config.ts +20 -20
  66. package/templates/nextjs-web/package.json +37 -37
  67. package/templates/nextjs-web/postcss.config.js +6 -6
  68. package/templates/nextjs-web/tailwind.config.ts +69 -69
  69. package/templates/nextjs-web/tsconfig.json +41 -41
  70. package/templates/nixpacks.toml +11 -11
  71. package/templates/root-package.json +31 -31
  72. package/templates/server.ts +66 -66
  73. package/templates/tsconfig.json +30 -30
  74. package/dist/chunk-2KAQYLVN.js +0 -1
  75. package/dist/chunk-2KAQYLVN.js.map +0 -1
  76. package/dist/chunk-2LJVUMXW.js +0 -228
  77. package/dist/chunk-2LJVUMXW.js.map +0 -1
  78. package/dist/chunk-7QKLIVRF.js +0 -94
  79. package/dist/chunk-7QKLIVRF.js.map +0 -1
  80. package/dist/chunk-7WULUGLH.mjs +0 -22
  81. package/dist/chunk-7WULUGLH.mjs.map +0 -1
  82. package/dist/chunk-BG56B4DE.js +0 -106
  83. package/dist/chunk-BG56B4DE.js.map +0 -1
  84. package/dist/chunk-CLM5PNSG.mjs +0 -496
  85. package/dist/chunk-CLM5PNSG.mjs.map +0 -1
  86. package/dist/chunk-DNLGCKTT.js +0 -31
  87. package/dist/chunk-DNLGCKTT.js.map +0 -1
  88. package/dist/chunk-JHOVXH3X.mjs +0 -65
  89. package/dist/chunk-JHOVXH3X.mjs.map +0 -1
  90. package/dist/chunk-MXINIFPC.js +0 -105
  91. package/dist/chunk-MXINIFPC.js.map +0 -1
  92. package/dist/chunk-SE32ZPOZ.js +0 -496
  93. package/dist/chunk-SE32ZPOZ.js.map +0 -1
  94. package/dist/chunk-UAL54DVV.mjs +0 -106
  95. package/dist/chunk-UAL54DVV.mjs.map +0 -1
  96. package/dist/chunk-WCKSKU3C.js +0 -65
  97. package/dist/chunk-WCKSKU3C.js.map +0 -1
  98. package/dist/chunk-WU6FW77M.mjs +0 -105
  99. package/dist/chunk-WU6FW77M.mjs.map +0 -1
  100. package/dist/chunk-XE4OXN2W.js +0 -12
  101. package/dist/chunk-XE4OXN2W.js.map +0 -1
  102. package/dist/chunk-YBM3IJEA.mjs +0 -94
  103. package/dist/chunk-YBM3IJEA.mjs.map +0 -1
  104. package/dist/chunk-YN6WIWNQ.mjs +0 -228
  105. package/dist/chunk-YN6WIWNQ.mjs.map +0 -1
  106. package/dist/chunk-YSLEF5C5.mjs +0 -1
  107. package/dist/chunk-YSLEF5C5.mjs.map +0 -1
  108. package/dist/chunk-ZX7QIN24.mjs +0 -31
  109. package/dist/chunk-ZX7QIN24.mjs.map +0 -1
  110. package/dist/cli/index.d.mts +0 -11
  111. package/dist/cli/index.d.ts +0 -11
  112. package/dist/cli/index.js +0 -332
  113. package/dist/cli/index.js.map +0 -1
  114. package/dist/cli/index.mjs +0 -334
  115. package/dist/cli/index.mjs.map +0 -1
  116. package/dist/client/index.d.mts +0 -21
  117. package/dist/client/index.d.ts +0 -21
  118. package/dist/client/index.js +0 -12
  119. package/dist/client/index.js.map +0 -1
  120. package/dist/client/index.mjs +0 -12
  121. package/dist/client/index.mjs.map +0 -1
  122. package/dist/codegen/index.d.mts +0 -2
  123. package/dist/codegen/index.d.ts +0 -2
  124. package/dist/codegen/index.js +0 -15
  125. package/dist/codegen/index.js.map +0 -1
  126. package/dist/codegen/index.mjs +0 -15
  127. package/dist/codegen/index.mjs.map +0 -1
  128. package/dist/decorators-BT1FFqN0.d.mts +0 -29
  129. package/dist/decorators-DvS58PqC.d.ts +0 -29
  130. package/dist/dev-server/index.d.mts +0 -1
  131. package/dist/dev-server/index.d.ts +0 -1
  132. package/dist/dev-server/index.js +0 -13
  133. package/dist/dev-server/index.js.map +0 -1
  134. package/dist/dev-server/index.mjs +0 -13
  135. package/dist/dev-server/index.mjs.map +0 -1
  136. package/dist/index-7QeQEf37.d.ts +0 -92
  137. package/dist/index-7RvU-jGE.d.mts +0 -66
  138. package/dist/index-7RvU-jGE.d.ts +0 -66
  139. package/dist/index-8nzxy0NN.d.mts +0 -92
  140. package/dist/index-Co5ZsLqq.d.ts +0 -58
  141. package/dist/index-D94W1__r.d.mts +0 -58
  142. package/dist/index-DQmyVp6F.d.mts +0 -27
  143. package/dist/index-KL_1BrQb.d.ts +0 -27
  144. package/dist/index.d.mts +0 -258
  145. package/dist/index.d.ts +0 -258
  146. package/dist/index.js +0 -410
  147. package/dist/index.js.map +0 -1
  148. package/dist/index.mjs +0 -410
  149. package/dist/index.mjs.map +0 -1
  150. package/dist/nest/index.d.mts +0 -3
  151. package/dist/nest/index.d.ts +0 -3
  152. package/dist/nest/index.js +0 -38
  153. package/dist/nest/index.js.map +0 -1
  154. package/dist/nest/index.mjs +0 -38
  155. package/dist/nest/index.mjs.map +0 -1
  156. package/dist/next/index.d.mts +0 -66
  157. package/dist/next/index.d.ts +0 -66
  158. package/dist/next/index.js +0 -226
  159. package/dist/next/index.js.map +0 -1
  160. package/dist/next/index.mjs +0 -188
  161. package/dist/next/index.mjs.map +0 -1
  162. package/dist/rpc/index.d.mts +0 -2
  163. package/dist/rpc/index.d.ts +0 -2
  164. package/dist/rpc/index.js +0 -23
  165. package/dist/rpc/index.js.map +0 -1
  166. package/dist/rpc/index.mjs +0 -23
  167. package/dist/rpc/index.mjs.map +0 -1
  168. package/dist/runtime/index.d.mts +0 -55
  169. package/dist/runtime/index.d.ts +0 -55
  170. package/dist/runtime/index.js +0 -213
  171. package/dist/runtime/index.js.map +0 -1
  172. package/dist/runtime/index.mjs +0 -213
  173. package/dist/runtime/index.mjs.map +0 -1
  174. package/dist/types/index.d.mts +0 -12
  175. package/dist/types/index.d.ts +0 -12
  176. package/dist/types/index.js +0 -2
  177. package/dist/types/index.js.map +0 -1
  178. package/dist/types/index.mjs +0 -3
  179. package/dist/types/index.mjs.map +0 -1
  180. package/dist/types-7d_fC-C3.d.mts +0 -32
  181. package/dist/types-7d_fC-C3.d.ts +0 -32
  182. package/dist/vercel-builder/index.d.mts +0 -58
  183. package/dist/vercel-builder/index.d.ts +0 -58
  184. package/dist/vercel-builder/index.js +0 -330
  185. package/dist/vercel-builder/index.js.map +0 -1
  186. package/dist/vercel-builder/index.mjs +0 -330
  187. package/dist/vercel-builder/index.mjs.map +0 -1
  188. package/templates/nestjs-api/package-lock.json +0 -5623
  189. package/templates/nextjs-web/package-lock.json +0 -3254
@@ -1,20 +1,20 @@
1
- import type { NextConfig } from "next";
2
-
3
- const nextConfig: NextConfig = {
4
- experimental: {
5
- // Enable authentication interrupts for forbidden() and unauthorized()
6
- authInterrupts: true,
7
- },
8
- // Enable component-level caching
9
- cacheComponents: true,
10
- cacheLife: {
11
- // Define custom cache profiles
12
- default: {
13
- stale: 300, // 5 minutes
14
- revalidate: 900, // 15 minutes
15
- expire: 3600, // 1 hour
16
- },
17
- },
18
- };
19
-
20
- export default nextConfig;
1
+ import type { NextConfig } from "next";
2
+
3
+ const nextConfig: NextConfig = {
4
+ experimental: {
5
+ // Enable authentication interrupts for forbidden() and unauthorized()
6
+ authInterrupts: true,
7
+ },
8
+ // Enable component-level caching
9
+ cacheComponents: true,
10
+ cacheLife: {
11
+ // Define custom cache profiles
12
+ default: {
13
+ stale: 300, // 5 minutes
14
+ revalidate: 900, // 15 minutes
15
+ expire: 3600, // 1 hour
16
+ },
17
+ },
18
+ };
19
+
20
+ export default nextConfig;
@@ -1,37 +1,37 @@
1
- {
2
- "name": "wexts-web",
3
- "version": "1.0.0",
4
- "private": true,
5
- "scripts": {
6
- "dev": "next dev",
7
- "build": "next build",
8
- "start": "next start",
9
- "lint": "next lint"
10
- },
11
- "dependencies": {
12
- "@radix-ui/react-label": "^2.1.8",
13
- "@radix-ui/react-slot": "^1.2.4",
14
- "axios": "^1.13.2",
15
- "class-variance-authority": "^0.7.1",
16
- "clsx": "^2.1.1",
17
- "cookies-next": "^6.1.1",
18
- "framer-motion": "^12.23.24",
19
- "lucide-react": "^0.554.0",
20
- "next": "16.0.10",
21
- "react": "^19.0.0",
22
- "react-dom": "^19.0.0",
23
- "react-hot-toast": "^2.6.0",
24
- "tailwind-merge": "^2.6.0",
25
- "wexts": "^2.0.8",
26
- "zod": "^4.1.12"
27
- },
28
- "devDependencies": {
29
- "@types/node": "^22.0.0",
30
- "@types/react": "^19.0.0",
31
- "@types/react-dom": "^19.0.0",
32
- "autoprefixer": "^10.4.0",
33
- "postcss": "^8.4.0",
34
- "tailwindcss": "^3.4.0",
35
- "typescript": "^5.9.3"
36
- }
37
- }
1
+ {
2
+ "name": "wexts-web",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "lint": "next lint"
10
+ },
11
+ "dependencies": {
12
+ "@radix-ui/react-label": "^2.1.8",
13
+ "@radix-ui/react-slot": "^1.2.4",
14
+ "axios": "^1.13.2",
15
+ "class-variance-authority": "^0.7.1",
16
+ "clsx": "^2.1.1",
17
+ "cookies-next": "^6.1.1",
18
+ "framer-motion": "^12.23.24",
19
+ "lucide-react": "^0.554.0",
20
+ "next": "16.0.10",
21
+ "react": "^19.0.0",
22
+ "react-dom": "^19.0.0",
23
+ "react-hot-toast": "^2.6.0",
24
+ "tailwind-merge": "^2.6.0",
25
+ "wexts": "^2.0.8",
26
+ "zod": "^4.1.12"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^22.0.0",
30
+ "@types/react": "^19.0.0",
31
+ "@types/react-dom": "^19.0.0",
32
+ "autoprefixer": "^10.4.0",
33
+ "postcss": "^8.4.0",
34
+ "tailwindcss": "^3.4.0",
35
+ "typescript": "^5.9.3"
36
+ }
37
+ }
@@ -1,6 +1,6 @@
1
- module.exports = {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
5
- },
6
- };
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ };
@@ -1,69 +1,69 @@
1
- import type { Config } from 'tailwindcss';
2
-
3
- const config: Config = {
4
- darkMode: 'class',
5
- content: [
6
- './pages/**/*.{js,ts,jsx,tsx,mdx}',
7
- './components/**/*.{js,ts,jsx,tsx,mdx}',
8
- './app/**/*.{js,ts,jsx,tsx,mdx}',
9
- './features/**/*.{js,ts,jsx,tsx,mdx}',
10
- './hooks/**/*.{js,ts,jsx,tsx,mdx}',
11
- ],
12
- theme: {
13
- extend: {
14
- colors: {
15
- border: "hsl(var(--border))",
16
- input: "hsl(var(--input))",
17
- ring: "hsl(var(--ring))",
18
- background: "hsl(var(--background))",
19
- foreground: "hsl(var(--foreground))",
20
- primary: {
21
- DEFAULT: "hsl(var(--primary))",
22
- foreground: "hsl(var(--primary-foreground))",
23
- },
24
- secondary: {
25
- DEFAULT: "hsl(var(--secondary))",
26
- foreground: "hsl(var(--secondary-foreground))",
27
- },
28
- destructive: {
29
- DEFAULT: "hsl(var(--destructive))",
30
- foreground: "hsl(var(--destructive-foreground))",
31
- },
32
- muted: {
33
- DEFAULT: "hsl(var(--muted))",
34
- foreground: "hsl(var(--muted-foreground))",
35
- },
36
- accent: {
37
- DEFAULT: "hsl(var(--accent))",
38
- foreground: "hsl(var(--accent-foreground))",
39
- },
40
- popover: {
41
- DEFAULT: "hsl(var(--background))",
42
- foreground: "hsl(var(--foreground))",
43
- },
44
- card: {
45
- DEFAULT: "hsl(var(--background))",
46
- foreground: "hsl(var(--foreground))",
47
- },
48
- },
49
- borderRadius: {
50
- lg: "var(--radius)",
51
- md: "calc(var(--radius) - 2px)",
52
- sm: "calc(var(--radius) - 4px)",
53
- },
54
- animation: {
55
- "float": "float 6s ease-in-out infinite",
56
- "pulse-slow": "pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite",
57
- },
58
- keyframes: {
59
- float: {
60
- "0%, 100%": { transform: "translateY(0)" },
61
- "50%": { transform: "translateY(-20px)" },
62
- },
63
- },
64
- },
65
- },
66
- plugins: [],
67
- };
68
-
69
- export default config;
1
+ import type { Config } from 'tailwindcss';
2
+
3
+ const config: Config = {
4
+ darkMode: 'class',
5
+ content: [
6
+ './pages/**/*.{js,ts,jsx,tsx,mdx}',
7
+ './components/**/*.{js,ts,jsx,tsx,mdx}',
8
+ './app/**/*.{js,ts,jsx,tsx,mdx}',
9
+ './features/**/*.{js,ts,jsx,tsx,mdx}',
10
+ './hooks/**/*.{js,ts,jsx,tsx,mdx}',
11
+ ],
12
+ theme: {
13
+ extend: {
14
+ colors: {
15
+ border: "hsl(var(--border))",
16
+ input: "hsl(var(--input))",
17
+ ring: "hsl(var(--ring))",
18
+ background: "hsl(var(--background))",
19
+ foreground: "hsl(var(--foreground))",
20
+ primary: {
21
+ DEFAULT: "hsl(var(--primary))",
22
+ foreground: "hsl(var(--primary-foreground))",
23
+ },
24
+ secondary: {
25
+ DEFAULT: "hsl(var(--secondary))",
26
+ foreground: "hsl(var(--secondary-foreground))",
27
+ },
28
+ destructive: {
29
+ DEFAULT: "hsl(var(--destructive))",
30
+ foreground: "hsl(var(--destructive-foreground))",
31
+ },
32
+ muted: {
33
+ DEFAULT: "hsl(var(--muted))",
34
+ foreground: "hsl(var(--muted-foreground))",
35
+ },
36
+ accent: {
37
+ DEFAULT: "hsl(var(--accent))",
38
+ foreground: "hsl(var(--accent-foreground))",
39
+ },
40
+ popover: {
41
+ DEFAULT: "hsl(var(--background))",
42
+ foreground: "hsl(var(--foreground))",
43
+ },
44
+ card: {
45
+ DEFAULT: "hsl(var(--background))",
46
+ foreground: "hsl(var(--foreground))",
47
+ },
48
+ },
49
+ borderRadius: {
50
+ lg: "var(--radius)",
51
+ md: "calc(var(--radius) - 2px)",
52
+ sm: "calc(var(--radius) - 4px)",
53
+ },
54
+ animation: {
55
+ "float": "float 6s ease-in-out infinite",
56
+ "pulse-slow": "pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite",
57
+ },
58
+ keyframes: {
59
+ float: {
60
+ "0%, 100%": { transform: "translateY(0)" },
61
+ "50%": { transform: "translateY(-20px)" },
62
+ },
63
+ },
64
+ },
65
+ },
66
+ plugins: [],
67
+ };
68
+
69
+ export default config;
@@ -1,41 +1,41 @@
1
- {
2
- "compilerOptions": {
3
- "lib": [
4
- "dom",
5
- "dom.iterable",
6
- "esnext"
7
- ],
8
- "allowJs": true,
9
- "skipLibCheck": true,
10
- "strict": true,
11
- "noEmit": true,
12
- "esModuleInterop": true,
13
- "module": "esnext",
14
- "moduleResolution": "bundler",
15
- "resolveJsonModule": true,
16
- "isolatedModules": true,
17
- "jsx": "react-jsx",
18
- "incremental": true,
19
- "plugins": [
20
- {
21
- "name": "next"
22
- }
23
- ],
24
- "paths": {
25
- "@/*": [
26
- "./*"
27
- ]
28
- },
29
- "target": "ES2017"
30
- },
31
- "include": [
32
- "next-env.d.ts",
33
- "**/*.ts",
34
- "**/*.tsx",
35
- ".next/types/**/*.ts",
36
- ".next/dev/types/**/*.ts"
37
- ],
38
- "exclude": [
39
- "node_modules"
40
- ]
41
- }
1
+ {
2
+ "compilerOptions": {
3
+ "lib": [
4
+ "dom",
5
+ "dom.iterable",
6
+ "esnext"
7
+ ],
8
+ "allowJs": true,
9
+ "skipLibCheck": true,
10
+ "strict": true,
11
+ "noEmit": true,
12
+ "esModuleInterop": true,
13
+ "module": "esnext",
14
+ "moduleResolution": "bundler",
15
+ "resolveJsonModule": true,
16
+ "isolatedModules": true,
17
+ "jsx": "react-jsx",
18
+ "incremental": true,
19
+ "plugins": [
20
+ {
21
+ "name": "next"
22
+ }
23
+ ],
24
+ "paths": {
25
+ "@/*": [
26
+ "./*"
27
+ ]
28
+ },
29
+ "target": "ES2017"
30
+ },
31
+ "include": [
32
+ "next-env.d.ts",
33
+ "**/*.ts",
34
+ "**/*.tsx",
35
+ ".next/types/**/*.ts",
36
+ ".next/dev/types/**/*.ts"
37
+ ],
38
+ "exclude": [
39
+ "node_modules"
40
+ ]
41
+ }
@@ -1,11 +1,11 @@
1
- [phases.setup]
2
- nixPacks = ["nodejs-20", "pnpm"]
3
-
4
- [phases.install]
5
- cmds = ["pnpm install"]
6
-
7
- [phases.build]
8
- cmds = ["pnpm run build"]
9
-
10
- [start]
11
- cmd = "pnpm start"
1
+ [phases.setup]
2
+ nixPacks = ["nodejs-20", "pnpm"]
3
+
4
+ [phases.install]
5
+ cmds = ["pnpm install"]
6
+
7
+ [phases.build]
8
+ cmds = ["pnpm run build"]
9
+
10
+ [start]
11
+ cmd = "pnpm start"
@@ -1,32 +1,32 @@
1
- {
2
- "name": "wexts-app",
3
- "version": "1.0.0",
4
- "private": true,
5
- "scripts": {
6
- "dev": "tsx server.ts",
7
- "build": "pnpm run build:api && pnpm run build:web && pnpm run build:server",
8
- "build:api": "cd apps/api && npm run build",
9
- "build:web": "cd apps/web && npm run build",
10
- "build:server": "tsc",
11
- "start": "node dist/server.js",
12
- "postinstall": "cd apps/api && npx prisma generate"
13
- },
14
- "dependencies": {
15
- "@nestjs/common": "^11.0.0",
16
- "@nestjs/core": "^11.0.0",
17
- "@nestjs/platform-express": "^11.1.9",
18
- "express": "^5.1.0",
19
- "next": "16.0.0",
20
- "react": "^19.0.0",
21
- "react-dom": "^19.0.0"
22
- },
23
- "devDependencies": {
24
- "@types/express": "^4.17.21",
25
- "@types/node": "^20.0.0",
26
- "tsx": "^4.7.0",
27
- "typescript": "^5.3.0"
28
- },
29
- "engines": {
30
- "node": ">=18.0.0"
31
- }
1
+ {
2
+ "name": "wexts-app",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "tsx server.ts",
7
+ "build": "pnpm run build:api && pnpm run build:web && pnpm run build:server",
8
+ "build:api": "cd apps/api && npm run build",
9
+ "build:web": "cd apps/web && npm run build",
10
+ "build:server": "tsc",
11
+ "start": "node dist/server.js",
12
+ "postinstall": "cd apps/api && npx prisma generate"
13
+ },
14
+ "dependencies": {
15
+ "@nestjs/common": "^11.0.0",
16
+ "@nestjs/core": "^11.0.0",
17
+ "@nestjs/platform-express": "^11.1.9",
18
+ "express": "^5.1.0",
19
+ "next": "16.0.0",
20
+ "react": "^19.0.0",
21
+ "react-dom": "^19.0.0"
22
+ },
23
+ "devDependencies": {
24
+ "@types/express": "^4.17.21",
25
+ "@types/node": "^20.0.0",
26
+ "tsx": "^4.7.0",
27
+ "typescript": "^5.3.0"
28
+ },
29
+ "engines": {
30
+ "node": ">=18.0.0"
31
+ }
32
32
  }
@@ -1,66 +1,66 @@
1
- import express from 'express';
2
- import { NestFactory } from '@nestjs/core';
3
- import { ExpressAdapter } from '@nestjs/platform-express';
4
- import next from 'next';
5
- import path from 'path';
6
-
7
- const dev = process.env.NODE_ENV !== 'production';
8
- const port = parseInt(process.env.PORT || '3000', 10);
9
-
10
- async function bootstrap() {
11
- console.log('šŸš€ Starting WEXTS Unified Server...\n');
12
-
13
- // 1. Initialize Next.js
14
- console.log('šŸ“¦ Loading Next.js...');
15
- const nextApp = next({
16
- dev,
17
- dir: path.join(__dirname, 'apps/web'),
18
- });
19
- await nextApp.prepare();
20
- const nextHandler = nextApp.getRequestHandler();
21
- console.log('āœ… Next.js ready\n');
22
-
23
- // 2. Initialize NestJS with Express
24
- console.log('šŸ“¦ Loading NestJS...');
25
- const server = express();
26
-
27
- // Import AppModule dynamically
28
- const { AppModule } = dev
29
- ? await import('./apps/api/src/app.module')
30
- : await import('./apps/api/dist/app.module');
31
-
32
- const app = await NestFactory.create(
33
- AppModule,
34
- new ExpressAdapter(server),
35
- { cors: true }
36
- );
37
-
38
- app.setGlobalPrefix('api');
39
-
40
- // Smart routing middleware - MUST be before NestJS init
41
- server.use((req, res, next) => {
42
- if (req.url.startsWith('/api')) {
43
- return next(); // Let NestJS handle API routes
44
- }
45
- return nextHandler(req, res); // Next.js handles everything else
46
- });
47
-
48
- await app.init();
49
- console.log('āœ… NestJS ready\n');
50
-
51
- // 3. Start server
52
- server.listen(port, () => {
53
- console.log('\nšŸŽ‰ WEXTS Unified Server Running!');
54
- console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
55
- console.log(` 🌐 Server: http://localhost:${port}`);
56
- console.log(` šŸ“± Frontend: All routes except /api/*`);
57
- console.log(` šŸ”Œ Backend: /api/*`);
58
- console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
59
- console.log('✨ Routes are smartly separated!\n');
60
- });
61
- }
62
-
63
- bootstrap().catch((err) => {
64
- console.error('āŒ Failed to start:', err);
65
- process.exit(1);
66
- });
1
+ import express from 'express';
2
+ import { NestFactory } from '@nestjs/core';
3
+ import { ExpressAdapter } from '@nestjs/platform-express';
4
+ import next from 'next';
5
+ import path from 'path';
6
+
7
+ const dev = process.env.NODE_ENV !== 'production';
8
+ const port = parseInt(process.env.PORT || '3000', 10);
9
+
10
+ async function bootstrap() {
11
+ console.log('šŸš€ Starting WEXTS Unified Server...\n');
12
+
13
+ // 1. Initialize Next.js
14
+ console.log('šŸ“¦ Loading Next.js...');
15
+ const nextApp = next({
16
+ dev,
17
+ dir: path.join(__dirname, 'apps/web'),
18
+ });
19
+ await nextApp.prepare();
20
+ const nextHandler = nextApp.getRequestHandler();
21
+ console.log('āœ… Next.js ready\n');
22
+
23
+ // 2. Initialize NestJS with Express
24
+ console.log('šŸ“¦ Loading NestJS...');
25
+ const server = express();
26
+
27
+ // Import AppModule dynamically
28
+ const { AppModule } = dev
29
+ ? await import('./apps/api/src/app.module')
30
+ : await import('./apps/api/dist/app.module');
31
+
32
+ const app = await NestFactory.create(
33
+ AppModule,
34
+ new ExpressAdapter(server),
35
+ { cors: true }
36
+ );
37
+
38
+ app.setGlobalPrefix('api');
39
+
40
+ // Smart routing middleware - MUST be before NestJS init
41
+ server.use((req, res, next) => {
42
+ if (req.url.startsWith('/api')) {
43
+ return next(); // Let NestJS handle API routes
44
+ }
45
+ return nextHandler(req, res); // Next.js handles everything else
46
+ });
47
+
48
+ await app.init();
49
+ console.log('āœ… NestJS ready\n');
50
+
51
+ // 3. Start server
52
+ server.listen(port, () => {
53
+ console.log('\nšŸŽ‰ WEXTS Unified Server Running!');
54
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
55
+ console.log(` 🌐 Server: http://localhost:${port}`);
56
+ console.log(` šŸ“± Frontend: All routes except /api/*`);
57
+ console.log(` šŸ”Œ Backend: /api/*`);
58
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
59
+ console.log('✨ Routes are smartly separated!\n');
60
+ });
61
+ }
62
+
63
+ bootstrap().catch((err) => {
64
+ console.error('āŒ Failed to start:', err);
65
+ process.exit(1);
66
+ });
@@ -1,31 +1,31 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "commonjs",
5
- "lib": [
6
- "ES2020"
7
- ],
8
- "experimentalDecorators": true,
9
- "emitDecoratorMetadata": true,
10
- "esModuleInterop": true,
11
- "allowSyntheticDefaultImports": true,
12
- "skipLibCheck": true,
13
- "strict": false,
14
- "forceConsistentCasingInFileNames": true,
15
- "moduleResolution": "node",
16
- "resolveJsonModule": true,
17
- "outDir": "./dist",
18
- "declaration": true,
19
- "declarationMap": true,
20
- "sourceMap": true
21
- },
22
- "include": [
23
- "server.ts",
24
- "apps/api/src/**/*"
25
- ],
26
- "exclude": [
27
- "node_modules",
28
- "dist",
29
- "apps/web"
30
- ]
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "commonjs",
5
+ "lib": [
6
+ "ES2020"
7
+ ],
8
+ "experimentalDecorators": true,
9
+ "emitDecoratorMetadata": true,
10
+ "esModuleInterop": true,
11
+ "allowSyntheticDefaultImports": true,
12
+ "skipLibCheck": true,
13
+ "strict": false,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "moduleResolution": "node",
16
+ "resolveJsonModule": true,
17
+ "outDir": "./dist",
18
+ "declaration": true,
19
+ "declarationMap": true,
20
+ "sourceMap": true
21
+ },
22
+ "include": [
23
+ "server.ts",
24
+ "apps/api/src/**/*"
25
+ ],
26
+ "exclude": [
27
+ "node_modules",
28
+ "dist",
29
+ "apps/web"
30
+ ]
31
31
  }
@@ -1 +0,0 @@
1
- "use strict";//# sourceMappingURL=chunk-2KAQYLVN.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Volumes/Projects/wexts/packages/dist/chunk-2KAQYLVN.js"],"names":[],"mappings":"AAAA","file":"/Volumes/Projects/wexts/packages/dist/chunk-2KAQYLVN.js"}