create-fluxstack 1.4.1 → 1.5.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.
- package/.env.example +8 -1
- package/CRYPTO-AUTH-MIDDLEWARE-GUIDE.md +475 -0
- package/CRYPTO-AUTH-MIDDLEWARES.md +473 -0
- package/CRYPTO-AUTH-USAGE.md +491 -0
- package/EXEMPLO-ROTA-PROTEGIDA.md +347 -0
- package/QUICK-START-CRYPTO-AUTH.md +221 -0
- package/app/client/src/App.tsx +4 -1
- package/app/client/src/pages/CryptoAuthPage.tsx +394 -0
- package/app/server/index.ts +4 -0
- package/app/server/routes/crypto-auth-demo.routes.ts +167 -0
- package/app/server/routes/example-with-crypto-auth.routes.ts +235 -0
- package/app/server/routes/exemplo-posts.routes.ts +161 -0
- package/app/server/routes/index.ts +5 -1
- package/config/index.ts +9 -1
- package/core/cli/generators/plugin.ts +324 -34
- package/core/cli/generators/template-engine.ts +5 -0
- package/core/cli/plugin-discovery.ts +33 -12
- package/core/framework/server.ts +10 -0
- package/core/plugins/dependency-manager.ts +89 -22
- package/core/plugins/index.ts +4 -0
- package/core/plugins/manager.ts +3 -2
- package/core/plugins/module-resolver.ts +216 -0
- package/core/plugins/registry.ts +28 -1
- package/core/utils/logger/index.ts +4 -0
- package/fluxstack.config.ts +253 -114
- package/package.json +117 -117
- package/plugins/crypto-auth/README.md +722 -172
- package/plugins/crypto-auth/ai-context.md +1282 -0
- package/plugins/crypto-auth/cli/make-protected-route.command.ts +383 -0
- package/plugins/crypto-auth/client/CryptoAuthClient.ts +136 -159
- package/plugins/crypto-auth/client/components/AuthProvider.tsx +35 -94
- package/plugins/crypto-auth/client/components/LoginButton.tsx +36 -53
- package/plugins/crypto-auth/client/components/ProtectedRoute.tsx +17 -37
- package/plugins/crypto-auth/client/components/index.ts +1 -4
- package/plugins/crypto-auth/client/index.ts +1 -1
- package/plugins/crypto-auth/config/index.ts +34 -0
- package/plugins/crypto-auth/index.ts +84 -152
- package/plugins/crypto-auth/package.json +65 -64
- package/plugins/crypto-auth/server/AuthMiddleware.ts +19 -75
- package/plugins/crypto-auth/server/CryptoAuthService.ts +60 -167
- package/plugins/crypto-auth/server/index.ts +15 -2
- package/plugins/crypto-auth/server/middlewares/cryptoAuthAdmin.ts +65 -0
- package/plugins/crypto-auth/server/middlewares/cryptoAuthOptional.ts +26 -0
- package/plugins/crypto-auth/server/middlewares/cryptoAuthPermissions.ts +76 -0
- package/plugins/crypto-auth/server/middlewares/cryptoAuthRequired.ts +45 -0
- package/plugins/crypto-auth/server/middlewares/helpers.ts +140 -0
- package/plugins/crypto-auth/server/middlewares/index.ts +22 -0
- package/plugins/crypto-auth/server/middlewares.ts +19 -0
- package/test-crypto-auth.ts +101 -0
- package/plugins/crypto-auth/client/components/SessionInfo.tsx +0 -242
- package/plugins/crypto-auth/plugin.json +0 -29
package/package.json
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "create-fluxstack",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "⚡ Revolutionary full-stack TypeScript framework with Declarative Config System, Elysia + React + Bun",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"framework",
|
|
7
|
-
"full-stack",
|
|
8
|
-
"typescript",
|
|
9
|
-
"elysia",
|
|
10
|
-
"react",
|
|
11
|
-
"bun",
|
|
12
|
-
"vite"
|
|
13
|
-
],
|
|
14
|
-
"author": "FluxStack Team",
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"homepage": "https://github.com/MarcosBrendonDePaula/FluxStack",
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/MarcosBrendonDePaula/FluxStack.git"
|
|
20
|
-
},
|
|
21
|
-
"module": "app/server/index.ts",
|
|
22
|
-
"type": "module",
|
|
23
|
-
"bin": {
|
|
24
|
-
"create-fluxstack": "create-fluxstack.ts"
|
|
25
|
-
},
|
|
26
|
-
"scripts": {
|
|
27
|
-
"dev": "bun run core/cli/index.ts dev",
|
|
28
|
-
"dev:frontend": "bun run core/cli/index.ts frontend",
|
|
29
|
-
"dev:backend": "bun run core/cli/index.ts backend",
|
|
30
|
-
"dev:coordinated": "concurrently --prefix {name} --names BACKEND,VITE --prefix-colors blue,green --kill-others-on-fail \"bun --watch app/server/index.ts\" \"vite --config vite.config.ts\"",
|
|
31
|
-
"dev:clean": "bun run run-clean.ts",
|
|
32
|
-
"build": "cross-env NODE_ENV=production bun run core/cli/index.ts build",
|
|
33
|
-
"build:frontend": "vite build --config vite.config.ts --emptyOutDir",
|
|
34
|
-
"build:backend": "bun run core/cli/index.ts build:backend",
|
|
35
|
-
"start": "bun run core/cli/index.ts start",
|
|
36
|
-
"start:frontend": "bun run app/client/frontend-only.ts",
|
|
37
|
-
"start:backend": "bun run app/server/backend-only.ts",
|
|
38
|
-
"docker:build": "cd dist && docker build -t fluxstack-app .",
|
|
39
|
-
"docker:run": "cd dist && docker run -p 3000:3000 fluxstack-app",
|
|
40
|
-
"docker:compose": "cd dist && docker-compose up -d",
|
|
41
|
-
"docker:stop": "cd dist && docker-compose down",
|
|
42
|
-
"create": "bun run core/cli/index.ts create",
|
|
43
|
-
"cli": "bun run core/cli/index.ts",
|
|
44
|
-
"make:component": "bun run core/cli/index.ts make:component",
|
|
45
|
-
"make:live": "bun run core/cli/index.ts make:component",
|
|
46
|
-
"test": "vitest",
|
|
47
|
-
"test:ui": "vitest --ui",
|
|
48
|
-
"test:run": "vitest run",
|
|
49
|
-
"test:coverage": "vitest run --coverage",
|
|
50
|
-
"test:watch": "vitest --watch",
|
|
51
|
-
"test:live": "tsx scripts/test-live-components.ts",
|
|
52
|
-
"test:live:coverage": "tsx scripts/test-live-components.ts --coverage",
|
|
53
|
-
"test:live:watch": "tsx scripts/test-live-components.ts --watch",
|
|
54
|
-
"test:live:verbose": "tsx scripts/test-live-components.ts --verbose",
|
|
55
|
-
"test:config": "bun run core/config/__tests__/run-tests.ts",
|
|
56
|
-
"test:config:coverage": "bun run core/config/__tests__/run-tests.ts coverage",
|
|
57
|
-
"test:config:manual": "bun run core/config/__tests__/manual-test.ts",
|
|
58
|
-
"legacy:dev": "bun --watch app/server/index.ts"
|
|
59
|
-
},
|
|
60
|
-
"devDependencies": {
|
|
61
|
-
"@eslint/js": "^9.30.1",
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@testing-library/
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@types/
|
|
69
|
-
"@types/
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"eslint
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"@
|
|
90
|
-
"@
|
|
91
|
-
"@types/http-proxy-middleware": "^1.0.0",
|
|
92
|
-
"@types/ws": "^8.18.1",
|
|
93
|
-
"@vitejs/plugin-react": "^4.6.0",
|
|
94
|
-
"chalk": "^5.3.0",
|
|
95
|
-
"chokidar": "^4.0.3",
|
|
96
|
-
"commander": "^12.1.0",
|
|
97
|
-
"elysia": "^1.4.6",
|
|
98
|
-
"http-proxy-middleware": "^3.0.5",
|
|
99
|
-
"lightningcss": "^1.30.1",
|
|
100
|
-
"lucide-react": "^0.544.0",
|
|
101
|
-
"ora": "^8.1.0",
|
|
102
|
-
"react": "^19.1.0",
|
|
103
|
-
"react-dom": "^19.1.0",
|
|
104
|
-
"react-icons": "^5.5.0",
|
|
105
|
-
"react-router-dom": "^7.9.3",
|
|
106
|
-
"uuid": "^13.0.0",
|
|
107
|
-
"vite": "^7.1.7",
|
|
108
|
-
"winston": "^3.18.3",
|
|
109
|
-
"winston-daily-rotate-file": "^5.0.0",
|
|
110
|
-
"ws": "^8.18.3",
|
|
111
|
-
"zustand": "^5.0.8"
|
|
112
|
-
},
|
|
113
|
-
"engines": {
|
|
114
|
-
"bun": ">=1.2.0"
|
|
115
|
-
},
|
|
116
|
-
"preferredPackageManager": "bun"
|
|
117
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "create-fluxstack",
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "⚡ Revolutionary full-stack TypeScript framework with Declarative Config System, Elysia + React + Bun",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"framework",
|
|
7
|
+
"full-stack",
|
|
8
|
+
"typescript",
|
|
9
|
+
"elysia",
|
|
10
|
+
"react",
|
|
11
|
+
"bun",
|
|
12
|
+
"vite"
|
|
13
|
+
],
|
|
14
|
+
"author": "FluxStack Team",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"homepage": "https://github.com/MarcosBrendonDePaula/FluxStack",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/MarcosBrendonDePaula/FluxStack.git"
|
|
20
|
+
},
|
|
21
|
+
"module": "app/server/index.ts",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"bin": {
|
|
24
|
+
"create-fluxstack": "create-fluxstack.ts"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"dev": "bun run core/cli/index.ts dev",
|
|
28
|
+
"dev:frontend": "bun run core/cli/index.ts frontend",
|
|
29
|
+
"dev:backend": "bun run core/cli/index.ts backend",
|
|
30
|
+
"dev:coordinated": "concurrently --prefix {name} --names BACKEND,VITE --prefix-colors blue,green --kill-others-on-fail \"bun --watch app/server/index.ts\" \"vite --config vite.config.ts\"",
|
|
31
|
+
"dev:clean": "bun run run-clean.ts",
|
|
32
|
+
"build": "cross-env NODE_ENV=production bun run core/cli/index.ts build",
|
|
33
|
+
"build:frontend": "vite build --config vite.config.ts --emptyOutDir",
|
|
34
|
+
"build:backend": "bun run core/cli/index.ts build:backend",
|
|
35
|
+
"start": "bun run core/cli/index.ts start",
|
|
36
|
+
"start:frontend": "bun run app/client/frontend-only.ts",
|
|
37
|
+
"start:backend": "bun run app/server/backend-only.ts",
|
|
38
|
+
"docker:build": "cd dist && docker build -t fluxstack-app .",
|
|
39
|
+
"docker:run": "cd dist && docker run -p 3000:3000 fluxstack-app",
|
|
40
|
+
"docker:compose": "cd dist && docker-compose up -d",
|
|
41
|
+
"docker:stop": "cd dist && docker-compose down",
|
|
42
|
+
"create": "bun run core/cli/index.ts create",
|
|
43
|
+
"cli": "bun run core/cli/index.ts",
|
|
44
|
+
"make:component": "bun run core/cli/index.ts make:component",
|
|
45
|
+
"make:live": "bun run core/cli/index.ts make:component",
|
|
46
|
+
"test": "vitest",
|
|
47
|
+
"test:ui": "vitest --ui",
|
|
48
|
+
"test:run": "vitest run",
|
|
49
|
+
"test:coverage": "vitest run --coverage",
|
|
50
|
+
"test:watch": "vitest --watch",
|
|
51
|
+
"test:live": "tsx scripts/test-live-components.ts",
|
|
52
|
+
"test:live:coverage": "tsx scripts/test-live-components.ts --coverage",
|
|
53
|
+
"test:live:watch": "tsx scripts/test-live-components.ts --watch",
|
|
54
|
+
"test:live:verbose": "tsx scripts/test-live-components.ts --verbose",
|
|
55
|
+
"test:config": "bun run core/config/__tests__/run-tests.ts",
|
|
56
|
+
"test:config:coverage": "bun run core/config/__tests__/run-tests.ts coverage",
|
|
57
|
+
"test:config:manual": "bun run core/config/__tests__/manual-test.ts",
|
|
58
|
+
"legacy:dev": "bun --watch app/server/index.ts"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@eslint/js": "^9.30.1",
|
|
62
|
+
"@noble/curves": "1.2.0",
|
|
63
|
+
"@noble/hashes": "1.3.2",
|
|
64
|
+
"@tailwindcss/vite": "^4.1.13",
|
|
65
|
+
"@testing-library/jest-dom": "^6.6.4",
|
|
66
|
+
"@testing-library/react": "^16.3.0",
|
|
67
|
+
"@testing-library/user-event": "^14.6.1",
|
|
68
|
+
"@types/bun": "latest",
|
|
69
|
+
"@types/node": "^24.5.2",
|
|
70
|
+
"@types/react": "^19.1.8",
|
|
71
|
+
"@types/react-dom": "^19.1.6",
|
|
72
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
73
|
+
"@vitest/ui": "^3.2.4",
|
|
74
|
+
"concurrently": "^9.2.0",
|
|
75
|
+
"cross-env": "^10.1.0",
|
|
76
|
+
"eslint": "^9.30.1",
|
|
77
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
78
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
79
|
+
"globals": "^16.3.0",
|
|
80
|
+
"jsdom": "^26.1.0",
|
|
81
|
+
"rollup": "4.20.0",
|
|
82
|
+
"tailwindcss": "^4.1.13",
|
|
83
|
+
"typescript": "^5.8.3",
|
|
84
|
+
"typescript-eslint": "^8.35.1",
|
|
85
|
+
"vite-plugin-node-polyfills": "^0.24.0",
|
|
86
|
+
"vitest": "^3.2.4"
|
|
87
|
+
},
|
|
88
|
+
"dependencies": {
|
|
89
|
+
"@elysiajs/eden": "^1.3.2",
|
|
90
|
+
"@elysiajs/swagger": "^1.3.1",
|
|
91
|
+
"@types/http-proxy-middleware": "^1.0.0",
|
|
92
|
+
"@types/ws": "^8.18.1",
|
|
93
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
94
|
+
"chalk": "^5.3.0",
|
|
95
|
+
"chokidar": "^4.0.3",
|
|
96
|
+
"commander": "^12.1.0",
|
|
97
|
+
"elysia": "^1.4.6",
|
|
98
|
+
"http-proxy-middleware": "^3.0.5",
|
|
99
|
+
"lightningcss": "^1.30.1",
|
|
100
|
+
"lucide-react": "^0.544.0",
|
|
101
|
+
"ora": "^8.1.0",
|
|
102
|
+
"react": "^19.1.0",
|
|
103
|
+
"react-dom": "^19.1.0",
|
|
104
|
+
"react-icons": "^5.5.0",
|
|
105
|
+
"react-router-dom": "^7.9.3",
|
|
106
|
+
"uuid": "^13.0.0",
|
|
107
|
+
"vite": "^7.1.7",
|
|
108
|
+
"winston": "^3.18.3",
|
|
109
|
+
"winston-daily-rotate-file": "^5.0.0",
|
|
110
|
+
"ws": "^8.18.3",
|
|
111
|
+
"zustand": "^5.0.8"
|
|
112
|
+
},
|
|
113
|
+
"engines": {
|
|
114
|
+
"bun": ">=1.2.0"
|
|
115
|
+
},
|
|
116
|
+
"preferredPackageManager": "bun"
|
|
117
|
+
}
|