wexts 4.1.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.
- package/README.md +49 -49
- package/bin/wexts.cjs +2 -2
- package/package.json +153 -148
- package/templates/.dockerignore +43 -43
- package/templates/.env.example +17 -17
- package/templates/Dockerfile +60 -60
- package/templates/Procfile +1 -1
- package/templates/README.md +67 -67
- package/templates/api-sdk.ts +115 -115
- package/templates/docker-compose.yml +34 -34
- package/templates/nestjs-api/.env.example +3 -3
- package/templates/nestjs-api/README.md +87 -87
- package/templates/nestjs-api/nest-cli.json +6 -6
- package/templates/nestjs-api/package.json +40 -40
- package/templates/nestjs-api/prisma/migrations/20251123205437_init/migration.sql +24 -24
- package/templates/nestjs-api/prisma/migrations/migration_lock.toml +3 -3
- package/templates/nestjs-api/prisma/schema.prisma +29 -29
- package/templates/nestjs-api/src/app.module.ts +17 -17
- package/templates/nestjs-api/src/auth/auth.controller.ts +27 -27
- package/templates/nestjs-api/src/auth/auth.module.ts +37 -37
- package/templates/nestjs-api/src/auth/auth.service.ts +86 -86
- package/templates/nestjs-api/src/auth/dto/auth.dto.ts +22 -22
- package/templates/nestjs-api/src/auth/guards/jwt-auth.guard.ts +5 -5
- package/templates/nestjs-api/src/auth/strategies/jwt.strategy.ts +27 -27
- package/templates/nestjs-api/src/main.ts +32 -32
- package/templates/nestjs-api/src/prisma/prisma.module.ts +9 -9
- package/templates/nestjs-api/src/prisma/prisma.service.ts +14 -14
- package/templates/nestjs-api/src/todos/dto/todo.dto.ts +24 -24
- package/templates/nestjs-api/src/todos/todos.controller.ts +39 -39
- package/templates/nestjs-api/src/todos/todos.module.ts +11 -11
- package/templates/nestjs-api/src/todos/todos.service.ts +53 -53
- package/templates/nestjs-api/src/users/users.controller.ts +14 -14
- package/templates/nestjs-api/src/users/users.module.ts +12 -12
- package/templates/nestjs-api/src/users/users.service.ts +19 -19
- package/templates/nestjs-api/tsconfig.json +39 -39
- package/templates/nextjs-web/README.md +76 -76
- package/templates/nextjs-web/app/actions/auth.ts +108 -108
- package/templates/nextjs-web/app/dashboard/error.tsx +39 -39
- package/templates/nextjs-web/app/dashboard/loading.tsx +14 -14
- package/templates/nextjs-web/app/dashboard/page.tsx +5 -5
- package/templates/nextjs-web/app/globals.css +93 -93
- package/templates/nextjs-web/app/layout.tsx +29 -29
- package/templates/nextjs-web/app/login/page.tsx +5 -5
- package/templates/nextjs-web/app/page.tsx +28 -28
- package/templates/nextjs-web/app/register/page.tsx +5 -5
- package/templates/nextjs-web/components/ui/button.tsx +56 -56
- package/templates/nextjs-web/components/ui/card.tsx +79 -79
- package/templates/nextjs-web/components/ui/input.tsx +25 -25
- package/templates/nextjs-web/components/ui/label.tsx +24 -24
- package/templates/nextjs-web/features/auth/LoginForm.tsx +140 -140
- package/templates/nextjs-web/features/auth/RegisterForm.tsx +159 -159
- package/templates/nextjs-web/features/auth/api.ts +35 -35
- package/templates/nextjs-web/features/auth/index.ts +3 -3
- package/templates/nextjs-web/features/dashboard/DashboardView.tsx +204 -204
- package/templates/nextjs-web/features/dashboard/api.ts +9 -9
- package/templates/nextjs-web/features/dashboard/components.tsx +74 -74
- package/templates/nextjs-web/features/dashboard/index.ts +3 -3
- package/templates/nextjs-web/hooks/index.ts +4 -4
- package/templates/nextjs-web/lib/api-client.ts +89 -89
- package/templates/nextjs-web/lib/api.ts +115 -115
- package/templates/nextjs-web/lib/axios-global-config.ts +17 -17
- package/templates/nextjs-web/lib/utils.ts +6 -6
- package/templates/nextjs-web/lib/wexts-client.ts +4 -4
- package/templates/nextjs-web/next-env.d.ts +6 -6
- package/templates/nextjs-web/next.config.ts +20 -20
- package/templates/nextjs-web/package.json +37 -37
- package/templates/nextjs-web/postcss.config.js +6 -6
- package/templates/nextjs-web/tailwind.config.ts +69 -69
- package/templates/nextjs-web/tsconfig.json +41 -41
- package/templates/nixpacks.toml +11 -11
- package/templates/root-package.json +31 -31
- package/templates/server.ts +66 -66
- package/templates/tsconfig.json +30 -30
- package/dist/chunk-2KAQYLVN.js +0 -1
- package/dist/chunk-2KAQYLVN.js.map +0 -1
- package/dist/chunk-2LJVUMXW.js +0 -228
- package/dist/chunk-2LJVUMXW.js.map +0 -1
- package/dist/chunk-342VRT25.mjs +0 -504
- package/dist/chunk-342VRT25.mjs.map +0 -1
- package/dist/chunk-7HNQWJWV.js +0 -504
- package/dist/chunk-7HNQWJWV.js.map +0 -1
- package/dist/chunk-7QKLIVRF.js +0 -94
- package/dist/chunk-7QKLIVRF.js.map +0 -1
- package/dist/chunk-7SSCNCTW.mjs +0 -137
- package/dist/chunk-7SSCNCTW.mjs.map +0 -1
- package/dist/chunk-7TLSPR65.mjs +0 -95
- package/dist/chunk-7TLSPR65.mjs.map +0 -1
- package/dist/chunk-7WULUGLH.mjs +0 -22
- package/dist/chunk-7WULUGLH.mjs.map +0 -1
- package/dist/chunk-AVMQJWYD.js +0 -95
- package/dist/chunk-AVMQJWYD.js.map +0 -1
- package/dist/chunk-BG56B4DE.js +0 -106
- package/dist/chunk-BG56B4DE.js.map +0 -1
- package/dist/chunk-CLM5PNSG.mjs +0 -496
- package/dist/chunk-CLM5PNSG.mjs.map +0 -1
- package/dist/chunk-DNLGCKTT.js +0 -31
- package/dist/chunk-DNLGCKTT.js.map +0 -1
- package/dist/chunk-JHOVXH3X.mjs +0 -65
- package/dist/chunk-JHOVXH3X.mjs.map +0 -1
- package/dist/chunk-MXINIFPC.js +0 -105
- package/dist/chunk-MXINIFPC.js.map +0 -1
- package/dist/chunk-O4II6N34.js +0 -137
- package/dist/chunk-O4II6N34.js.map +0 -1
- package/dist/chunk-SE32ZPOZ.js +0 -496
- package/dist/chunk-SE32ZPOZ.js.map +0 -1
- package/dist/chunk-UAL54DVV.mjs +0 -106
- package/dist/chunk-UAL54DVV.mjs.map +0 -1
- package/dist/chunk-WCKSKU3C.js +0 -65
- package/dist/chunk-WCKSKU3C.js.map +0 -1
- package/dist/chunk-WU6FW77M.mjs +0 -105
- package/dist/chunk-WU6FW77M.mjs.map +0 -1
- package/dist/chunk-XE4OXN2W.js +0 -12
- package/dist/chunk-XE4OXN2W.js.map +0 -1
- package/dist/chunk-YBM3IJEA.mjs +0 -94
- package/dist/chunk-YBM3IJEA.mjs.map +0 -1
- package/dist/chunk-YN6WIWNQ.mjs +0 -228
- package/dist/chunk-YN6WIWNQ.mjs.map +0 -1
- package/dist/chunk-YSLEF5C5.mjs +0 -1
- package/dist/chunk-YSLEF5C5.mjs.map +0 -1
- package/dist/chunk-ZX7QIN24.mjs +0 -31
- package/dist/chunk-ZX7QIN24.mjs.map +0 -1
- package/dist/cli/index.d.mts +0 -23
- package/dist/cli/index.d.ts +0 -23
- package/dist/cli/index.js +0 -716
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/index.mjs +0 -718
- package/dist/cli/index.mjs.map +0 -1
- package/dist/client/index.d.mts +0 -21
- package/dist/client/index.d.ts +0 -21
- package/dist/client/index.js +0 -13
- package/dist/client/index.js.map +0 -1
- package/dist/client/index.mjs +0 -13
- package/dist/client/index.mjs.map +0 -1
- package/dist/codegen/index.d.mts +0 -2
- package/dist/codegen/index.d.ts +0 -2
- package/dist/codegen/index.js +0 -16
- package/dist/codegen/index.js.map +0 -1
- package/dist/codegen/index.mjs +0 -16
- package/dist/codegen/index.mjs.map +0 -1
- package/dist/decorators-BT1FFqN0.d.mts +0 -29
- package/dist/decorators-DvS58PqC.d.ts +0 -29
- package/dist/dev-server/index.d.mts +0 -1
- package/dist/dev-server/index.d.ts +0 -1
- package/dist/dev-server/index.js +0 -13
- package/dist/dev-server/index.js.map +0 -1
- package/dist/dev-server/index.mjs +0 -13
- package/dist/dev-server/index.mjs.map +0 -1
- package/dist/index-7QeQEf37.d.ts +0 -92
- package/dist/index-7RvU-jGE.d.mts +0 -66
- package/dist/index-7RvU-jGE.d.ts +0 -66
- package/dist/index-8nzxy0NN.d.mts +0 -92
- package/dist/index-Co5ZsLqq.d.ts +0 -58
- package/dist/index-D94W1__r.d.mts +0 -58
- package/dist/index-DQmyVp6F.d.mts +0 -27
- package/dist/index-KL_1BrQb.d.ts +0 -27
- package/dist/index.d.mts +0 -294
- package/dist/index.d.ts +0 -294
- package/dist/index.js +0 -424
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -424
- package/dist/index.mjs.map +0 -1
- package/dist/nest/index.d.mts +0 -3
- package/dist/nest/index.d.ts +0 -3
- package/dist/nest/index.js +0 -38
- package/dist/nest/index.js.map +0 -1
- package/dist/nest/index.mjs +0 -38
- package/dist/nest/index.mjs.map +0 -1
- package/dist/next/index.d.mts +0 -66
- package/dist/next/index.d.ts +0 -66
- package/dist/next/index.js +0 -289
- package/dist/next/index.js.map +0 -1
- package/dist/next/index.mjs +0 -251
- package/dist/next/index.mjs.map +0 -1
- package/dist/rpc/index.d.mts +0 -2
- package/dist/rpc/index.d.ts +0 -2
- package/dist/rpc/index.js +0 -23
- package/dist/rpc/index.js.map +0 -1
- package/dist/rpc/index.mjs +0 -23
- package/dist/rpc/index.mjs.map +0 -1
- package/dist/runtime/index.d.mts +0 -55
- package/dist/runtime/index.d.ts +0 -55
- package/dist/runtime/index.js +0 -221
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/index.mjs +0 -221
- package/dist/runtime/index.mjs.map +0 -1
- package/dist/types/index.d.mts +0 -12
- package/dist/types/index.d.ts +0 -12
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
- package/dist/types/index.mjs +0 -3
- package/dist/types/index.mjs.map +0 -1
- package/dist/types-7d_fC-C3.d.mts +0 -32
- package/dist/types-7d_fC-C3.d.ts +0 -32
- package/dist/vercel-builder/index.d.mts +0 -58
- package/dist/vercel-builder/index.d.ts +0 -58
- package/dist/vercel-builder/index.js +0 -330
- package/dist/vercel-builder/index.js.map +0 -1
- package/dist/vercel-builder/index.mjs +0 -330
- package/dist/vercel-builder/index.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
# Wexts Package
|
|
2
|
-
|
|
3
|
-
`wexts` is a production-focused toolkit for running Next.js + NestJS behind one Fastify production runtime with generated typed RPC.
|
|
4
|
-
|
|
5
|
-
## Stable In This Patch
|
|
6
|
-
|
|
7
|
-
- `wexts generate` creates a deterministic RPC manifest and typed client.
|
|
8
|
-
- `wexts start` starts the Fastify production runtime.
|
|
9
|
-
- `wexts doctor` and `wexts doctor --security` validate common release blockers.
|
|
10
|
-
- `wexts/next` exposes `FusionProvider`, `useFusion`, and `useWexts<T>()`.
|
|
11
|
-
- `wexts/client` exposes `createWextsRpcClient()`.
|
|
12
|
-
- `wexts/rpc` exposes RPC metadata types/decorators.
|
|
13
|
-
- `wexts/runtime` exposes the production runtime helpers.
|
|
14
|
-
|
|
15
|
-
## Canonical Example
|
|
16
|
-
|
|
17
|
-
Use `examples/hello-rpc` from the repository as the release-verified path.
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
pnpm --filter wexts-example-hello-rpc generate
|
|
21
|
-
pnpm --filter wexts-example-hello-rpc build
|
|
22
|
-
pnpm --filter wexts-example-hello-rpc run doctor
|
|
23
|
-
pnpm --filter wexts-example-hello-rpc run doctor:security
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Production Runtime
|
|
27
|
-
|
|
28
|
-
Production runtime is single-port:
|
|
29
|
-
|
|
30
|
-
- `/health`
|
|
31
|
-
- `/api/health`
|
|
32
|
-
- `/rpc/:service/:method`
|
|
33
|
-
- optional Nest under `/api`
|
|
34
|
-
- optional Next frontend routes
|
|
35
|
-
|
|
36
|
-
Development mode currently runs separate web/API processes. Use `wexts start` for the supported single-port runtime path.
|
|
37
|
-
|
|
38
|
-
## Security
|
|
39
|
-
|
|
40
|
-
Use `@wexts/security` / Wexts Shield before runtime routes. It provides application-layer controls. It does not replace Cloudflare/WAF/provider DDoS protection, and its default memory rate limit store is single-process only.
|
|
41
|
-
|
|
42
|
-
## Deprecated Compatibility Paths
|
|
43
|
-
|
|
44
|
-
- `demo/`
|
|
45
|
-
- `packages/templates/nestjs-api`
|
|
46
|
-
- `packages/templates/nextjs-web`
|
|
47
|
-
- legacy Fusion controller codegen paths
|
|
48
|
-
|
|
49
|
-
These are retained for compatibility and should not be marketed as the recommended production structure.
|
|
1
|
+
# Wexts Package
|
|
2
|
+
|
|
3
|
+
`wexts` is a production-focused toolkit for running Next.js + NestJS behind one Fastify production runtime with generated typed RPC.
|
|
4
|
+
|
|
5
|
+
## Stable In This Patch
|
|
6
|
+
|
|
7
|
+
- `wexts generate` creates a deterministic RPC manifest and typed client.
|
|
8
|
+
- `wexts start` starts the Fastify production runtime.
|
|
9
|
+
- `wexts doctor` and `wexts doctor --security` validate common release blockers.
|
|
10
|
+
- `wexts/next` exposes `FusionProvider`, `useFusion`, and `useWexts<T>()`.
|
|
11
|
+
- `wexts/client` exposes `createWextsRpcClient()`.
|
|
12
|
+
- `wexts/rpc` exposes RPC metadata types/decorators.
|
|
13
|
+
- `wexts/runtime` exposes the production runtime helpers.
|
|
14
|
+
|
|
15
|
+
## Canonical Example
|
|
16
|
+
|
|
17
|
+
Use `examples/hello-rpc` from the repository as the release-verified path.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm --filter wexts-example-hello-rpc generate
|
|
21
|
+
pnpm --filter wexts-example-hello-rpc build
|
|
22
|
+
pnpm --filter wexts-example-hello-rpc run doctor
|
|
23
|
+
pnpm --filter wexts-example-hello-rpc run doctor:security
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Production Runtime
|
|
27
|
+
|
|
28
|
+
Production runtime is single-port:
|
|
29
|
+
|
|
30
|
+
- `/health`
|
|
31
|
+
- `/api/health`
|
|
32
|
+
- `/rpc/:service/:method`
|
|
33
|
+
- optional Nest under `/api`
|
|
34
|
+
- optional Next frontend routes
|
|
35
|
+
|
|
36
|
+
Development mode currently runs separate web/API processes. Use `wexts start` for the supported single-port runtime path.
|
|
37
|
+
|
|
38
|
+
## Security
|
|
39
|
+
|
|
40
|
+
Use `@wexts/security` / Wexts Shield before runtime routes. It provides application-layer controls. It does not replace Cloudflare/WAF/provider DDoS protection, and its default memory rate limit store is single-process only.
|
|
41
|
+
|
|
42
|
+
## Deprecated Compatibility Paths
|
|
43
|
+
|
|
44
|
+
- `demo/`
|
|
45
|
+
- `packages/templates/nestjs-api`
|
|
46
|
+
- `packages/templates/nextjs-web`
|
|
47
|
+
- legacy Fusion controller codegen paths
|
|
48
|
+
|
|
49
|
+
These are retained for compatibility and should not be marketed as the recommended production structure.
|
package/bin/wexts.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
require("../dist/cli/index.js");
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
require("../dist/cli/index.js");
|
package/package.json
CHANGED
|
@@ -1,148 +1,153 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wexts",
|
|
3
|
-
"version": "4.1.
|
|
4
|
-
"description": "Production-focused single-runtime Next.js + NestJS toolkit with typed RPC.",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"module": "./dist/index.mjs",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"bin": {
|
|
9
|
-
"wexts": "bin/wexts.cjs"
|
|
10
|
-
},
|
|
11
|
-
"files": [
|
|
12
|
-
"dist",
|
|
13
|
-
"templates",
|
|
14
|
-
"bin",
|
|
15
|
-
"README.md",
|
|
16
|
-
"LICENSE"
|
|
17
|
-
],
|
|
18
|
-
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"types": "./dist/index.d.ts",
|
|
21
|
-
"import": "./dist/index.mjs",
|
|
22
|
-
"require": "./dist/index.js"
|
|
23
|
-
},
|
|
24
|
-
"./client": {
|
|
25
|
-
"types": "./dist/client/index.d.ts",
|
|
26
|
-
"import": "./dist/client/index.mjs",
|
|
27
|
-
"require": "./dist/client/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./types": {
|
|
30
|
-
"types": "./dist/types/index.d.ts",
|
|
31
|
-
"import": "./dist/types/index.mjs",
|
|
32
|
-
"require": "./dist/types/index.js"
|
|
33
|
-
},
|
|
34
|
-
"./nest": {
|
|
35
|
-
"types": "./dist/nest/index.d.ts",
|
|
36
|
-
"import": "./dist/nest/index.mjs",
|
|
37
|
-
"require": "./dist/nest/index.js"
|
|
38
|
-
},
|
|
39
|
-
"./next": {
|
|
40
|
-
"types": "./dist/next/index.d.ts",
|
|
41
|
-
"import": "./dist/next/index.mjs",
|
|
42
|
-
"require": "./dist/next/index.js"
|
|
43
|
-
},
|
|
44
|
-
"./rpc": {
|
|
45
|
-
"types": "./dist/rpc/index.d.ts",
|
|
46
|
-
"import": "./dist/rpc/index.mjs",
|
|
47
|
-
"require": "./dist/rpc/index.js"
|
|
48
|
-
},
|
|
49
|
-
"./runtime": {
|
|
50
|
-
"types": "./dist/runtime/index.d.ts",
|
|
51
|
-
"import": "./dist/runtime/index.mjs",
|
|
52
|
-
"require": "./dist/runtime/index.js"
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
|
|
148
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "wexts",
|
|
3
|
+
"version": "4.1.5",
|
|
4
|
+
"description": "Production-focused single-runtime Next.js + NestJS toolkit with typed RPC.",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"wexts": "bin/wexts.cjs"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"templates",
|
|
14
|
+
"bin",
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.mjs",
|
|
22
|
+
"require": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./client": {
|
|
25
|
+
"types": "./dist/client/index.d.ts",
|
|
26
|
+
"import": "./dist/client/index.mjs",
|
|
27
|
+
"require": "./dist/client/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./types": {
|
|
30
|
+
"types": "./dist/types/index.d.ts",
|
|
31
|
+
"import": "./dist/types/index.mjs",
|
|
32
|
+
"require": "./dist/types/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./nest": {
|
|
35
|
+
"types": "./dist/nest/index.d.ts",
|
|
36
|
+
"import": "./dist/nest/index.mjs",
|
|
37
|
+
"require": "./dist/nest/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./next": {
|
|
40
|
+
"types": "./dist/next/index.d.ts",
|
|
41
|
+
"import": "./dist/next/index.mjs",
|
|
42
|
+
"require": "./dist/next/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./rpc": {
|
|
45
|
+
"types": "./dist/rpc/index.d.ts",
|
|
46
|
+
"import": "./dist/rpc/index.mjs",
|
|
47
|
+
"require": "./dist/rpc/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./runtime": {
|
|
50
|
+
"types": "./dist/runtime/index.d.ts",
|
|
51
|
+
"import": "./dist/runtime/index.mjs",
|
|
52
|
+
"require": "./dist/runtime/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./server": {
|
|
55
|
+
"types": "./dist/server/index.d.ts",
|
|
56
|
+
"import": "./dist/server/index.mjs",
|
|
57
|
+
"require": "./dist/server/index.js"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "tsup",
|
|
62
|
+
"dev": "tsup --watch",
|
|
63
|
+
"test": "vitest run",
|
|
64
|
+
"test:watch": "vitest",
|
|
65
|
+
"lint": "tsc --noEmit",
|
|
66
|
+
"typecheck": "tsc --noEmit",
|
|
67
|
+
"release": "npm run build && npm publish --access public"
|
|
68
|
+
},
|
|
69
|
+
"keywords": [
|
|
70
|
+
"wexts",
|
|
71
|
+
"framework",
|
|
72
|
+
"fullstack",
|
|
73
|
+
"nestjs",
|
|
74
|
+
"nextjs",
|
|
75
|
+
"monorepo",
|
|
76
|
+
"typescript",
|
|
77
|
+
"react",
|
|
78
|
+
"unified-runtime",
|
|
79
|
+
"generated-rpc",
|
|
80
|
+
"type-safe",
|
|
81
|
+
"prisma",
|
|
82
|
+
"jwt-auth",
|
|
83
|
+
"docker",
|
|
84
|
+
"next.js",
|
|
85
|
+
"nest.js"
|
|
86
|
+
],
|
|
87
|
+
"author": "WEXTS Team",
|
|
88
|
+
"license": "MIT",
|
|
89
|
+
"repository": {
|
|
90
|
+
"type": "git",
|
|
91
|
+
"url": "git+https://github.com/ziadmustafa1/wexts.git"
|
|
92
|
+
},
|
|
93
|
+
"homepage": "https://github.com/ziadmustafa1/wexts#readme",
|
|
94
|
+
"bugs": {
|
|
95
|
+
"url": "https://github.com/ziadmustafa1/wexts/issues"
|
|
96
|
+
},
|
|
97
|
+
"engines": {
|
|
98
|
+
"node": ">=20.9.0",
|
|
99
|
+
"pnpm": ">=10.0.0"
|
|
100
|
+
},
|
|
101
|
+
"devDependencies": {
|
|
102
|
+
"@swc/core": "^1.15.32",
|
|
103
|
+
"@types/http-proxy": "^1.17.15",
|
|
104
|
+
"@types/node": "^22.19.1",
|
|
105
|
+
"@types/react": "^19.2.14",
|
|
106
|
+
"eslint": "^9.17.0",
|
|
107
|
+
"tsup": "^8.5.1",
|
|
108
|
+
"vite": "^6.4.2",
|
|
109
|
+
"vitest": "^4.1.5"
|
|
110
|
+
},
|
|
111
|
+
"dependencies": {
|
|
112
|
+
"@wexts/security": "^0.1.0",
|
|
113
|
+
"chokidar": "^4.0.3",
|
|
114
|
+
"commander": "^14.0.3",
|
|
115
|
+
"consola": "^3.2.3",
|
|
116
|
+
"fastify": "^5.8.5",
|
|
117
|
+
"http-proxy": "^1.18.1",
|
|
118
|
+
"picocolors": "^1.1.1",
|
|
119
|
+
"reflect-metadata": "^0.2.2",
|
|
120
|
+
"typescript": "^5.9.3"
|
|
121
|
+
},
|
|
122
|
+
"peerDependencies": {
|
|
123
|
+
"@nestjs/common": "^11.0.0",
|
|
124
|
+
"@nestjs/core": "^11.0.0",
|
|
125
|
+
"@nestjs/platform-fastify": "^11.0.0",
|
|
126
|
+
"next": "^16.2.4",
|
|
127
|
+
"react": "^19.2.5",
|
|
128
|
+
"react-dom": "^19.2.5"
|
|
129
|
+
},
|
|
130
|
+
"peerDependenciesMeta": {
|
|
131
|
+
"@nestjs/common": {
|
|
132
|
+
"optional": true
|
|
133
|
+
},
|
|
134
|
+
"@nestjs/core": {
|
|
135
|
+
"optional": true
|
|
136
|
+
},
|
|
137
|
+
"@nestjs/platform-fastify": {
|
|
138
|
+
"optional": true
|
|
139
|
+
},
|
|
140
|
+
"react": {
|
|
141
|
+
"optional": true
|
|
142
|
+
},
|
|
143
|
+
"react-dom": {
|
|
144
|
+
"optional": true
|
|
145
|
+
},
|
|
146
|
+
"next": {
|
|
147
|
+
"optional": true
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"publishConfig": {
|
|
151
|
+
"access": "public"
|
|
152
|
+
}
|
|
153
|
+
}
|
package/templates/.dockerignore
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
# Environment files
|
|
2
|
-
.env
|
|
3
|
-
.env.local
|
|
4
|
-
.env.*.local
|
|
5
|
-
|
|
6
|
-
# Node modules
|
|
7
|
-
node_modules
|
|
8
|
-
dist
|
|
9
|
-
build
|
|
10
|
-
.next
|
|
11
|
-
.turbo
|
|
12
|
-
|
|
13
|
-
# Database
|
|
14
|
-
*.db
|
|
15
|
-
*.db-journal
|
|
16
|
-
|
|
17
|
-
# Logs
|
|
18
|
-
*.log
|
|
19
|
-
npm-debug.log*
|
|
20
|
-
|
|
21
|
-
# OS
|
|
22
|
-
.DS_Store
|
|
23
|
-
Thumbs.db
|
|
24
|
-
|
|
25
|
-
# IDE
|
|
26
|
-
.vscode
|
|
27
|
-
.idea
|
|
28
|
-
*.swp
|
|
29
|
-
|
|
30
|
-
# Git
|
|
31
|
-
.git
|
|
32
|
-
.gitignore
|
|
33
|
-
|
|
34
|
-
# CI/CD
|
|
35
|
-
.github
|
|
36
|
-
|
|
37
|
-
# Documentation
|
|
38
|
-
*.md
|
|
39
|
-
!README.md
|
|
40
|
-
|
|
41
|
-
# Config files
|
|
42
|
-
.prettierrc
|
|
43
|
-
.eslintrc*
|
|
1
|
+
# Environment files
|
|
2
|
+
.env
|
|
3
|
+
.env.local
|
|
4
|
+
.env.*.local
|
|
5
|
+
|
|
6
|
+
# Node modules
|
|
7
|
+
node_modules
|
|
8
|
+
dist
|
|
9
|
+
build
|
|
10
|
+
.next
|
|
11
|
+
.turbo
|
|
12
|
+
|
|
13
|
+
# Database
|
|
14
|
+
*.db
|
|
15
|
+
*.db-journal
|
|
16
|
+
|
|
17
|
+
# Logs
|
|
18
|
+
*.log
|
|
19
|
+
npm-debug.log*
|
|
20
|
+
|
|
21
|
+
# OS
|
|
22
|
+
.DS_Store
|
|
23
|
+
Thumbs.db
|
|
24
|
+
|
|
25
|
+
# IDE
|
|
26
|
+
.vscode
|
|
27
|
+
.idea
|
|
28
|
+
*.swp
|
|
29
|
+
|
|
30
|
+
# Git
|
|
31
|
+
.git
|
|
32
|
+
.gitignore
|
|
33
|
+
|
|
34
|
+
# CI/CD
|
|
35
|
+
.github
|
|
36
|
+
|
|
37
|
+
# Documentation
|
|
38
|
+
*.md
|
|
39
|
+
!README.md
|
|
40
|
+
|
|
41
|
+
# Config files
|
|
42
|
+
.prettierrc
|
|
43
|
+
.eslintrc*
|
package/templates/.env.example
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# WEXTS Environment Variables
|
|
2
|
-
# Copy this file to .env and update values
|
|
3
|
-
|
|
4
|
-
# JWT Authentication
|
|
5
|
-
JWT_SECRET=your-super-secret-jwt-key-change-in-production
|
|
6
|
-
JWT_EXPIRES_IN=7d
|
|
7
|
-
|
|
8
|
-
# Database (Local Development - SQLite)
|
|
9
|
-
DATABASE_URL="file:./apps/api/dev.db"
|
|
10
|
-
|
|
11
|
-
# Database (Production - PostgreSQL)
|
|
12
|
-
# DATABASE_URL="postgresql://user:password@host:5432/dbname"
|
|
13
|
-
# DIRECT_URL="postgresql://user:password@host:5432/dbname"
|
|
14
|
-
|
|
15
|
-
# Server
|
|
16
|
-
PORT=3000
|
|
17
|
-
NODE_ENV=development
|
|
1
|
+
# WEXTS Environment Variables
|
|
2
|
+
# Copy this file to .env and update values
|
|
3
|
+
|
|
4
|
+
# JWT Authentication
|
|
5
|
+
JWT_SECRET=your-super-secret-jwt-key-change-in-production
|
|
6
|
+
JWT_EXPIRES_IN=7d
|
|
7
|
+
|
|
8
|
+
# Database (Local Development - SQLite)
|
|
9
|
+
DATABASE_URL="file:./apps/api/dev.db"
|
|
10
|
+
|
|
11
|
+
# Database (Production - PostgreSQL)
|
|
12
|
+
# DATABASE_URL="postgresql://user:password@host:5432/dbname"
|
|
13
|
+
# DIRECT_URL="postgresql://user:password@host:5432/dbname"
|
|
14
|
+
|
|
15
|
+
# Server
|
|
16
|
+
PORT=3000
|
|
17
|
+
NODE_ENV=development
|
package/templates/Dockerfile
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
# Stage 1: Build
|
|
2
|
-
FROM node:20-alpine AS builder
|
|
3
|
-
|
|
4
|
-
# Install pnpm
|
|
5
|
-
RUN npm install -g pnpm
|
|
6
|
-
|
|
7
|
-
# Set working directory
|
|
8
|
-
WORKDIR /app
|
|
9
|
-
|
|
10
|
-
# Copy package files
|
|
11
|
-
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
12
|
-
COPY apps/web/package.json ./apps/web/
|
|
13
|
-
COPY apps/api/package.json ./apps/api/
|
|
14
|
-
|
|
15
|
-
# Install dependencies
|
|
16
|
-
RUN pnpm install --frozen-lockfile
|
|
17
|
-
|
|
18
|
-
# Copy source code
|
|
19
|
-
COPY . .
|
|
20
|
-
|
|
21
|
-
# Generate Prisma Client
|
|
22
|
-
RUN cd apps/api && npx prisma generate
|
|
23
|
-
|
|
24
|
-
# Build all apps
|
|
25
|
-
RUN pnpm run build
|
|
26
|
-
|
|
27
|
-
# Stage 2: Production
|
|
28
|
-
FROM node:20-alpine AS runner
|
|
29
|
-
|
|
30
|
-
# Install pnpm
|
|
31
|
-
RUN npm install -g pnpm
|
|
32
|
-
|
|
33
|
-
WORKDIR /app
|
|
34
|
-
|
|
35
|
-
# Copy package files
|
|
36
|
-
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
37
|
-
COPY apps/web/package.json ./apps/web/
|
|
38
|
-
COPY apps/api/package.json ./apps/api/
|
|
39
|
-
|
|
40
|
-
# Install production dependencies only
|
|
41
|
-
RUN pnpm install --prod --frozen-lockfile
|
|
42
|
-
|
|
43
|
-
# Copy built files from builder
|
|
44
|
-
COPY --from=builder /app/dist ./dist
|
|
45
|
-
COPY --from=builder /app/apps/web/.next ./apps/web/.next
|
|
46
|
-
COPY --from=builder /app/apps/web/public ./apps/web/public
|
|
47
|
-
COPY --from=builder /app/apps/api/dist ./apps/api/dist
|
|
48
|
-
COPY --from=builder /app/apps/api/prisma ./apps/api/prisma
|
|
49
|
-
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
|
|
50
|
-
COPY --from=builder /app/server.ts ./server.ts
|
|
51
|
-
|
|
52
|
-
# Expose port
|
|
53
|
-
EXPOSE 3000
|
|
54
|
-
|
|
55
|
-
# Set environment
|
|
56
|
-
ENV NODE_ENV=production
|
|
57
|
-
ENV PORT=3000
|
|
58
|
-
|
|
59
|
-
# Start application
|
|
60
|
-
CMD ["node", "dist/server.js"]
|
|
1
|
+
# Stage 1: Build
|
|
2
|
+
FROM node:20-alpine AS builder
|
|
3
|
+
|
|
4
|
+
# Install pnpm
|
|
5
|
+
RUN npm install -g pnpm
|
|
6
|
+
|
|
7
|
+
# Set working directory
|
|
8
|
+
WORKDIR /app
|
|
9
|
+
|
|
10
|
+
# Copy package files
|
|
11
|
+
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
12
|
+
COPY apps/web/package.json ./apps/web/
|
|
13
|
+
COPY apps/api/package.json ./apps/api/
|
|
14
|
+
|
|
15
|
+
# Install dependencies
|
|
16
|
+
RUN pnpm install --frozen-lockfile
|
|
17
|
+
|
|
18
|
+
# Copy source code
|
|
19
|
+
COPY . .
|
|
20
|
+
|
|
21
|
+
# Generate Prisma Client
|
|
22
|
+
RUN cd apps/api && npx prisma generate
|
|
23
|
+
|
|
24
|
+
# Build all apps
|
|
25
|
+
RUN pnpm run build
|
|
26
|
+
|
|
27
|
+
# Stage 2: Production
|
|
28
|
+
FROM node:20-alpine AS runner
|
|
29
|
+
|
|
30
|
+
# Install pnpm
|
|
31
|
+
RUN npm install -g pnpm
|
|
32
|
+
|
|
33
|
+
WORKDIR /app
|
|
34
|
+
|
|
35
|
+
# Copy package files
|
|
36
|
+
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
37
|
+
COPY apps/web/package.json ./apps/web/
|
|
38
|
+
COPY apps/api/package.json ./apps/api/
|
|
39
|
+
|
|
40
|
+
# Install production dependencies only
|
|
41
|
+
RUN pnpm install --prod --frozen-lockfile
|
|
42
|
+
|
|
43
|
+
# Copy built files from builder
|
|
44
|
+
COPY --from=builder /app/dist ./dist
|
|
45
|
+
COPY --from=builder /app/apps/web/.next ./apps/web/.next
|
|
46
|
+
COPY --from=builder /app/apps/web/public ./apps/web/public
|
|
47
|
+
COPY --from=builder /app/apps/api/dist ./apps/api/dist
|
|
48
|
+
COPY --from=builder /app/apps/api/prisma ./apps/api/prisma
|
|
49
|
+
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
|
|
50
|
+
COPY --from=builder /app/server.ts ./server.ts
|
|
51
|
+
|
|
52
|
+
# Expose port
|
|
53
|
+
EXPOSE 3000
|
|
54
|
+
|
|
55
|
+
# Set environment
|
|
56
|
+
ENV NODE_ENV=production
|
|
57
|
+
ENV PORT=3000
|
|
58
|
+
|
|
59
|
+
# Start application
|
|
60
|
+
CMD ["node", "dist/server.js"]
|
package/templates/Procfile
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
web: pnpm start
|
|
1
|
+
web: pnpm start
|