wexts 4.1.5 → 4.1.7

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 (192) hide show
  1. package/README.md +49 -49
  2. package/bin/wexts.cjs +2 -2
  3. package/dist/chunk-27NEYQD2.mjs +222 -0
  4. package/dist/chunk-27NEYQD2.mjs.map +1 -0
  5. package/dist/chunk-2LJVUMXW.js +228 -0
  6. package/dist/chunk-2LJVUMXW.js.map +1 -0
  7. package/dist/chunk-5DBFN65W.mjs +183 -0
  8. package/dist/chunk-5DBFN65W.mjs.map +1 -0
  9. package/dist/chunk-75HBI2XG.js +504 -0
  10. package/dist/chunk-75HBI2XG.js.map +1 -0
  11. package/dist/chunk-AVMQJWYD.js +95 -0
  12. package/dist/chunk-AVMQJWYD.js.map +1 -0
  13. package/dist/chunk-C2AG7Q3C.mjs +65 -0
  14. package/dist/chunk-C2AG7Q3C.mjs.map +1 -0
  15. package/dist/chunk-DS5KVVWJ.mjs +95 -0
  16. package/dist/chunk-DS5KVVWJ.mjs.map +1 -0
  17. package/dist/chunk-FUPLZMSR.mjs +228 -0
  18. package/dist/chunk-FUPLZMSR.mjs.map +1 -0
  19. package/dist/chunk-HLT3IHJY.js +183 -0
  20. package/dist/chunk-HLT3IHJY.js.map +1 -0
  21. package/dist/chunk-IRRJJ7KL.js +273 -0
  22. package/dist/chunk-IRRJJ7KL.js.map +1 -0
  23. package/dist/chunk-L77ANWWT.mjs +22 -0
  24. package/dist/chunk-L77ANWWT.mjs.map +1 -0
  25. package/dist/chunk-P3Q4I5FD.js +222 -0
  26. package/dist/chunk-P3Q4I5FD.js.map +1 -0
  27. package/dist/chunk-VBIQGUDI.mjs +504 -0
  28. package/dist/chunk-VBIQGUDI.mjs.map +1 -0
  29. package/dist/chunk-VJY6PHYF.mjs +273 -0
  30. package/dist/chunk-VJY6PHYF.mjs.map +1 -0
  31. package/dist/chunk-WCKSKU3C.js +65 -0
  32. package/dist/chunk-WCKSKU3C.js.map +1 -0
  33. package/dist/chunk-XE4OXN2W.js +12 -0
  34. package/dist/chunk-XE4OXN2W.js.map +1 -0
  35. package/dist/cli/index.d.mts +23 -0
  36. package/dist/cli/index.d.ts +23 -0
  37. package/dist/cli/index.js +634 -0
  38. package/dist/cli/index.js.map +1 -0
  39. package/dist/cli/index.mjs +636 -0
  40. package/dist/cli/index.mjs.map +1 -0
  41. package/dist/client/index.d.mts +43 -0
  42. package/dist/client/index.d.ts +43 -0
  43. package/dist/client/index.js +187 -0
  44. package/dist/client/index.js.map +1 -0
  45. package/dist/client/index.mjs +166 -0
  46. package/dist/client/index.mjs.map +1 -0
  47. package/dist/codegen/index.d.mts +2 -0
  48. package/dist/codegen/index.d.ts +2 -0
  49. package/dist/codegen/index.js +16 -0
  50. package/dist/codegen/index.js.map +1 -0
  51. package/dist/codegen/index.mjs +16 -0
  52. package/dist/codegen/index.mjs.map +1 -0
  53. package/dist/decorators-BiQtOHuF.d.ts +60 -0
  54. package/dist/decorators-vBopODtr.d.mts +60 -0
  55. package/dist/dev-server/index.d.mts +1 -0
  56. package/dist/dev-server/index.d.ts +1 -0
  57. package/dist/dev-server/index.js +13 -0
  58. package/dist/dev-server/index.js.map +1 -0
  59. package/dist/dev-server/index.mjs +13 -0
  60. package/dist/dev-server/index.mjs.map +1 -0
  61. package/dist/errors-D545UvXf.d.mts +37 -0
  62. package/dist/errors-D545UvXf.d.ts +37 -0
  63. package/dist/index-7RvU-jGE.d.mts +66 -0
  64. package/dist/index-7RvU-jGE.d.ts +66 -0
  65. package/dist/index-BsafLP-a.d.mts +70 -0
  66. package/dist/index-BsafLP-a.d.ts +70 -0
  67. package/dist/index-CJKs4wtN.d.ts +92 -0
  68. package/dist/index-CUR6CnLk.d.ts +27 -0
  69. package/dist/index-h66Vq9dK.d.mts +92 -0
  70. package/dist/index-tqmYsTUn.d.mts +27 -0
  71. package/dist/index.d.mts +289 -0
  72. package/dist/index.d.ts +289 -0
  73. package/dist/index.js +544 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/index.mjs +544 -0
  76. package/dist/index.mjs.map +1 -0
  77. package/dist/nest/index.d.mts +2 -0
  78. package/dist/nest/index.d.ts +2 -0
  79. package/dist/nest/index.js +36 -0
  80. package/dist/nest/index.js.map +1 -0
  81. package/dist/nest/index.mjs +36 -0
  82. package/dist/nest/index.mjs.map +1 -0
  83. package/dist/next/index.d.mts +66 -0
  84. package/dist/next/index.d.ts +66 -0
  85. package/dist/next/index.js +282 -0
  86. package/dist/next/index.js.map +1 -0
  87. package/dist/next/index.mjs +251 -0
  88. package/dist/next/index.mjs.map +1 -0
  89. package/dist/rpc/index.d.mts +32 -0
  90. package/dist/rpc/index.d.ts +32 -0
  91. package/dist/rpc/index.js +19 -0
  92. package/dist/rpc/index.js.map +1 -0
  93. package/dist/rpc/index.mjs +1 -0
  94. package/dist/rpc/index.mjs.map +1 -0
  95. package/dist/runtime/index.d.mts +55 -0
  96. package/dist/runtime/index.d.ts +55 -0
  97. package/dist/runtime/index.js +15 -0
  98. package/dist/runtime/index.js.map +1 -0
  99. package/dist/runtime/index.mjs +15 -0
  100. package/dist/runtime/index.mjs.map +1 -0
  101. package/dist/server/index.d.mts +7 -0
  102. package/dist/server/index.d.ts +7 -0
  103. package/dist/server/index.js +58 -0
  104. package/dist/server/index.js.map +1 -0
  105. package/dist/server/index.mjs +58 -0
  106. package/dist/server/index.mjs.map +1 -0
  107. package/dist/types/index.d.mts +12 -0
  108. package/dist/types/index.d.ts +12 -0
  109. package/dist/types/index.js +19 -0
  110. package/dist/types/index.js.map +1 -0
  111. package/dist/types/index.mjs +1 -0
  112. package/dist/types/index.mjs.map +1 -0
  113. package/dist/types-CQ_aexOX.d.mts +32 -0
  114. package/dist/types-CQ_aexOX.d.ts +32 -0
  115. package/dist/vercel-builder/index.d.mts +58 -0
  116. package/dist/vercel-builder/index.d.ts +58 -0
  117. package/dist/vercel-builder/index.js +330 -0
  118. package/dist/vercel-builder/index.js.map +1 -0
  119. package/dist/vercel-builder/index.mjs +330 -0
  120. package/dist/vercel-builder/index.mjs.map +1 -0
  121. package/package.json +153 -153
  122. package/templates/.dockerignore +43 -43
  123. package/templates/.env.example +17 -17
  124. package/templates/Dockerfile +60 -60
  125. package/templates/Procfile +1 -1
  126. package/templates/README.md +67 -67
  127. package/templates/api-sdk.ts +115 -115
  128. package/templates/docker-compose.yml +34 -34
  129. package/templates/nestjs-api/.env.example +3 -3
  130. package/templates/nestjs-api/README.md +87 -87
  131. package/templates/nestjs-api/nest-cli.json +6 -6
  132. package/templates/nestjs-api/package.json +40 -40
  133. package/templates/nestjs-api/prisma/migrations/20251123205437_init/migration.sql +24 -24
  134. package/templates/nestjs-api/prisma/migrations/migration_lock.toml +3 -3
  135. package/templates/nestjs-api/prisma/schema.prisma +29 -29
  136. package/templates/nestjs-api/src/app.module.ts +19 -17
  137. package/templates/nestjs-api/src/auth/auth.controller.ts +27 -27
  138. package/templates/nestjs-api/src/auth/auth.module.ts +37 -37
  139. package/templates/nestjs-api/src/auth/auth.service.ts +86 -86
  140. package/templates/nestjs-api/src/auth/dto/auth.dto.ts +22 -22
  141. package/templates/nestjs-api/src/auth/guards/jwt-auth.guard.ts +5 -5
  142. package/templates/nestjs-api/src/auth/strategies/jwt.strategy.ts +27 -27
  143. package/templates/nestjs-api/src/hello.service.ts +11 -0
  144. package/templates/nestjs-api/src/main.ts +32 -32
  145. package/templates/nestjs-api/src/prisma/prisma.module.ts +9 -9
  146. package/templates/nestjs-api/src/prisma/prisma.service.ts +14 -14
  147. package/templates/nestjs-api/src/todos/dto/todo.dto.ts +24 -24
  148. package/templates/nestjs-api/src/todos/todos.controller.ts +39 -39
  149. package/templates/nestjs-api/src/todos/todos.module.ts +11 -11
  150. package/templates/nestjs-api/src/todos/todos.service.ts +53 -53
  151. package/templates/nestjs-api/src/users/users.controller.ts +14 -14
  152. package/templates/nestjs-api/src/users/users.module.ts +12 -12
  153. package/templates/nestjs-api/src/users/users.service.ts +19 -19
  154. package/templates/nestjs-api/tsconfig.json +39 -39
  155. package/templates/nextjs-web/README.md +76 -76
  156. package/templates/nextjs-web/app/actions/auth.ts +108 -108
  157. package/templates/nextjs-web/app/dashboard/error.tsx +39 -39
  158. package/templates/nextjs-web/app/dashboard/loading.tsx +14 -14
  159. package/templates/nextjs-web/app/dashboard/page.tsx +5 -5
  160. package/templates/nextjs-web/app/globals.css +93 -93
  161. package/templates/nextjs-web/app/layout.tsx +29 -29
  162. package/templates/nextjs-web/app/login/page.tsx +5 -5
  163. package/templates/nextjs-web/app/page.tsx +138 -28
  164. package/templates/nextjs-web/app/register/page.tsx +5 -5
  165. package/templates/nextjs-web/components/ui/button.tsx +56 -56
  166. package/templates/nextjs-web/components/ui/card.tsx +79 -79
  167. package/templates/nextjs-web/components/ui/input.tsx +25 -25
  168. package/templates/nextjs-web/components/ui/label.tsx +24 -24
  169. package/templates/nextjs-web/features/auth/LoginForm.tsx +140 -140
  170. package/templates/nextjs-web/features/auth/RegisterForm.tsx +159 -159
  171. package/templates/nextjs-web/features/auth/api.ts +35 -35
  172. package/templates/nextjs-web/features/auth/index.ts +3 -3
  173. package/templates/nextjs-web/features/dashboard/DashboardView.tsx +204 -204
  174. package/templates/nextjs-web/features/dashboard/api.ts +9 -9
  175. package/templates/nextjs-web/features/dashboard/components.tsx +74 -74
  176. package/templates/nextjs-web/features/dashboard/index.ts +3 -3
  177. package/templates/nextjs-web/hooks/index.ts +4 -4
  178. package/templates/nextjs-web/lib/api-client.ts +89 -89
  179. package/templates/nextjs-web/lib/api.ts +115 -115
  180. package/templates/nextjs-web/lib/axios-global-config.ts +17 -17
  181. package/templates/nextjs-web/lib/utils.ts +6 -6
  182. package/templates/nextjs-web/lib/wexts-client.ts +4 -4
  183. package/templates/nextjs-web/next-env.d.ts +6 -6
  184. package/templates/nextjs-web/next.config.ts +20 -20
  185. package/templates/nextjs-web/package.json +37 -37
  186. package/templates/nextjs-web/postcss.config.js +6 -6
  187. package/templates/nextjs-web/tailwind.config.ts +69 -69
  188. package/templates/nextjs-web/tsconfig.json +41 -41
  189. package/templates/nixpacks.toml +11 -11
  190. package/templates/root-package.json +31 -31
  191. package/templates/server.ts +66 -66
  192. package/templates/tsconfig.json +30 -30
@@ -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
  }