create-fluxstack 1.0.13 → 1.0.14
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 +29 -29
- package/app/client/README.md +69 -69
- package/app/client/index.html +14 -13
- package/app/client/src/App.tsx +157 -524
- package/app/client/src/components/ErrorBoundary.tsx +107 -0
- package/app/client/src/components/ErrorDisplay.css +365 -0
- package/app/client/src/components/ErrorDisplay.tsx +258 -0
- package/app/client/src/components/FluxStackConfig.tsx +1321 -0
- package/app/client/src/components/HybridLiveCounter.tsx +140 -0
- package/app/client/src/components/LiveClock.tsx +286 -0
- package/app/client/src/components/MainLayout.tsx +390 -0
- package/app/client/src/components/SidebarNavigation.tsx +391 -0
- package/app/client/src/components/StateDemo.tsx +178 -0
- package/app/client/src/components/SystemMonitor.tsx +1038 -0
- package/app/client/src/components/Teste.tsx +104 -0
- package/app/client/src/components/UserProfile.tsx +809 -0
- package/app/client/src/hooks/useAuth.ts +39 -0
- package/app/client/src/hooks/useNotifications.ts +56 -0
- package/app/client/src/lib/eden-api.ts +189 -53
- package/app/client/src/lib/errors.ts +340 -0
- package/app/client/src/lib/hooks/useErrorHandler.ts +258 -0
- package/app/client/src/lib/index.ts +45 -0
- package/app/client/src/main.tsx +3 -2
- package/app/client/src/pages/ApiDocs.tsx +182 -0
- package/app/client/src/pages/Demo.tsx +174 -0
- package/app/client/src/pages/HybridLive.tsx +263 -0
- package/app/client/src/pages/Overview.tsx +155 -0
- package/app/client/src/store/README.md +43 -0
- package/app/client/src/store/index.ts +16 -0
- package/app/client/src/store/slices/uiSlice.ts +151 -0
- package/app/client/src/store/slices/userSlice.ts +161 -0
- package/app/client/src/test/README.md +257 -0
- package/app/client/src/test/setup.ts +70 -0
- package/app/client/src/test/types.ts +12 -0
- package/app/client/src/vite-env.d.ts +1 -1
- package/app/client/tsconfig.app.json +44 -43
- package/app/client/tsconfig.json +7 -7
- package/app/client/tsconfig.node.json +25 -25
- package/app/client/zustand-setup.md +65 -0
- package/app/server/controllers/users.controller.ts +68 -68
- package/app/server/index.ts +9 -1
- package/app/server/live/CounterComponent.ts +191 -0
- package/app/server/live/FluxStackConfig.ts +529 -0
- package/app/server/live/LiveClockComponent.ts +214 -0
- package/app/server/live/SidebarNavigation.ts +156 -0
- package/app/server/live/SystemMonitor.ts +594 -0
- package/app/server/live/SystemMonitorIntegration.ts +151 -0
- package/app/server/live/TesteComponent.ts +87 -0
- package/app/server/live/UserProfileComponent.ts +135 -0
- package/app/server/live/register-components.ts +28 -0
- package/app/server/middleware/auth.ts +136 -0
- package/app/server/middleware/errorHandling.ts +250 -0
- package/app/server/middleware/index.ts +10 -0
- package/app/server/middleware/rateLimit.ts +193 -0
- package/app/server/middleware/requestLogging.ts +215 -0
- package/app/server/middleware/validation.ts +270 -0
- package/app/server/routes/index.ts +14 -2
- package/app/server/routes/upload.ts +92 -0
- package/app/server/routes/users.routes.ts +2 -9
- package/app/server/services/NotificationService.ts +302 -0
- package/app/server/services/UserService.ts +222 -0
- package/app/server/services/index.ts +46 -0
- package/core/cli/commands/plugin-deps.ts +263 -0
- package/core/cli/generators/README.md +339 -0
- package/core/cli/generators/component.ts +770 -0
- package/core/cli/generators/controller.ts +299 -0
- package/core/cli/generators/index.ts +144 -0
- package/core/cli/generators/interactive.ts +228 -0
- package/core/cli/generators/prompts.ts +83 -0
- package/core/cli/generators/route.ts +513 -0
- package/core/cli/generators/service.ts +465 -0
- package/core/cli/generators/template-engine.ts +154 -0
- package/core/cli/generators/types.ts +71 -0
- package/core/cli/generators/utils.ts +192 -0
- package/core/cli/index.ts +69 -0
- package/core/cli/plugin-discovery.ts +16 -85
- package/core/client/fluxstack.ts +17 -0
- package/core/client/hooks/index.ts +7 -0
- package/core/client/hooks/state-validator.ts +130 -0
- package/core/client/hooks/useAuth.ts +49 -0
- package/core/client/hooks/useChunkedUpload.ts +258 -0
- package/core/client/hooks/useHybridLiveComponent.ts +967 -0
- package/core/client/hooks/useWebSocket.ts +373 -0
- package/core/client/index.ts +47 -0
- package/core/client/state/createStore.ts +193 -0
- package/core/client/state/index.ts +15 -0
- package/core/config/env-dynamic.ts +1 -1
- package/core/config/env.ts +2 -1
- package/core/config/runtime-config.ts +3 -3
- package/core/config/schema.ts +84 -49
- package/core/framework/server.ts +30 -0
- package/core/index.ts +25 -0
- package/core/live/ComponentRegistry.ts +399 -0
- package/core/live/types.ts +164 -0
- package/core/plugins/built-in/live-components/commands/create-live-component.ts +1201 -0
- package/core/plugins/built-in/live-components/index.ts +27 -0
- package/core/plugins/built-in/logger/index.ts +1 -1
- package/core/plugins/built-in/monitoring/index.ts +1 -1
- package/core/plugins/built-in/static/index.ts +1 -1
- package/core/plugins/built-in/swagger/index.ts +1 -1
- package/core/plugins/built-in/vite/index.ts +1 -1
- package/core/plugins/dependency-manager.ts +384 -0
- package/core/plugins/index.ts +5 -1
- package/core/plugins/manager.ts +7 -3
- package/core/plugins/registry.ts +88 -10
- package/core/plugins/types.ts +11 -11
- package/core/server/framework.ts +43 -0
- package/core/server/index.ts +11 -1
- package/core/server/live/ComponentRegistry.ts +1017 -0
- package/core/server/live/FileUploadManager.ts +272 -0
- package/core/server/live/LiveComponentPerformanceMonitor.ts +930 -0
- package/core/server/live/SingleConnectionManager.ts +0 -0
- package/core/server/live/StateSignature.ts +644 -0
- package/core/server/live/WebSocketConnectionManager.ts +688 -0
- package/core/server/live/websocket-plugin.ts +435 -0
- package/core/server/middleware/errorHandling.ts +141 -0
- package/core/server/middleware/index.ts +16 -0
- package/core/server/plugins/static-files-plugin.ts +232 -0
- package/core/server/services/BaseService.ts +95 -0
- package/core/server/services/ServiceContainer.ts +144 -0
- package/core/server/services/index.ts +9 -0
- package/core/templates/create-project.ts +46 -2
- package/core/testing/index.ts +10 -0
- package/core/testing/setup.ts +74 -0
- package/core/types/build.ts +38 -14
- package/core/types/types.ts +319 -0
- package/core/utils/env-runtime.ts +7 -0
- package/core/utils/errors/handlers.ts +264 -39
- package/core/utils/errors/index.ts +528 -18
- package/core/utils/errors/middleware.ts +114 -0
- package/core/utils/logger/formatters.ts +222 -0
- package/core/utils/logger/index.ts +167 -48
- package/core/utils/logger/middleware.ts +253 -0
- package/core/utils/logger/performance.ts +384 -0
- package/core/utils/logger/transports.ts +365 -0
- package/create-fluxstack.ts +296 -296
- package/fluxstack.config.ts +17 -1
- package/package-template.json +66 -66
- package/package.json +31 -6
- package/public/README.md +16 -0
- package/vite.config.ts +29 -14
- package/.claude/settings.local.json +0 -74
- package/.github/workflows/ci-build-tests.yml +0 -480
- package/.github/workflows/dependency-management.yml +0 -324
- package/.github/workflows/release-validation.yml +0 -355
- package/.kiro/specs/fluxstack-architecture-optimization/design.md +0 -700
- package/.kiro/specs/fluxstack-architecture-optimization/requirements.md +0 -127
- package/.kiro/specs/fluxstack-architecture-optimization/tasks.md +0 -330
- package/CLAUDE.md +0 -200
- package/Dockerfile +0 -58
- package/Dockerfile.backend +0 -52
- package/Dockerfile.frontend +0 -54
- package/README-Docker.md +0 -85
- package/ai-context/00-QUICK-START.md +0 -86
- package/ai-context/README.md +0 -88
- package/ai-context/development/eden-treaty-guide.md +0 -362
- package/ai-context/development/patterns.md +0 -382
- package/ai-context/development/plugins-guide.md +0 -572
- package/ai-context/examples/crud-complete.md +0 -626
- package/ai-context/project/architecture.md +0 -399
- package/ai-context/project/overview.md +0 -213
- package/ai-context/recent-changes/eden-treaty-refactor.md +0 -281
- package/ai-context/recent-changes/type-inference-fix.md +0 -223
- package/ai-context/reference/environment-vars.md +0 -384
- package/ai-context/reference/troubleshooting.md +0 -407
- package/app/client/src/components/TestPage.tsx +0 -453
- package/bun.lock +0 -1063
- package/bunfig.toml +0 -16
- package/core/__tests__/integration.test.ts +0 -227
- package/core/build/index.ts +0 -186
- package/core/config/__tests__/config-loader.test.ts +0 -554
- package/core/config/__tests__/config-merger.test.ts +0 -657
- package/core/config/__tests__/env-converter.test.ts +0 -372
- package/core/config/__tests__/env-processor.test.ts +0 -431
- package/core/config/__tests__/env.test.ts +0 -452
- package/core/config/__tests__/integration.test.ts +0 -418
- package/core/config/__tests__/loader.test.ts +0 -331
- package/core/config/__tests__/schema.test.ts +0 -129
- package/core/config/__tests__/validator.test.ts +0 -318
- package/core/framework/__tests__/server.test.ts +0 -233
- package/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
- package/core/plugins/__tests__/manager.test.ts +0 -398
- package/core/plugins/__tests__/monitoring.test.ts +0 -401
- package/core/plugins/__tests__/registry.test.ts +0 -335
- package/core/utils/__tests__/errors.test.ts +0 -139
- package/core/utils/__tests__/helpers.test.ts +0 -297
- package/core/utils/__tests__/logger.test.ts +0 -141
- package/create-test-app.ts +0 -156
- package/docker-compose.microservices.yml +0 -75
- package/docker-compose.simple.yml +0 -57
- package/docker-compose.yml +0 -71
- package/eslint.config.js +0 -23
- package/flux-cli.ts +0 -214
- package/nginx-lb.conf +0 -37
- package/publish.sh +0 -63
- package/run-clean.ts +0 -26
- package/run-env-tests.ts +0 -313
- package/tailwind.config.js +0 -34
- package/tests/__mocks__/api.ts +0 -56
- package/tests/fixtures/users.ts +0 -69
- package/tests/integration/api/users.routes.test.ts +0 -221
- package/tests/setup.ts +0 -29
- package/tests/unit/app/client/App-simple.test.tsx +0 -56
- package/tests/unit/app/client/App.test.tsx.skip +0 -237
- package/tests/unit/app/client/eden-api.test.ts +0 -186
- package/tests/unit/app/client/simple.test.tsx +0 -23
- package/tests/unit/app/controllers/users.controller.test.ts +0 -150
- package/tests/unit/core/create-project.test.ts.skip +0 -95
- package/tests/unit/core/framework.test.ts +0 -144
- package/tests/unit/core/plugins/logger.test.ts.skip +0 -268
- package/tests/unit/core/plugins/vite.test.ts.disabled +0 -188
- package/tests/utils/test-helpers.ts +0 -61
- package/vitest.config.ts +0 -50
- package/workspace.json +0 -6
package/Dockerfile
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# FluxStack Docker Image
|
|
2
|
-
FROM oven/bun:1.1-alpine AS base
|
|
3
|
-
|
|
4
|
-
# Set working directory
|
|
5
|
-
WORKDIR /app
|
|
6
|
-
|
|
7
|
-
# Copy package files
|
|
8
|
-
COPY package.json bun.lockb* ./
|
|
9
|
-
COPY bunfig.toml ./
|
|
10
|
-
|
|
11
|
-
# Install dependencies
|
|
12
|
-
RUN bun install --frozen-lockfile
|
|
13
|
-
|
|
14
|
-
# Copy source code
|
|
15
|
-
COPY . .
|
|
16
|
-
|
|
17
|
-
# Build the application
|
|
18
|
-
RUN bun run build
|
|
19
|
-
|
|
20
|
-
# Production stage
|
|
21
|
-
FROM oven/bun:1.1-alpine AS production
|
|
22
|
-
|
|
23
|
-
WORKDIR /app
|
|
24
|
-
|
|
25
|
-
# Install only production dependencies
|
|
26
|
-
COPY package.json bun.lockb* ./
|
|
27
|
-
COPY bunfig.toml ./
|
|
28
|
-
RUN bun install --frozen-lockfile --production
|
|
29
|
-
|
|
30
|
-
# Copy built application and source files needed for runtime
|
|
31
|
-
COPY --from=base /app/dist ./dist
|
|
32
|
-
COPY --from=base /app/core ./core
|
|
33
|
-
COPY --from=base /app/config ./config
|
|
34
|
-
COPY --from=base /app/app ./app
|
|
35
|
-
COPY --from=base /app/tsconfig.json ./tsconfig.json
|
|
36
|
-
COPY --from=base /app/bunfig.toml ./bunfig.toml
|
|
37
|
-
|
|
38
|
-
# Create non-root user
|
|
39
|
-
RUN addgroup -g 1001 -S fluxstack && \
|
|
40
|
-
adduser -S fluxstack -u 1001
|
|
41
|
-
|
|
42
|
-
# Set permissions
|
|
43
|
-
RUN chown -R fluxstack:fluxstack /app
|
|
44
|
-
USER fluxstack
|
|
45
|
-
|
|
46
|
-
# Environment variables
|
|
47
|
-
ENV NODE_ENV=production
|
|
48
|
-
ENV PORT=3000
|
|
49
|
-
|
|
50
|
-
# Health check
|
|
51
|
-
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
52
|
-
CMD bun run -e "fetch('http://localhost:3000/api/health').then(r => r.ok ? process.exit(0) : process.exit(1))" || exit 1
|
|
53
|
-
|
|
54
|
-
# Expose port
|
|
55
|
-
EXPOSE 3000
|
|
56
|
-
|
|
57
|
-
# Start the application
|
|
58
|
-
CMD ["bun", "run", "start"]
|
package/Dockerfile.backend
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# FluxStack Backend-Only Docker Image
|
|
2
|
-
FROM oven/bun:1.1-alpine AS base
|
|
3
|
-
|
|
4
|
-
WORKDIR /app
|
|
5
|
-
|
|
6
|
-
# Install dependencies
|
|
7
|
-
COPY package.json bun.lockb* bunfig.toml ./
|
|
8
|
-
RUN bun install --frozen-lockfile
|
|
9
|
-
|
|
10
|
-
# Copy source code (only what backend needs)
|
|
11
|
-
COPY core/ ./core/
|
|
12
|
-
COPY app/server/ ./app/server/
|
|
13
|
-
COPY app/shared/ ./app/shared/
|
|
14
|
-
COPY config/ ./config/
|
|
15
|
-
COPY tsconfig.json ./tsconfig.json
|
|
16
|
-
|
|
17
|
-
# Production stage
|
|
18
|
-
FROM oven/bun:1.1-alpine AS production
|
|
19
|
-
|
|
20
|
-
WORKDIR /app
|
|
21
|
-
|
|
22
|
-
# Install production dependencies
|
|
23
|
-
COPY package.json bun.lockb* bunfig.toml ./
|
|
24
|
-
RUN bun install --frozen-lockfile --production
|
|
25
|
-
|
|
26
|
-
# Copy backend files and required config
|
|
27
|
-
COPY --from=base /app/core ./core
|
|
28
|
-
COPY --from=base /app/app/server ./app/server
|
|
29
|
-
COPY --from=base /app/app/shared ./app/shared
|
|
30
|
-
COPY --from=base /app/config ./config
|
|
31
|
-
COPY --from=base /app/tsconfig.json ./tsconfig.json
|
|
32
|
-
COPY --from=base /app/bunfig.toml ./bunfig.toml
|
|
33
|
-
|
|
34
|
-
# Create non-root user
|
|
35
|
-
RUN addgroup -g 1001 -S fluxstack && \
|
|
36
|
-
adduser -S fluxstack -u 1001
|
|
37
|
-
RUN chown -R fluxstack:fluxstack /app
|
|
38
|
-
USER fluxstack
|
|
39
|
-
|
|
40
|
-
# Environment for backend-only
|
|
41
|
-
ENV NODE_ENV=production
|
|
42
|
-
ENV BACKEND_PORT=3001
|
|
43
|
-
ENV FLUXSTACK_MODE=backend
|
|
44
|
-
|
|
45
|
-
# Health check for backend API
|
|
46
|
-
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
47
|
-
CMD bun run -e "fetch('http://localhost:3001/health').then(r => r.ok ? process.exit(0) : process.exit(1))" || exit 1
|
|
48
|
-
|
|
49
|
-
EXPOSE 3001
|
|
50
|
-
|
|
51
|
-
# Start backend only
|
|
52
|
-
CMD ["bun", "run", "dev:backend"]
|
package/Dockerfile.frontend
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# FluxStack Frontend-Only Docker Image
|
|
2
|
-
FROM oven/bun:1.1-alpine AS base
|
|
3
|
-
|
|
4
|
-
WORKDIR /app
|
|
5
|
-
|
|
6
|
-
# Install dependencies
|
|
7
|
-
COPY package.json bun.lockb* bunfig.toml ./
|
|
8
|
-
RUN bun install --frozen-lockfile
|
|
9
|
-
|
|
10
|
-
# Copy frontend source
|
|
11
|
-
COPY app/client/ ./app/client/
|
|
12
|
-
COPY app/shared/ ./app/shared/
|
|
13
|
-
COPY core/client/ ./core/client/
|
|
14
|
-
COPY core/config/ ./core/config/
|
|
15
|
-
COPY core/utils/ ./core/utils/
|
|
16
|
-
|
|
17
|
-
# Build frontend for production
|
|
18
|
-
COPY config/ ./config/
|
|
19
|
-
RUN cd app/client && bun run build
|
|
20
|
-
|
|
21
|
-
# Production stage with nginx for serving static files
|
|
22
|
-
FROM nginx:alpine AS production
|
|
23
|
-
|
|
24
|
-
# Copy built frontend
|
|
25
|
-
COPY --from=base /app/app/client/dist /usr/share/nginx/html
|
|
26
|
-
|
|
27
|
-
# Create nginx config for SPA routing
|
|
28
|
-
RUN echo 'server {\
|
|
29
|
-
listen 80;\
|
|
30
|
-
server_name localhost;\
|
|
31
|
-
root /usr/share/nginx/html;\
|
|
32
|
-
index index.html;\
|
|
33
|
-
\
|
|
34
|
-
location / {\
|
|
35
|
-
try_files $uri $uri/ /index.html;\
|
|
36
|
-
}\
|
|
37
|
-
\
|
|
38
|
-
location /health {\
|
|
39
|
-
access_log off;\
|
|
40
|
-
return 200 "healthy\\n";\
|
|
41
|
-
add_header Content-Type text/plain;\
|
|
42
|
-
}\
|
|
43
|
-
}' > /etc/nginx/conf.d/default.conf
|
|
44
|
-
|
|
45
|
-
# Environment for frontend-only
|
|
46
|
-
ENV API_URL=http://backend:3001
|
|
47
|
-
|
|
48
|
-
EXPOSE 80
|
|
49
|
-
|
|
50
|
-
# Health check
|
|
51
|
-
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
52
|
-
CMD curl -f http://localhost/health || exit 1
|
|
53
|
-
|
|
54
|
-
CMD ["nginx", "-g", "daemon off;"]
|
package/README-Docker.md
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# FluxStack Docker Deployment Options
|
|
2
|
-
|
|
3
|
-
## 🚀 Quick Start (Recommended for Development)
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
# Simple microservices (no load balancer)
|
|
7
|
-
docker-compose -f docker-compose.simple.yml up --build
|
|
8
|
-
|
|
9
|
-
# Access:
|
|
10
|
-
# Frontend: http://localhost:8080
|
|
11
|
-
# API: http://localhost:3001
|
|
12
|
-
# Database: localhost:5432
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## 📋 Available Architectures
|
|
16
|
-
|
|
17
|
-
### 1. **Monolithic** (All-in-one)
|
|
18
|
-
```bash
|
|
19
|
-
docker-compose up --build
|
|
20
|
-
# Everything at: http://localhost:3000
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### 2. **Simple Microservices** (Recommended)
|
|
24
|
-
```bash
|
|
25
|
-
docker-compose -f docker-compose.simple.yml up --build
|
|
26
|
-
# Frontend: http://localhost:8080
|
|
27
|
-
# API: http://localhost:3001
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### 3. **Enterprise Microservices** (with Load Balancer)
|
|
31
|
-
```bash
|
|
32
|
-
docker-compose -f docker-compose.microservices.yml up --build
|
|
33
|
-
# Unified access: http://localhost:3000
|
|
34
|
-
# Load balancer routes /api/* to backend, /* to frontend
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 4. **Individual Services**
|
|
38
|
-
```bash
|
|
39
|
-
# Backend only
|
|
40
|
-
docker build -f Dockerfile.backend -t fluxstack-backend .
|
|
41
|
-
docker run -p 3001:3001 fluxstack-backend
|
|
42
|
-
|
|
43
|
-
# Frontend only
|
|
44
|
-
docker build -f Dockerfile.frontend -t fluxstack-frontend .
|
|
45
|
-
docker run -p 8080:80 fluxstack-frontend
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## 🎯 When to Use Each
|
|
49
|
-
|
|
50
|
-
| Architecture | Use Case | Pros | Cons |
|
|
51
|
-
|-------------|----------|------|------|
|
|
52
|
-
| **Monolithic** | Small projects, prototyping | Simple, fast development | Single point of failure |
|
|
53
|
-
| **Simple Microservices** | Most development scenarios | Clean separation, direct access | Manual routing |
|
|
54
|
-
| **Enterprise** | Production, complex routing | Unified access, SSL, scaling | More complexity |
|
|
55
|
-
| **Individual** | Testing, CI/CD pipelines | Maximum flexibility | Manual orchestration |
|
|
56
|
-
|
|
57
|
-
## 🔧 Adding Load Balancer Later
|
|
58
|
-
|
|
59
|
-
If you start with simple microservices and want to add load balancing:
|
|
60
|
-
|
|
61
|
-
1. Copy `nginx-lb.conf` and customize routing rules
|
|
62
|
-
2. Add nginx service to your docker-compose:
|
|
63
|
-
```yaml
|
|
64
|
-
nginx-lb:
|
|
65
|
-
image: nginx:alpine
|
|
66
|
-
ports:
|
|
67
|
-
- "3000:80"
|
|
68
|
-
volumes:
|
|
69
|
-
- ./nginx-lb.conf:/etc/nginx/conf.d/default.conf
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## 🌐 Network Access
|
|
73
|
-
|
|
74
|
-
- **Development**: Use `docker-compose.simple.yml`
|
|
75
|
-
- **External access**: Services bind to `0.0.0.0` by default
|
|
76
|
-
- **CORS**: Configure your specific IPs in backend environment variables
|
|
77
|
-
- **Custom IPs**: Add your network IP to CORS_ORIGINS for external access
|
|
78
|
-
|
|
79
|
-
## 📊 Resource Usage
|
|
80
|
-
|
|
81
|
-
| Mode | Containers | Memory | Startup Time |
|
|
82
|
-
|------|-----------|---------|--------------|
|
|
83
|
-
| Monolithic | 1 | ~200MB | ~10s |
|
|
84
|
-
| Simple | 3 | ~400MB | ~15s |
|
|
85
|
-
| Enterprise | 4 | ~500MB | ~20s |
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# ⚡ FluxStack - Quick Start para LLMs
|
|
2
|
-
|
|
3
|
-
> **🎯 Objetivo**: Entender e usar FluxStack em < 2 minutos
|
|
4
|
-
|
|
5
|
-
## 🚀 **Comandos Essenciais** (30 segundos)
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Desenvolvimento (escolha UM)
|
|
9
|
-
bun run dev # ✅ Full-stack (recomendado)
|
|
10
|
-
bun run dev:clean # ✅ Output limpo (sem logs HEAD do Elysia)
|
|
11
|
-
|
|
12
|
-
# Build e Deploy
|
|
13
|
-
bun run build # Build completo
|
|
14
|
-
bun run start # Produção
|
|
15
|
-
|
|
16
|
-
# URLs Importantes
|
|
17
|
-
http://localhost:3000 # Backend API
|
|
18
|
-
http://localhost:5173 # Frontend React
|
|
19
|
-
http://localhost:3000/swagger # Documentação API
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 📁 **Estrutura Crítica** (30 segundos)
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
FluxStack/
|
|
26
|
-
├── core/ # 🔒 FRAMEWORK - NUNCA EDITAR!
|
|
27
|
-
├── app/ # 👨💻 SEU CÓDIGO AQUI
|
|
28
|
-
│ ├── server/ # Backend (controllers, routes)
|
|
29
|
-
│ ├── client/ # Frontend (components, pages)
|
|
30
|
-
│ └── shared/ # Types compartilhados
|
|
31
|
-
└── ai-context/ # 📖 Esta documentação
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## ⚡ **Regras de Ouro** (30 segundos)
|
|
35
|
-
|
|
36
|
-
### ❌ NUNCA FAZER:
|
|
37
|
-
- Editar `core/` (framework read-only)
|
|
38
|
-
- Usar `apiCall()` wrapper (quebra type inference)
|
|
39
|
-
- Criar types manuais para Eden Treaty
|
|
40
|
-
|
|
41
|
-
### ✅ SEMPRE FAZER:
|
|
42
|
-
- Trabalhar em `app/`
|
|
43
|
-
- Usar Eden Treaty nativo: `const { data, error } = await api.users.get()`
|
|
44
|
-
- Manter types em `app/shared/`
|
|
45
|
-
|
|
46
|
-
## 🎯 **Navegação Rápida** (30 segundos)
|
|
47
|
-
|
|
48
|
-
### Cenário 1: "Criar nova funcionalidade"
|
|
49
|
-
→ [`development/patterns.md`](./development/patterns.md) + [`examples/crud-complete.md`](./examples/crud-complete.md)
|
|
50
|
-
|
|
51
|
-
### Cenário 2: "Entender Eden Treaty"
|
|
52
|
-
→ [`development/eden-treaty-guide.md`](./development/eden-treaty-guide.md) + [`recent-changes/eden-treaty-refactor.md`](./recent-changes/eden-treaty-refactor.md)
|
|
53
|
-
|
|
54
|
-
### Cenário 3: "Corrigir erro"
|
|
55
|
-
→ [`reference/troubleshooting.md`](./reference/troubleshooting.md)
|
|
56
|
-
|
|
57
|
-
### Cenário 4: "Entender arquitetura"
|
|
58
|
-
→ [`project/overview.md`](./project/overview.md) + [`project/architecture.md`](./project/architecture.md)
|
|
59
|
-
|
|
60
|
-
### Cenário 5: "Ver mudanças recentes"
|
|
61
|
-
→ [`recent-changes/`](./recent-changes/) (Eden Treaty, tipos, monorepo)
|
|
62
|
-
|
|
63
|
-
## 🔥 **Estado Atual** (15 segundos)
|
|
64
|
-
|
|
65
|
-
- **✅ Eden Treaty NATIVO**: Type inference automática funcionando
|
|
66
|
-
- **✅ Monorepo estável**: Uma instalação, hot reload independente
|
|
67
|
-
- **✅ Zero erros TypeScript**: Sistema 100% type-safe
|
|
68
|
-
- **✅ Response schemas**: API com documentação automática
|
|
69
|
-
|
|
70
|
-
## 📚 **Documentação Completa**
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
ai-context/
|
|
74
|
-
├── 00-QUICK-START.md # ⚡ Você está aqui
|
|
75
|
-
├── project/ # 📊 Visão geral e arquitetura
|
|
76
|
-
├── development/ # 👨💻 Padrões e guias
|
|
77
|
-
├── reference/ # 📚 Referência técnica
|
|
78
|
-
├── examples/ # 💡 Código prático
|
|
79
|
-
└── recent-changes/ # 🔥 Mudanças importantes
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
**🎯 Em 2 minutos você já sabe**: comandos, estrutura, regras e onde encontrar cada informação!
|
|
85
|
-
|
|
86
|
-
**🚀 Próximo passo**: Escolha um dos cenários acima e vá direto ao arquivo relevante!
|
package/ai-context/README.md
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# 🤖 AI Context - FluxStack Documentation
|
|
2
|
-
|
|
3
|
-
> **Documentação especializada para LLMs trabalharem eficientemente com FluxStack**
|
|
4
|
-
|
|
5
|
-
## 🎯 **Início Rápido**
|
|
6
|
-
|
|
7
|
-
👉 **[00-QUICK-START.md](./00-QUICK-START.md)** - Entenda tudo em 2 minutos!
|
|
8
|
-
|
|
9
|
-
## 📚 **Estrutura da Documentação**
|
|
10
|
-
|
|
11
|
-
### ⚡ **[00-QUICK-START.md](./00-QUICK-START.md)**
|
|
12
|
-
**Ponto de entrada ultra-rápido** - Comandos, estrutura, regras e navegação em 2 minutos
|
|
13
|
-
|
|
14
|
-
### 📊 **[project/](./project/)**
|
|
15
|
-
**Visão geral e arquitetura do projeto**
|
|
16
|
-
- [`overview.md`](./project/overview.md) - Estado atual, stack, funcionalidades
|
|
17
|
-
- [`architecture.md`](./project/architecture.md) - Como o framework funciona
|
|
18
|
-
- [`changelog.md`](./project/changelog.md) - Mudanças importantes v1.4→v1.5
|
|
19
|
-
|
|
20
|
-
### 👨💻 **[development/](./development/)**
|
|
21
|
-
**Padrões e guias de desenvolvimento**
|
|
22
|
-
- [`patterns.md`](./development/patterns.md) - Padrões fundamentais e boas práticas
|
|
23
|
-
- [`api-creation.md`](./development/api-creation.md) - Como criar APIs step-by-step
|
|
24
|
-
- [`frontend-patterns.md`](./development/frontend-patterns.md) - Padrões React específicos
|
|
25
|
-
- [`eden-treaty-guide.md`](./development/eden-treaty-guide.md) - 🔥 Guia Eden Treaty completo
|
|
26
|
-
|
|
27
|
-
### 📚 **[reference/](./reference/)**
|
|
28
|
-
**Referência técnica completa**
|
|
29
|
-
- [`api-reference.md`](./reference/api-reference.md) - APIs do framework
|
|
30
|
-
- [`cli-commands.md`](./reference/cli-commands.md) - Todos os comandos disponíveis
|
|
31
|
-
- [`environment-vars.md`](./reference/environment-vars.md) - Variáveis de ambiente
|
|
32
|
-
- [`troubleshooting.md`](./reference/troubleshooting.md) - Solução de problemas
|
|
33
|
-
|
|
34
|
-
### 💡 **[examples/](./examples/)**
|
|
35
|
-
**Exemplos práticos e código real**
|
|
36
|
-
- [`crud-complete.md`](./examples/crud-complete.md) - CRUD completo com Eden Treaty
|
|
37
|
-
- [`plugin-creation.md`](./examples/plugin-creation.md) - Como criar plugins
|
|
38
|
-
- [`testing-patterns.md`](./examples/testing-patterns.md) - Padrões de teste
|
|
39
|
-
|
|
40
|
-
### 🔥 **[recent-changes/](./recent-changes/)**
|
|
41
|
-
**Mudanças importantes e contexto recente**
|
|
42
|
-
- [`eden-treaty-refactor.md`](./recent-changes/eden-treaty-refactor.md) - Refatoração completa
|
|
43
|
-
- [`type-inference-fix.md`](./recent-changes/type-inference-fix.md) - Fix de inferência
|
|
44
|
-
- [`monorepo-updates.md`](./recent-changes/monorepo-updates.md) - Atualizações estruturais
|
|
45
|
-
|
|
46
|
-
## 🎯 **Cenários de Uso Comum**
|
|
47
|
-
|
|
48
|
-
| Cenário | Documentos Recomendados |
|
|
49
|
-
|---------|------------------------|
|
|
50
|
-
| **🆕 Primeira vez** | [`00-QUICK-START.md`](./00-QUICK-START.md) → [`project/overview.md`](./project/overview.md) |
|
|
51
|
-
| **🛠️ Criar funcionalidade** | [`development/patterns.md`](./development/patterns.md) + [`examples/crud-complete.md`](./examples/crud-complete.md) |
|
|
52
|
-
| **🔧 Eden Treaty** | [`development/eden-treaty-guide.md`](./development/eden-treaty-guide.md) + [`recent-changes/eden-treaty-refactor.md`](./recent-changes/eden-treaty-refactor.md) |
|
|
53
|
-
| **🐛 Debugar erro** | [`reference/troubleshooting.md`](./reference/troubleshooting.md) |
|
|
54
|
-
| **🏗️ Arquitetura** | [`project/architecture.md`](./project/architecture.md) |
|
|
55
|
-
| **📖 Referência** | [`reference/api-reference.md`](./reference/api-reference.md) |
|
|
56
|
-
|
|
57
|
-
## 🚨 **Regras Críticas**
|
|
58
|
-
|
|
59
|
-
### ❌ **NUNCA FAZER**
|
|
60
|
-
- Editar arquivos em `core/` (framework read-only)
|
|
61
|
-
- Usar `apiCall()` wrapper (quebra type inference)
|
|
62
|
-
- Criar types manuais para Eden Treaty
|
|
63
|
-
- Ignorar response schemas nas rotas
|
|
64
|
-
|
|
65
|
-
### ✅ **SEMPRE FAZER**
|
|
66
|
-
- Trabalhar em `app/` (código da aplicação)
|
|
67
|
-
- Usar Eden Treaty nativo: `const { data, error } = await api.users.get()`
|
|
68
|
-
- Manter types compartilhados em `app/shared/`
|
|
69
|
-
- Testar com `bun run dev`
|
|
70
|
-
|
|
71
|
-
## 📊 **Estado Atual (v1.5+)**
|
|
72
|
-
|
|
73
|
-
- **✅ Eden Treaty Nativo**: Type inference automática
|
|
74
|
-
- **✅ Zero Tipos Unknown**: Inferência funcionando perfeitamente
|
|
75
|
-
- **✅ Monorepo Estável**: Hot reload independente
|
|
76
|
-
- **✅ Response Schemas**: API documentada automaticamente
|
|
77
|
-
- **✅ Type Safety**: End-to-end sem declarações manuais
|
|
78
|
-
|
|
79
|
-
## 🆘 **Suporte Rápido**
|
|
80
|
-
|
|
81
|
-
1. **Erro específico?** → [`reference/troubleshooting.md`](./reference/troubleshooting.md)
|
|
82
|
-
2. **Como fazer X?** → [`development/patterns.md`](./development/patterns.md)
|
|
83
|
-
3. **Eden Treaty?** → [`development/eden-treaty-guide.md`](./development/eden-treaty-guide.md)
|
|
84
|
-
4. **Não entendo nada?** → [`00-QUICK-START.md`](./00-QUICK-START.md)
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
**🎯 Objetivo**: Capacitar LLMs a trabalhar eficientemente com FluxStack, seguindo padrões estabelecidos e garantindo código de alta qualidade.
|