create-fluxstack 1.12.0 โ 1.13.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/LLMD/INDEX.md +8 -1
- package/LLMD/agent.md +867 -0
- package/LLMD/config/environment-vars.md +30 -0
- package/LLMD/resources/live-auth.md +447 -0
- package/LLMD/resources/live-components.md +79 -21
- package/LLMD/resources/live-logging.md +158 -0
- package/LLMD/resources/live-upload.md +1 -1
- package/LLMD/resources/rest-auth.md +290 -0
- package/README.md +520 -340
- package/app/client/src/App.tsx +11 -0
- package/app/client/src/components/AppLayout.tsx +1 -0
- package/app/client/src/live/AuthDemo.tsx +332 -0
- package/app/client/src/live/RoomChatDemo.tsx +24 -105
- package/app/server/auth/AuthManager.ts +213 -0
- package/app/server/auth/DevAuthProvider.ts +66 -0
- package/app/server/auth/HashManager.ts +123 -0
- package/app/server/auth/JWTAuthProvider.example.ts +101 -0
- package/app/server/auth/RateLimiter.ts +106 -0
- package/app/server/auth/contracts.ts +192 -0
- package/app/server/auth/guards/SessionGuard.ts +167 -0
- package/app/server/auth/guards/TokenGuard.ts +202 -0
- package/app/server/auth/index.ts +174 -0
- package/app/server/auth/middleware.ts +163 -0
- package/app/server/auth/providers/InMemoryProvider.ts +162 -0
- package/app/server/auth/sessions/SessionManager.ts +164 -0
- package/app/server/cache/CacheManager.ts +81 -0
- package/app/server/cache/MemoryDriver.ts +112 -0
- package/app/server/cache/contracts.ts +49 -0
- package/app/server/cache/index.ts +42 -0
- package/app/server/index.ts +14 -0
- package/app/server/live/LiveAdminPanel.ts +173 -0
- package/app/server/live/LiveCounter.ts +1 -0
- package/app/server/live/LiveLocalCounter.ts +13 -8
- package/app/server/live/LiveProtectedChat.ts +150 -0
- package/app/server/live/LiveRoomChat.ts +45 -203
- package/app/server/routes/auth.routes.ts +278 -0
- package/app/server/routes/index.ts +2 -0
- package/config/index.ts +8 -0
- package/config/system/auth.config.ts +49 -0
- package/config/system/session.config.ts +33 -0
- package/core/client/LiveComponentsProvider.tsx +76 -5
- package/core/client/components/Live.tsx +2 -1
- package/core/client/hooks/useLiveComponent.ts +47 -4
- package/core/client/index.ts +2 -1
- package/core/framework/server.ts +36 -4
- package/core/plugins/built-in/live-components/commands/create-live-component.ts +15 -8
- package/core/plugins/built-in/monitoring/index.ts +10 -3
- package/core/plugins/built-in/vite/index.ts +95 -18
- package/core/plugins/config.ts +5 -4
- package/core/plugins/discovery.ts +11 -2
- package/core/plugins/manager.ts +11 -5
- package/core/plugins/module-resolver.ts +1 -1
- package/core/plugins/registry.ts +53 -25
- package/core/server/live/ComponentRegistry.ts +79 -24
- package/core/server/live/LiveComponentPerformanceMonitor.ts +9 -8
- package/core/server/live/LiveLogger.ts +111 -0
- package/core/server/live/LiveRoomManager.ts +5 -4
- package/core/server/live/StateSignature.ts +644 -643
- package/core/server/live/auth/LiveAuthContext.ts +71 -0
- package/core/server/live/auth/LiveAuthManager.ts +304 -0
- package/core/server/live/auth/index.ts +19 -0
- package/core/server/live/auth/types.ts +179 -0
- package/core/server/live/auto-generated-components.ts +8 -2
- package/core/server/live/index.ts +16 -0
- package/core/server/live/websocket-plugin.ts +92 -16
- package/core/templates/create-project.ts +0 -3
- package/core/types/types.ts +133 -13
- package/core/utils/index.ts +17 -17
- package/core/utils/logger/index.ts +5 -2
- package/core/utils/version.ts +1 -1
- package/package.json +1 -8
- package/plugins/crypto-auth/index.ts +6 -0
- package/plugins/crypto-auth/server/CryptoAuthLiveProvider.ts +58 -0
- package/plugins/crypto-auth/server/index.ts +24 -21
- package/rest-tests/README.md +57 -0
- package/rest-tests/auth-token.http +113 -0
- package/rest-tests/auth.http +112 -0
- package/rest-tests/rooms-token.http +69 -0
- package/rest-tests/users-token.http +62 -0
- package/.dockerignore +0 -81
- package/Dockerfile +0 -70
- package/LIVE_COMPONENTS_REVIEW.md +0 -781
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# โก FluxStack
|
|
4
4
|
|
|
5
|
-
### The
|
|
5
|
+
### The Full-Stack TypeScript Framework for Real-Time Apps
|
|
6
6
|
|
|
7
7
|
*Build modern web apps with Bun, Elysia, React, and Eden Treaty*
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://www.typescriptlang.org/)
|
|
13
13
|
[](https://reactjs.org/)
|
|
14
14
|
|
|
15
|
-
[Quick Start](#-quick-start) โข [Features](#-key-features) โข [
|
|
15
|
+
[Quick Start](#-quick-start) โข [Features](#-key-features) โข [Live Components](#-live-components) โข [Documentation](#-documentation--support)
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
@@ -42,18 +42,19 @@
|
|
|
42
42
|
<tr>
|
|
43
43
|
<td width="50%">
|
|
44
44
|
|
|
45
|
-
###
|
|
46
|
-
- **
|
|
47
|
-
- **
|
|
48
|
-
- **
|
|
45
|
+
### โก **Live Components**
|
|
46
|
+
- **WebSocket Sync** - Real-time state synchronization
|
|
47
|
+
- **Reactive Proxy** - `this.state.count++` auto-syncs
|
|
48
|
+
- **Room System** - Multi-room real-time communication
|
|
49
|
+
- **Auth System** - Declarative RBAC for components
|
|
49
50
|
|
|
50
51
|
</td>
|
|
51
52
|
<td width="50%">
|
|
52
53
|
|
|
53
54
|
### ๐ฏ **Production Ready**
|
|
54
55
|
- **Docker Multi-Stage** - Optimized containers
|
|
55
|
-
- **Declarative Config** -
|
|
56
|
-
- **
|
|
56
|
+
- **Declarative Config** - Laravel-inspired config system
|
|
57
|
+
- **Plugin Security** - Whitelist-based NPM plugin safety
|
|
57
58
|
|
|
58
59
|
</td>
|
|
59
60
|
</tr>
|
|
@@ -61,35 +62,23 @@
|
|
|
61
62
|
|
|
62
63
|
---
|
|
63
64
|
|
|
64
|
-
## ๐ Quick Start
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
# Create a new FluxStack app
|
|
68
|
-
bunx create-fluxstack my-awesome-app
|
|
69
|
-
cd my-awesome-app
|
|
70
|
-
bun run dev
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**That's it!** Your full-stack app is running
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Default routes in the demo app:
|
|
82
|
-
|
|
83
|
-
- `/` Home
|
|
84
|
-
- `/counter` Live Counter
|
|
85
|
-
- `/form` Live Form
|
|
86
|
-
- `/upload` Live Upload
|
|
87
|
-
- `/api-test` Eden Treaty API Test
|
|
88
|
-
|
|
89
|
-
### ๐งญ Router Package
|
|
90
|
-
|
|
91
|
-
This project now uses **React Router v7** via the `react-router` package (recommended by the v7 docs).
|
|
92
|
-
If you are upgrading from an older setup that used `react-router-dom`, update imports to `react-router`.
|
|
65
|
+
## ๐ Quick Start
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Create a new FluxStack app
|
|
69
|
+
bunx create-fluxstack my-awesome-app
|
|
70
|
+
cd my-awesome-app
|
|
71
|
+
bun run dev
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**That's it!** Your full-stack app is running:
|
|
75
|
+
|
|
76
|
+
| Service | URL |
|
|
77
|
+
|---------|-----|
|
|
78
|
+
| ๐ **Frontend** | http://localhost:5173 |
|
|
79
|
+
| โ๏ธ **Backend API** | http://localhost:3000 |
|
|
80
|
+
| ๐ **Swagger Docs** | http://localhost:3000/swagger |
|
|
81
|
+
| ๐ฉบ **Health Check** | http://localhost:3000/api/health |
|
|
93
82
|
|
|
94
83
|
### Alternative Installation
|
|
95
84
|
|
|
@@ -102,36 +91,68 @@ bun run dev
|
|
|
102
91
|
|
|
103
92
|
---
|
|
104
93
|
|
|
105
|
-
## ๐
|
|
94
|
+
## ๐ Tech Stack
|
|
106
95
|
|
|
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
|
-
</
|
|
96
|
+
<table>
|
|
97
|
+
<tr>
|
|
98
|
+
<td align="center" width="12.5%">
|
|
99
|
+
<br>
|
|
100
|
+
<img src="https://img.shields.io/badge/Bun-000?style=for-the-badge&logo=bun&logoColor=white" alt="Bun">
|
|
101
|
+
<br><b>Runtime</b><br>
|
|
102
|
+
<sub>Bun >= 1.2</sub>
|
|
103
|
+
<br><br>
|
|
104
|
+
</td>
|
|
105
|
+
<td align="center" width="12.5%">
|
|
106
|
+
<br>
|
|
107
|
+
<img src="https://img.shields.io/badge/Elysia-7c3aed?style=for-the-badge&logoColor=white" alt="Elysia">
|
|
108
|
+
<br><b>Backend</b><br>
|
|
109
|
+
<sub>Elysia.js 1.4</sub>
|
|
110
|
+
<br><br>
|
|
111
|
+
</td>
|
|
112
|
+
<td align="center" width="12.5%">
|
|
113
|
+
<br>
|
|
114
|
+
<img src="https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB" alt="React">
|
|
115
|
+
<br><b>Frontend</b><br>
|
|
116
|
+
<sub>React 19</sub>
|
|
117
|
+
<br><br>
|
|
118
|
+
</td>
|
|
119
|
+
<td align="center" width="12.5%">
|
|
120
|
+
<br>
|
|
121
|
+
<img src="https://img.shields.io/badge/Vite-646CFF?style=for-the-badge&logo=vite&logoColor=white" alt="Vite">
|
|
122
|
+
<br><b>Build</b><br>
|
|
123
|
+
<sub>Vite 7</sub>
|
|
124
|
+
<br><br>
|
|
125
|
+
</td>
|
|
126
|
+
<td align="center" width="12.5%">
|
|
127
|
+
<br>
|
|
128
|
+
<img src="https://img.shields.io/badge/Tailwind-06B6D4?style=for-the-badge&logo=tailwindcss&logoColor=white" alt="Tailwind">
|
|
129
|
+
<br><b>Styling</b><br>
|
|
130
|
+
<sub>Tailwind CSS 4</sub>
|
|
131
|
+
<br><br>
|
|
132
|
+
</td>
|
|
133
|
+
<td align="center" width="12.5%">
|
|
134
|
+
<br>
|
|
135
|
+
<img src="https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript">
|
|
136
|
+
<br><b>Language</b><br>
|
|
137
|
+
<sub>TypeScript 5.8</sub>
|
|
138
|
+
<br><br>
|
|
139
|
+
</td>
|
|
140
|
+
<td align="center" width="12.5%">
|
|
141
|
+
<br>
|
|
142
|
+
<img src="https://img.shields.io/badge/Eden-7c3aed?style=for-the-badge&logoColor=white" alt="Eden Treaty">
|
|
143
|
+
<br><b>API Client</b><br>
|
|
144
|
+
<sub>Eden Treaty 1.3</sub>
|
|
145
|
+
<br><br>
|
|
146
|
+
</td>
|
|
147
|
+
<td align="center" width="12.5%">
|
|
148
|
+
<br>
|
|
149
|
+
<img src="https://img.shields.io/badge/Vitest-6E9F18?style=for-the-badge&logo=vitest&logoColor=white" alt="Vitest">
|
|
150
|
+
<br><b>Testing</b><br>
|
|
151
|
+
<sub>Vitest 3</sub>
|
|
152
|
+
<br><br>
|
|
153
|
+
</td>
|
|
154
|
+
</tr>
|
|
155
|
+
</table>
|
|
135
156
|
|
|
136
157
|
---
|
|
137
158
|
|
|
@@ -143,33 +164,29 @@ bun run dev
|
|
|
143
164
|
graph TB
|
|
144
165
|
subgraph "๐จ Frontend Layer"
|
|
145
166
|
React[React 19 + Vite]
|
|
146
|
-
|
|
147
|
-
|
|
167
|
+
LiveClient[Live Components Client]
|
|
168
|
+
Eden[Eden Treaty]
|
|
148
169
|
end
|
|
149
170
|
|
|
150
|
-
subgraph "๐ Communication
|
|
151
|
-
|
|
152
|
-
WS[
|
|
171
|
+
subgraph "๐ Communication"
|
|
172
|
+
HTTP[HTTP / REST]
|
|
173
|
+
WS[WebSocket]
|
|
153
174
|
end
|
|
154
175
|
|
|
155
176
|
subgraph "โ๏ธ Backend Layer"
|
|
156
177
|
Elysia[Elysia.js]
|
|
157
178
|
Routes[API Routes]
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
subgraph "๐๏ธ Data Layer"
|
|
162
|
-
DB[(Your Database)]
|
|
163
|
-
Cache[(Cache)]
|
|
179
|
+
LiveServer[Live Components Server]
|
|
180
|
+
Rooms[Room System]
|
|
164
181
|
end
|
|
165
182
|
|
|
166
183
|
React --> Eden
|
|
167
|
-
Eden -->
|
|
184
|
+
Eden --> HTTP
|
|
185
|
+
HTTP --> Elysia
|
|
168
186
|
Elysia --> Routes
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
WS --> Elysia
|
|
187
|
+
LiveClient --> WS
|
|
188
|
+
WS --> LiveServer
|
|
189
|
+
LiveServer --> Rooms
|
|
173
190
|
```
|
|
174
191
|
|
|
175
192
|
</div>
|
|
@@ -183,119 +200,277 @@ graph TB
|
|
|
183
200
|
FluxStack/
|
|
184
201
|
โโโ ๐ core/ # Framework Core (Read-Only)
|
|
185
202
|
โ โโโ framework/ # FluxStack orchestrator
|
|
186
|
-
โ โโโ
|
|
187
|
-
โ โโโ
|
|
203
|
+
โ โโโ server/ # Elysia plugins, middleware, live engine
|
|
204
|
+
โ โโโ client/ # Vite integration, Live hooks, providers
|
|
188
205
|
โ โโโ cli/ # CLI commands & generators
|
|
189
|
-
โ โโโ
|
|
190
|
-
โ
|
|
206
|
+
โ โโโ plugins/ # Built-in plugins (Swagger, Vite, etc.)
|
|
207
|
+
โ โโโ types/ # Framework type definitions
|
|
208
|
+
โ โโโ utils/ # Logger, config schema, errors
|
|
191
209
|
โ
|
|
192
210
|
โโโ ๐จโ๐ป app/ # Your Application Code
|
|
193
211
|
โ โโโ server/ # Backend (Elysia + Bun)
|
|
194
212
|
โ โ โโโ controllers/ # Business logic
|
|
195
213
|
โ โ โโโ routes/ # API endpoints + schemas
|
|
196
|
-
โ โ โโโ
|
|
197
|
-
โ โ โโโ
|
|
214
|
+
โ โ โโโ live/ # Live Components (server-side)
|
|
215
|
+
โ โ โโโ app.ts # Elysia app instance (Eden Treaty export)
|
|
198
216
|
โ โ
|
|
199
217
|
โ โโโ client/ # Frontend (React + Vite)
|
|
200
|
-
โ โ
|
|
201
|
-
โ โ
|
|
202
|
-
โ โ
|
|
203
|
-
โ โ
|
|
204
|
-
โ โ
|
|
205
|
-
โ โ โโโ public/ # Static assets
|
|
218
|
+
โ โ โโโ src/
|
|
219
|
+
โ โ โโโ components/ # React components
|
|
220
|
+
โ โ โโโ pages/ # Route pages
|
|
221
|
+
โ โ โโโ live/ # Live Components (client-side)
|
|
222
|
+
โ โ โโโ lib/ # Eden Treaty client
|
|
206
223
|
โ โ
|
|
207
|
-
โ โโโ shared/ # Shared
|
|
224
|
+
โ โโโ shared/ # Shared type definitions
|
|
208
225
|
โ
|
|
209
|
-
โโโ โ๏ธ config/ #
|
|
210
|
-
โ โโโ
|
|
211
|
-
โ โโโ
|
|
212
|
-
โ
|
|
213
|
-
โ โโโ database.config.ts # Database
|
|
214
|
-
โ
|
|
215
|
-
โโโ ๐ plugins/ # External Plugins
|
|
216
|
-
โ โโโ crypto-auth/ # Example: Crypto authentication
|
|
226
|
+
โโโ โ๏ธ config/ # Declarative Configuration
|
|
227
|
+
โ โโโ system/ # Config files (app, server, db, logger, etc.)
|
|
228
|
+
โ โโโ fluxstack.config.ts # FluxStack config
|
|
229
|
+
โ โโโ index.ts # Centralized exports
|
|
217
230
|
โ
|
|
231
|
+
โโโ ๐ plugins/ # Project Plugins (auto-discovered)
|
|
232
|
+
โโโ ๐งช tests/ # Test suite (unit + integration)
|
|
218
233
|
โโโ ๐ค LLMD/ # LLM-Optimized Documentation
|
|
219
|
-
|
|
220
|
-
โ โโโ core/ # Framework internals
|
|
221
|
-
โ โโโ config/ # Configuration system
|
|
222
|
-
โ โโโ resources/ # Creating routes, controllers
|
|
223
|
-
โ โโโ patterns/ # Best practices
|
|
224
|
-
โ โโโ reference/ # CLI, hooks, troubleshooting
|
|
225
|
-
โ
|
|
226
|
-
โโโ ๐ฆ Package Files
|
|
227
|
-
โโโ package.json # Dependencies
|
|
228
|
-
โโโ tsconfig.json # TypeScript config
|
|
229
|
-
โโโ README.md # This file
|
|
234
|
+
โโโ ๐ณ Dockerfile # Multi-stage production build
|
|
230
235
|
```
|
|
231
236
|
|
|
232
237
|
</details>
|
|
233
238
|
|
|
234
239
|
---
|
|
235
240
|
|
|
236
|
-
##
|
|
241
|
+
## โก Live Components
|
|
242
|
+
|
|
243
|
+
Real-time WebSocket components with **automatic state synchronization** between server and client. Define state and logic on the server, interact with it from React โ updates sync instantly via WebSocket.
|
|
237
244
|
|
|
238
245
|
<table>
|
|
239
246
|
<tr>
|
|
240
247
|
<td width="50%">
|
|
241
248
|
|
|
242
|
-
###
|
|
249
|
+
### ๐ฅ๏ธ Server Side
|
|
243
250
|
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
```typescript
|
|
252
|
+
// app/server/live/LiveCounter.ts
|
|
253
|
+
import { LiveComponent } from '@/core/server'
|
|
254
|
+
|
|
255
|
+
export class LiveCounter extends LiveComponent<{
|
|
256
|
+
count: number
|
|
257
|
+
}> {
|
|
258
|
+
static defaultState = { count: 0 }
|
|
259
|
+
|
|
260
|
+
async increment() {
|
|
261
|
+
this.state.count++ // auto-syncs via Proxy
|
|
262
|
+
return { success: true }
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
async decrement() {
|
|
266
|
+
this.state.count--
|
|
267
|
+
return { success: true }
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
async reset() {
|
|
271
|
+
this.state.count = 0
|
|
272
|
+
return { success: true }
|
|
273
|
+
}
|
|
274
|
+
}
|
|
253
275
|
```
|
|
254
276
|
|
|
255
277
|
</td>
|
|
256
278
|
<td width="50%">
|
|
257
279
|
|
|
258
|
-
###
|
|
280
|
+
### โ๏ธ Client Side
|
|
259
281
|
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
|
|
282
|
+
```tsx
|
|
283
|
+
// app/client/src/live/CounterDemo.tsx
|
|
284
|
+
import { Live } from '@/core/client'
|
|
285
|
+
import { LiveCounter } from '@server/live/LiveCounter'
|
|
263
286
|
|
|
264
|
-
|
|
265
|
-
|
|
287
|
+
export function CounterDemo() {
|
|
288
|
+
const counter = Live.use(LiveCounter, {
|
|
289
|
+
room: 'global-counter',
|
|
290
|
+
initialState: LiveCounter.defaultState
|
|
291
|
+
})
|
|
292
|
+
|
|
293
|
+
return (
|
|
294
|
+
<div>
|
|
295
|
+
<span>{counter.$state.count}</span>
|
|
296
|
+
|
|
297
|
+
<button
|
|
298
|
+
onClick={() => counter.increment()}
|
|
299
|
+
disabled={counter.$loading}
|
|
300
|
+
>
|
|
301
|
+
+
|
|
302
|
+
</button>
|
|
303
|
+
|
|
304
|
+
<button onClick={() => counter.decrement()}>
|
|
305
|
+
-
|
|
306
|
+
</button>
|
|
307
|
+
|
|
308
|
+
<span>
|
|
309
|
+
{counter.$connected ? '๐ข' : '๐ด'}
|
|
310
|
+
</span>
|
|
311
|
+
</div>
|
|
312
|
+
)
|
|
313
|
+
}
|
|
266
314
|
```
|
|
267
315
|
|
|
268
316
|
</td>
|
|
269
317
|
</tr>
|
|
318
|
+
</table>
|
|
319
|
+
|
|
320
|
+
### ๐ Client Proxy API
|
|
321
|
+
|
|
322
|
+
The `Live.use()` hook returns a Proxy object with full access to server state and actions:
|
|
323
|
+
|
|
324
|
+
```typescript
|
|
325
|
+
const component = Live.use(MyComponent)
|
|
326
|
+
|
|
327
|
+
// State access
|
|
328
|
+
component.$state // Full state object
|
|
329
|
+
component.myProp // Direct property access via Proxy
|
|
330
|
+
component.$connected // Boolean - WebSocket connected?
|
|
331
|
+
component.$loading // Boolean - action in progress?
|
|
332
|
+
component.$error // Error message or null
|
|
333
|
+
|
|
334
|
+
// Actions
|
|
335
|
+
await component.myAction() // Call server method (type-safe)
|
|
336
|
+
component.$set('key', val) // Set a single property
|
|
337
|
+
|
|
338
|
+
// Form field binding
|
|
339
|
+
<input {...component.$field('email', { syncOn: 'change', debounce: 500 })} />
|
|
340
|
+
<input {...component.$field('name', { syncOn: 'blur' })} />
|
|
341
|
+
await component.$sync() // Manual sync for deferred fields
|
|
342
|
+
|
|
343
|
+
// Room events
|
|
344
|
+
component.$room.emit('event', data)
|
|
345
|
+
component.$room.on('message', handler)
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### ๐ Room System
|
|
349
|
+
|
|
350
|
+
Multi-room real-time communication for Live Components โ users in the same room share events.
|
|
351
|
+
|
|
352
|
+
<table>
|
|
270
353
|
<tr>
|
|
271
354
|
<td width="50%">
|
|
272
355
|
|
|
273
|
-
|
|
356
|
+
**Server: join rooms and emit events**
|
|
274
357
|
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
|
|
358
|
+
```typescript
|
|
359
|
+
// app/server/live/ChatRoom.ts
|
|
360
|
+
export class ChatRoom extends LiveComponent<State> {
|
|
361
|
+
|
|
362
|
+
async joinRoom(payload: { roomId: string }) {
|
|
363
|
+
this.$room(payload.roomId).join()
|
|
364
|
+
|
|
365
|
+
this.$room(payload.roomId).on('message:new', (msg) => {
|
|
366
|
+
this.setState({
|
|
367
|
+
messages: [...this.state.messages, msg]
|
|
368
|
+
})
|
|
369
|
+
})
|
|
278
370
|
|
|
279
|
-
|
|
280
|
-
|
|
371
|
+
return { success: true }
|
|
372
|
+
}
|
|
281
373
|
|
|
282
|
-
|
|
283
|
-
|
|
374
|
+
async sendMessage(payload: { text: string }) {
|
|
375
|
+
const message = { id: Date.now(), text: payload.text }
|
|
376
|
+
this.setState({
|
|
377
|
+
messages: [...this.state.messages, message]
|
|
378
|
+
})
|
|
379
|
+
this.$room('chat').emit('message:new', message)
|
|
380
|
+
return { success: true }
|
|
381
|
+
}
|
|
382
|
+
}
|
|
284
383
|
```
|
|
285
384
|
|
|
286
385
|
</td>
|
|
287
386
|
<td width="50%">
|
|
288
387
|
|
|
289
|
-
|
|
388
|
+
**HTTP API for external integrations**
|
|
290
389
|
|
|
291
390
|
```bash
|
|
292
|
-
#
|
|
293
|
-
|
|
391
|
+
# Send a message to a room via API
|
|
392
|
+
curl -X POST \
|
|
393
|
+
http://localhost:3000/api/rooms/general/messages \
|
|
394
|
+
-H "Content-Type: application/json" \
|
|
395
|
+
-d '{"user": "Bot", "text": "Hello from API!"}'
|
|
396
|
+
|
|
397
|
+
# Emit a custom event to a room
|
|
398
|
+
curl -X POST \
|
|
399
|
+
http://localhost:3000/api/rooms/tech/emit \
|
|
400
|
+
-H "Content-Type: application/json" \
|
|
401
|
+
-d '{
|
|
402
|
+
"event": "notification",
|
|
403
|
+
"data": {"type": "alert", "msg": "Deploy done!"}
|
|
404
|
+
}'
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Rooms are accessible both from Live Components (WebSocket) and via REST API for webhooks, bots, and external services.
|
|
294
408
|
|
|
295
|
-
|
|
296
|
-
|
|
409
|
+
</td>
|
|
410
|
+
</tr>
|
|
411
|
+
</table>
|
|
412
|
+
|
|
413
|
+
### ๐ Authentication
|
|
414
|
+
|
|
415
|
+
Declarative auth for Live Components with role-based access control.
|
|
416
|
+
|
|
417
|
+
<table>
|
|
418
|
+
<tr>
|
|
419
|
+
<td width="50%">
|
|
420
|
+
|
|
421
|
+
**Server: protect components and actions**
|
|
422
|
+
|
|
423
|
+
```typescript
|
|
424
|
+
// app/server/live/AdminPanel.ts
|
|
425
|
+
export class AdminPanel extends LiveComponent<State> {
|
|
426
|
+
static componentName = 'AdminPanel'
|
|
427
|
+
static defaultState = { users: [] }
|
|
428
|
+
|
|
429
|
+
// Component requires admin role
|
|
430
|
+
static auth = {
|
|
431
|
+
required: true,
|
|
432
|
+
roles: ['admin']
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// Per-action permissions
|
|
436
|
+
static actionAuth = {
|
|
437
|
+
deleteUser: { permissions: ['users.delete'] }
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
async deleteUser(payload: { userId: string }) {
|
|
441
|
+
// Access user info via $auth
|
|
442
|
+
console.log(`${this.$auth.user?.id} deleting user`)
|
|
443
|
+
return { success: true }
|
|
444
|
+
}
|
|
445
|
+
}
|
|
297
446
|
```
|
|
298
447
|
|
|
448
|
+
</td>
|
|
449
|
+
<td width="50%">
|
|
450
|
+
|
|
451
|
+
**Client: authenticate dynamically**
|
|
452
|
+
|
|
453
|
+
```tsx
|
|
454
|
+
import { useLiveComponents } from '@/core/client'
|
|
455
|
+
|
|
456
|
+
function LoginButton() {
|
|
457
|
+
const { authenticated, authenticate } = useLiveComponents()
|
|
458
|
+
|
|
459
|
+
const handleLogin = async () => {
|
|
460
|
+
await authenticate({ token: 'my-jwt-token' })
|
|
461
|
+
// Components auto re-mount with new auth!
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
return (
|
|
465
|
+
<button onClick={handleLogin}>
|
|
466
|
+
{authenticated ? 'Logged in' : 'Login'}
|
|
467
|
+
</button>
|
|
468
|
+
)
|
|
469
|
+
}
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
Components that fail with `AUTH_DENIED` automatically retry when authentication succeeds.
|
|
473
|
+
|
|
299
474
|
</td>
|
|
300
475
|
</tr>
|
|
301
476
|
</table>
|
|
@@ -304,18 +479,19 @@ bun run cli
|
|
|
304
479
|
|
|
305
480
|
## ๐ Type-Safe API Development
|
|
306
481
|
|
|
307
|
-
**
|
|
482
|
+
**Eden Treaty infers types from Elysia route definitions automatically. No manual DTOs.**
|
|
483
|
+
|
|
484
|
+
<table>
|
|
485
|
+
<tr>
|
|
486
|
+
<td width="50%">
|
|
308
487
|
|
|
309
488
|
### ๐ Define Backend Route
|
|
310
489
|
|
|
311
490
|
```typescript
|
|
312
|
-
// app/server/routes/users.ts
|
|
491
|
+
// app/server/routes/users.routes.ts
|
|
313
492
|
import { Elysia, t } from 'elysia'
|
|
314
493
|
|
|
315
494
|
export const userRoutes = new Elysia({ prefix: '/users' })
|
|
316
|
-
.get('/', () => ({
|
|
317
|
-
users: listUsers()
|
|
318
|
-
}))
|
|
319
495
|
.post('/', ({ body }) => createUser(body), {
|
|
320
496
|
body: t.Object({
|
|
321
497
|
name: t.String(),
|
|
@@ -326,179 +502,200 @@ export const userRoutes = new Elysia({ prefix: '/users' })
|
|
|
326
502
|
user: t.Optional(t.Object({
|
|
327
503
|
id: t.Number(),
|
|
328
504
|
name: t.String(),
|
|
329
|
-
email: t.String()
|
|
330
|
-
|
|
331
|
-
})),
|
|
332
|
-
message: t.Optional(t.String())
|
|
505
|
+
email: t.String()
|
|
506
|
+
}))
|
|
333
507
|
})
|
|
334
508
|
})
|
|
335
509
|
```
|
|
336
510
|
|
|
511
|
+
</td>
|
|
512
|
+
<td width="50%">
|
|
513
|
+
|
|
337
514
|
### โจ Use in Frontend (Fully Typed!)
|
|
338
515
|
|
|
339
516
|
```typescript
|
|
340
|
-
// app/client/src/
|
|
341
|
-
import { api } from '
|
|
517
|
+
// app/client/src/lib/eden-api.ts
|
|
518
|
+
import { api } from './eden-api'
|
|
342
519
|
|
|
343
|
-
//
|
|
344
|
-
const { data
|
|
345
|
-
name: 'Ada Lovelace',
|
|
346
|
-
email: 'ada@example.com'
|
|
520
|
+
// TypeScript knows all types automatically!
|
|
521
|
+
const { data, error } = await api.users.post({
|
|
522
|
+
name: 'Ada Lovelace', // โ
string
|
|
523
|
+
email: 'ada@example.com' // โ
string (email)
|
|
347
524
|
})
|
|
348
525
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
console.log(
|
|
352
|
-
console.log(response.user.id) // โ
Type: number
|
|
353
|
-
console.log(response.user.createdAt) // โ
Type: Date
|
|
526
|
+
if (data?.user) {
|
|
527
|
+
console.log(data.user.name) // โ
string
|
|
528
|
+
console.log(data.user.id) // โ
number
|
|
354
529
|
}
|
|
355
530
|
```
|
|
356
531
|
|
|
357
|
-
|
|
532
|
+
</td>
|
|
533
|
+
</tr>
|
|
534
|
+
</table>
|
|
358
535
|
|
|
359
|
-
|
|
360
|
-
- โ
**
|
|
361
|
-
- โ
**
|
|
362
|
-
- โ
**Refactor Friendly**
|
|
536
|
+
**Benefits:**
|
|
537
|
+
- โ
**Zero Manual Types** โ Types flow automatically from backend to frontend
|
|
538
|
+
- โ
**Full Autocomplete** โ IntelliSense in your IDE
|
|
539
|
+
- โ
**Refactor Friendly** โ Change backend schema, frontend updates automatically
|
|
363
540
|
|
|
364
541
|
---
|
|
365
542
|
|
|
366
|
-
##
|
|
543
|
+
## โ๏ธ Declarative Configuration
|
|
367
544
|
|
|
368
|
-
|
|
369
|
-
<summary><b>โ Add a New API Route</b></summary>
|
|
545
|
+
Laravel-inspired config system with schema validation and full type inference.
|
|
370
546
|
|
|
371
547
|
```typescript
|
|
372
|
-
//
|
|
373
|
-
import {
|
|
548
|
+
// config/system/app.config.ts
|
|
549
|
+
import { defineConfig, config } from '@/core/utils/config-schema'
|
|
374
550
|
|
|
375
|
-
|
|
376
|
-
.
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
.
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
content: t.String({ minLength: 10 })
|
|
385
|
-
})
|
|
386
|
-
})
|
|
551
|
+
const appConfigSchema = {
|
|
552
|
+
name: config.string('APP_NAME', 'FluxStack', true),
|
|
553
|
+
port: config.number('PORT', 3000, true),
|
|
554
|
+
env: config.enum('NODE_ENV', ['development', 'production', 'test'] as const, 'development', true),
|
|
555
|
+
debug: config.boolean('DEBUG', false),
|
|
556
|
+
} as const
|
|
557
|
+
|
|
558
|
+
export const appConfig = defineConfig(appConfigSchema)
|
|
559
|
+
// appConfig.port โ number, appConfig.env โ "development" | "production" | "test"
|
|
387
560
|
```
|
|
388
561
|
|
|
389
|
-
|
|
390
|
-
```typescript
|
|
391
|
-
// app/server/index.ts
|
|
392
|
-
import { postRoutes } from './routes/posts'
|
|
562
|
+
All environment variables are validated at boot time. See [`.env.example`](.env.example) for available options.
|
|
393
563
|
|
|
394
|
-
|
|
395
|
-
```
|
|
564
|
+
---
|
|
396
565
|
|
|
397
|
-
|
|
566
|
+
## ๐ Plugin System
|
|
398
567
|
|
|
399
|
-
|
|
400
|
-
<summary><b>๐ Create a Custom Plugin</b></summary>
|
|
568
|
+
Three-layer plugin architecture with security-first design:
|
|
401
569
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
})
|
|
414
|
-
.onResponse(({ request, timestamp }) => {
|
|
415
|
-
const duration = Date.now() - timestamp
|
|
416
|
-
console.log(`[AUDIT] ${request.method} ${request.url} - ${duration}ms`)
|
|
417
|
-
})
|
|
570
|
+
| Layer | Location | Auto-discovered | Trusted |
|
|
571
|
+
|-------|----------|-----------------|---------|
|
|
572
|
+
| ๐ **Built-in** | `core/plugins/` | No (manual `.use()`) | โ
Yes |
|
|
573
|
+
| ๐ **Project** | `plugins/` | โ
Yes | โ
Yes |
|
|
574
|
+
| ๐ฆ **NPM** | `node_modules/` | โ No (opt-in) | ๐ Whitelist required |
|
|
575
|
+
|
|
576
|
+
NPM plugins are **blocked by default**. To add one safely:
|
|
577
|
+
|
|
578
|
+
```bash
|
|
579
|
+
bun run cli plugin:add fluxstack-plugin-auth
|
|
580
|
+
# Audits the package, installs it, and adds it to the whitelist
|
|
418
581
|
```
|
|
419
582
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
583
|
+
---
|
|
584
|
+
|
|
585
|
+
## ๐ Available Scripts
|
|
586
|
+
|
|
587
|
+
<table>
|
|
588
|
+
<tr>
|
|
589
|
+
<td width="50%">
|
|
423
590
|
|
|
424
|
-
|
|
591
|
+
### ๐จ Development
|
|
592
|
+
|
|
593
|
+
```bash
|
|
594
|
+
bun run dev # Full-stack with hot reload
|
|
595
|
+
bun run dev:frontend # Frontend only (port 5173)
|
|
596
|
+
bun run dev:backend # Backend only (port 3001)
|
|
425
597
|
```
|
|
426
598
|
|
|
427
|
-
</
|
|
599
|
+
</td>
|
|
600
|
+
<td width="50%">
|
|
428
601
|
|
|
429
|
-
|
|
430
|
-
<summary><b>โ๏ธ Add Environment Configuration</b></summary>
|
|
602
|
+
### ๐ Production
|
|
431
603
|
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
|
|
604
|
+
```bash
|
|
605
|
+
bun run build # Production build
|
|
606
|
+
bun run start # Start production server
|
|
607
|
+
```
|
|
435
608
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
609
|
+
</td>
|
|
610
|
+
</tr>
|
|
611
|
+
<tr>
|
|
612
|
+
<td width="50%">
|
|
613
|
+
|
|
614
|
+
### ๐งช Testing & Quality
|
|
441
615
|
|
|
442
|
-
|
|
616
|
+
```bash
|
|
617
|
+
bun run test # Run tests (Vitest)
|
|
618
|
+
bun run test:ui # Vitest with browser UI
|
|
619
|
+
bun run test:coverage # Coverage report
|
|
620
|
+
bun run typecheck:api # Strict TypeScript check
|
|
443
621
|
```
|
|
444
622
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
import { featuresConfig } from '@/config/features.config'
|
|
623
|
+
</td>
|
|
624
|
+
<td width="50%">
|
|
448
625
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
626
|
+
### ๐ ๏ธ CLI & Utilities
|
|
627
|
+
|
|
628
|
+
```bash
|
|
629
|
+
bun run cli # CLI interface
|
|
630
|
+
bun run make:component # Generate a Live Component
|
|
631
|
+
bun run sync-version # Sync version across files
|
|
453
632
|
```
|
|
454
633
|
|
|
455
|
-
</
|
|
634
|
+
</td>
|
|
635
|
+
</tr>
|
|
636
|
+
</table>
|
|
456
637
|
|
|
457
638
|
---
|
|
458
639
|
|
|
459
|
-
##
|
|
640
|
+
## ๐ Frontend Routes
|
|
460
641
|
|
|
461
|
-
|
|
462
|
-
<tr>
|
|
463
|
-
<td width="33%">
|
|
642
|
+
Default routes included in the demo app (React Router v7):
|
|
464
643
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
644
|
+
| Route | Page |
|
|
645
|
+
|-------|------|
|
|
646
|
+
| `/` | Home |
|
|
647
|
+
| `/counter` | Live Counter |
|
|
648
|
+
| `/form` | Live Form |
|
|
649
|
+
| `/upload` | Live Upload |
|
|
650
|
+
| `/auth` | Auth Demo |
|
|
651
|
+
| `/api-test` | Eden Treaty Demo |
|
|
472
652
|
|
|
473
|
-
|
|
474
|
-
<td width="33%">
|
|
653
|
+
---
|
|
475
654
|
|
|
476
|
-
|
|
477
|
-
- [GitHub Issues](https://github.com/MarcosBrendonDePaula/FluxStack/issues)
|
|
478
|
-
- [Discussions](https://github.com/MarcosBrendonDePaula/FluxStack/discussions)
|
|
479
|
-
- [Repository](https://github.com/MarcosBrendonDePaula/FluxStack)
|
|
655
|
+
## ๐ง Environment Variables
|
|
480
656
|
|
|
481
|
-
|
|
482
|
-
<td width="33%">
|
|
657
|
+
Copy `.env.example` to `.env` and adjust as needed:
|
|
483
658
|
|
|
484
|
-
### ๐ **Upgrading**
|
|
485
659
|
```bash
|
|
486
|
-
|
|
660
|
+
cp .env.example .env
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
<details>
|
|
664
|
+
<summary><b>Key variables</b></summary>
|
|
665
|
+
|
|
666
|
+
| Variable | Default | Description |
|
|
667
|
+
|----------|---------|-------------|
|
|
668
|
+
| `PORT` | `3000` | Backend server port |
|
|
669
|
+
| `HOST` | `localhost` | Server host |
|
|
670
|
+
| `FRONTEND_PORT` | `5173` | Vite dev server port |
|
|
671
|
+
| `NODE_ENV` | `development` | Environment |
|
|
672
|
+
| `LOG_LEVEL` | `info` | Logging level |
|
|
673
|
+
| `CORS_ORIGINS` | `localhost:3000,localhost:5173` | Allowed CORS origins |
|
|
674
|
+
| `SWAGGER_ENABLED` | `true` | Enable Swagger UI |
|
|
675
|
+
| `SWAGGER_PATH` | `/swagger` | Swagger UI path |
|
|
676
|
+
|
|
677
|
+
See [`.env.example`](.env.example) for the full list.
|
|
678
|
+
|
|
679
|
+
</details>
|
|
680
|
+
|
|
681
|
+
---
|
|
487
682
|
|
|
488
|
-
|
|
489
|
-
|
|
683
|
+
## ๐ณ Docker
|
|
684
|
+
|
|
685
|
+
```bash
|
|
686
|
+
# Build
|
|
687
|
+
docker build -t fluxstack-app .
|
|
688
|
+
|
|
689
|
+
# Run
|
|
690
|
+
docker run -p 3000:3000 fluxstack-app
|
|
490
691
|
```
|
|
491
692
|
|
|
492
|
-
|
|
493
|
-
</tr>
|
|
494
|
-
</table>
|
|
693
|
+
The Dockerfile uses a multi-stage build with `oven/bun:1.2-alpine` and runs as a non-root user.
|
|
495
694
|
|
|
496
695
|
---
|
|
497
696
|
|
|
498
697
|
## ๐ค Why FluxStack?
|
|
499
698
|
|
|
500
|
-
### ๐ **Comparison with Other Stacks**
|
|
501
|
-
|
|
502
699
|
<table>
|
|
503
700
|
<tr>
|
|
504
701
|
<th>Feature</th>
|
|
@@ -513,22 +710,22 @@ npm list -g create-fluxstack
|
|
|
513
710
|
<td>โ Node.js</td>
|
|
514
711
|
</tr>
|
|
515
712
|
<tr>
|
|
516
|
-
<td><b>Backend
|
|
713
|
+
<td><b>Backend</b></td>
|
|
517
714
|
<td>โ
Elysia (ultra-fast)</td>
|
|
518
|
-
<td>โ ๏ธ
|
|
715
|
+
<td>โ ๏ธ API Routes</td>
|
|
519
716
|
<td>โ
tRPC</td>
|
|
520
717
|
</tr>
|
|
521
718
|
<tr>
|
|
522
719
|
<td><b>Type Safety</b></td>
|
|
523
|
-
<td>โ
Eden Treaty (auto
|
|
720
|
+
<td>โ
Eden Treaty (auto)</td>
|
|
524
721
|
<td>โ ๏ธ Manual types</td>
|
|
525
722
|
<td>โ
tRPC</td>
|
|
526
723
|
</tr>
|
|
527
724
|
<tr>
|
|
528
|
-
<td><b>
|
|
529
|
-
<td>โ
|
|
530
|
-
<td>โ ๏ธ
|
|
531
|
-
<td>โ ๏ธ
|
|
725
|
+
<td><b>Real-Time</b></td>
|
|
726
|
+
<td>โ
Live Components built-in</td>
|
|
727
|
+
<td>โ ๏ธ Third-party</td>
|
|
728
|
+
<td>โ ๏ธ Third-party</td>
|
|
532
729
|
</tr>
|
|
533
730
|
<tr>
|
|
534
731
|
<td><b>API Docs</b></td>
|
|
@@ -537,53 +734,16 @@ npm list -g create-fluxstack
|
|
|
537
734
|
<td>โ Manual</td>
|
|
538
735
|
</tr>
|
|
539
736
|
<tr>
|
|
540
|
-
<td><b>
|
|
541
|
-
<td>โ
|
|
542
|
-
<td>โ ๏ธ
|
|
543
|
-
<td>โ ๏ธ
|
|
737
|
+
<td><b>Config System</b></td>
|
|
738
|
+
<td>โ
Declarative + validation</td>
|
|
739
|
+
<td>โ ๏ธ Manual</td>
|
|
740
|
+
<td>โ ๏ธ Manual</td>
|
|
544
741
|
</tr>
|
|
545
742
|
<tr>
|
|
546
743
|
<td><b>Docker</b></td>
|
|
547
744
|
<td>โ
Multi-stage ready</td>
|
|
548
|
-
<td>โ ๏ธ Manual
|
|
549
|
-
<td>โ ๏ธ Manual
|
|
550
|
-
</tr>
|
|
551
|
-
</table>
|
|
552
|
-
|
|
553
|
-
### ๐ก **Key Advantages**
|
|
554
|
-
|
|
555
|
-
<table>
|
|
556
|
-
<tr>
|
|
557
|
-
<td width="50%">
|
|
558
|
-
|
|
559
|
-
#### ๐ **Performance**
|
|
560
|
-
- **3x faster** startup with Bun
|
|
561
|
-
- **Ultra-fast** API routing with Elysia
|
|
562
|
-
- **Instant** HMR with Vite 7
|
|
563
|
-
- **Optimized** production builds
|
|
564
|
-
|
|
565
|
-
#### ๐ **Type Safety**
|
|
566
|
-
- **Automatic** type inference
|
|
567
|
-
- **Zero manual** DTO definitions
|
|
568
|
-
- **End-to-end** type checking
|
|
569
|
-
- **Refactor-friendly** architecture
|
|
570
|
-
|
|
571
|
-
</td>
|
|
572
|
-
<td width="50%">
|
|
573
|
-
|
|
574
|
-
#### ๐ ๏ธ **Developer Experience**
|
|
575
|
-
- **Zero configuration** needed
|
|
576
|
-
- **One command** to start
|
|
577
|
-
- **Auto-generated** documentation
|
|
578
|
-
- **AI-optimized** documentation
|
|
579
|
-
|
|
580
|
-
#### ๐ฏ **Production Ready**
|
|
581
|
-
- **Docker** templates included
|
|
582
|
-
- **Declarative** configuration
|
|
583
|
-
- **Unified** error handling
|
|
584
|
-
- **Built-in** monitoring support
|
|
585
|
-
|
|
586
|
-
</td>
|
|
745
|
+
<td>โ ๏ธ Manual</td>
|
|
746
|
+
<td>โ ๏ธ Manual</td>
|
|
587
747
|
</tr>
|
|
588
748
|
</table>
|
|
589
749
|
|
|
@@ -595,15 +755,15 @@ npm list -g create-fluxstack
|
|
|
595
755
|
<tr>
|
|
596
756
|
<td width="50%">
|
|
597
757
|
|
|
598
|
-
### ๐ฆ
|
|
599
|
-
- **Bun**
|
|
758
|
+
### ๐ฆ System Requirements
|
|
759
|
+
- **Bun** >= 1.2.0 (required runtime)
|
|
600
760
|
- **Git** (for version control)
|
|
601
|
-
-
|
|
761
|
+
- Linux, macOS, or Windows
|
|
602
762
|
|
|
603
763
|
</td>
|
|
604
764
|
<td width="50%">
|
|
605
765
|
|
|
606
|
-
### ๐ฅ
|
|
766
|
+
### ๐ฅ Install Bun
|
|
607
767
|
|
|
608
768
|
**macOS / Linux:**
|
|
609
769
|
```bash
|
|
@@ -619,46 +779,63 @@ powershell -c "irm bun.sh/install.ps1 | iex"
|
|
|
619
779
|
</tr>
|
|
620
780
|
</table>
|
|
621
781
|
|
|
622
|
-
> โ ๏ธ **Important**: FluxStack
|
|
782
|
+
> โ ๏ธ **Important**: FluxStack requires Bun. Node.js is not supported as a runtime.
|
|
623
783
|
|
|
624
784
|
---
|
|
625
785
|
|
|
626
|
-
##
|
|
786
|
+
## ๐ Documentation & Support
|
|
627
787
|
|
|
628
|
-
<
|
|
788
|
+
<table>
|
|
789
|
+
<tr>
|
|
790
|
+
<td width="33%">
|
|
629
791
|
|
|
630
|
-
###
|
|
792
|
+
### ๐ Documentation
|
|
793
|
+
- [LLMD Index](./LLMD/INDEX.md) โ Navigation hub
|
|
794
|
+
- [Framework Lifecycle](./LLMD/core/framework-lifecycle.md)
|
|
795
|
+
- [Live Components](./LLMD/resources/live-components.md)
|
|
796
|
+
- [Live Auth](./LLMD/resources/live-auth.md)
|
|
797
|
+
- [Live Rooms](./LLMD/resources/live-rooms.md)
|
|
798
|
+
- [Routes & Eden Treaty](./LLMD/resources/routes-eden.md)
|
|
799
|
+
- [CLI Reference](./LLMD/reference/cli-commands.md)
|
|
800
|
+
- [Troubleshooting](./LLMD/reference/troubleshooting.md)
|
|
631
801
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
cd my-awesome-app
|
|
635
|
-
bun run dev
|
|
636
|
-
```
|
|
802
|
+
</td>
|
|
803
|
+
<td width="33%">
|
|
637
804
|
|
|
638
|
-
###
|
|
805
|
+
### ๐ฌ Community
|
|
806
|
+
- [GitHub Issues](https://github.com/MarcosBrendonDePaula/FluxStack/issues)
|
|
807
|
+
- [Discussions](https://github.com/MarcosBrendonDePaula/FluxStack/discussions)
|
|
808
|
+
- [Repository](https://github.com/MarcosBrendonDePaula/FluxStack)
|
|
639
809
|
|
|
640
|
-
|
|
641
|
-
|
|
810
|
+
</td>
|
|
811
|
+
<td width="33%">
|
|
642
812
|
|
|
643
|
-
|
|
813
|
+
### ๐ Upgrading
|
|
814
|
+
```bash
|
|
815
|
+
bunx create-fluxstack@latest
|
|
816
|
+
```
|
|
817
|
+
|
|
818
|
+
</td>
|
|
819
|
+
</tr>
|
|
820
|
+
</table>
|
|
644
821
|
|
|
645
822
|
---
|
|
646
823
|
|
|
647
|
-
##
|
|
824
|
+
## ๐ค Contributing
|
|
648
825
|
|
|
649
|
-
|
|
826
|
+
1. Fork the repository
|
|
827
|
+
2. Create a feature branch (`git checkout -b feature/my-feature`)
|
|
828
|
+
3. Commit your changes (`git commit -m 'Add my feature'`)
|
|
829
|
+
4. Push to the branch (`git push origin feature/my-feature`)
|
|
830
|
+
5. Open a Pull Request
|
|
831
|
+
|
|
832
|
+
Please open an [issue](https://github.com/MarcosBrendonDePaula/FluxStack/issues) first to discuss larger changes.
|
|
650
833
|
|
|
651
834
|
---
|
|
652
835
|
|
|
653
|
-
##
|
|
836
|
+
## ๐ License
|
|
654
837
|
|
|
655
|
-
|
|
656
|
-
- [Bun](https://bun.sh) - Fast all-in-one JavaScript runtime
|
|
657
|
-
- [Elysia.js](https://elysiajs.com) - Ergonomic framework for humans
|
|
658
|
-
- [React](https://react.dev) - Library for web and native interfaces
|
|
659
|
-
- [Vite](https://vite.dev) - Next generation frontend tooling
|
|
660
|
-
- [Tailwind CSS](https://tailwindcss.com) - Utility-first CSS framework
|
|
661
|
-
- [TypeScript](https://www.typescriptlang.org) - JavaScript with syntax for types
|
|
838
|
+
[MIT](LICENSE) - Marcos Brendon De Paula
|
|
662
839
|
|
|
663
840
|
---
|
|
664
841
|
|
|
@@ -668,6 +845,9 @@ Built with amazing open-source technologies:
|
|
|
668
845
|
|
|
669
846
|
*Star โญ this repo if you find it helpful!*
|
|
670
847
|
|
|
848
|
+
[](https://github.com/MarcosBrendonDePaula/FluxStack)
|
|
849
|
+
[](https://www.npmjs.com/package/create-fluxstack)
|
|
850
|
+
|
|
671
851
|
[Report Bug](https://github.com/MarcosBrendonDePaula/FluxStack/issues) ยท [Request Feature](https://github.com/MarcosBrendonDePaula/FluxStack/issues) ยท [Contribute](https://github.com/MarcosBrendonDePaula/FluxStack/pulls)
|
|
672
852
|
|
|
673
853
|
</div>
|