Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@
"Bash(tsc --noEmit)",
"WebSearch",
"WebFetch(domain:elysiajs.com)",
"Bash(tree:*)"
"Bash(tree:*)",
"Bash(git checkout:*)",
"Bash(npx tailwindcss init:*)",
"Bash(pkill:*)",
"Bash(taskkill:*)",
"Bash(npx eslint:*)",
"Bash(export NODE_ENV=production)"
],
"deny": []
}
Expand Down
687 changes: 430 additions & 257 deletions app/client/src/App.tsx

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions app/client/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@import "tailwindcss";

/* Custom CSS variables for dynamic colors */
:root {
--gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
--gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Base styles with improved typography */
* {
box-sizing: border-box;
}

body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 1.6;
}

/* Smooth scrolling */
html {
scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
width: 8px;
}

::-webkit-scrollbar-track {
background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}

/* Focus styles for accessibility */
*:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
53 changes: 11 additions & 42 deletions app/server/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// User application entry point
import { FluxStackFramework, loggerPlugin, vitePlugin, swaggerPlugin } from "@/core/server"
import { FluxStackFramework, loggerPlugin, vitePlugin, swaggerPlugin, staticPlugin } from "@/core/server"
import { isDevelopment } from "@/core/utils/helpers"
import { apiRoutes } from "./routes"

// Criar aplicação com framework
Expand Down Expand Up @@ -35,9 +36,14 @@ const app = new FluxStackFramework({


// Usar plugins de infraestrutura primeiro (mas NÃO o Swagger ainda)
app
.use(loggerPlugin)
.use(vitePlugin)
app.use(loggerPlugin)

// Usar plugins condicionalmente baseado no ambiente
if (isDevelopment()) {
app.use(vitePlugin)
} else {
app.use(staticPlugin)
}


// Registrar rotas da aplicação PRIMEIRO
Expand All @@ -48,45 +54,8 @@ app.use(swaggerPlugin)



// Configurar proxy/static files
const framework = app.getApp()
const context = app.getContext()

if (context.isDevelopment) {
// Import the proxy function from the Vite plugin
const { proxyToVite } = await import("@/core/plugins/built-in/vite")

// Proxy para Vite em desenvolvimento com detecção automática de porta
framework.get("*", async ({ request }) => {
const url = new URL(request.url)

if (url.pathname.startsWith("/api")) {
return new Response("Not Found", { status: 404 })
}

// Use the intelligent proxy function that auto-detects the port
const vitePort = context.config.client?.port || 5173
return await proxyToVite(request, "localhost", vitePort, 5000)
})
} else {
// Servir arquivos estáticos em produção
const { join } = await import("path")

framework.get("*", ({ request }) => {
const url = new URL(request.url)
const clientDistPath = join(process.cwd(), "app/client/dist")
const filePath = join(clientDistPath, url.pathname)

if (!url.pathname.includes(".")) {
return Bun.file(join(clientDistPath, "index.html"))
}

return Bun.file(filePath)
})
}

// Iniciar servidor
app.listen()

// Exportar tipo da aplicação para Eden Treaty (método correto)
export type App = typeof framework
export type App = typeof app
110 changes: 109 additions & 1 deletion bun.lock

Large diffs are not rendered by default.

Loading
Loading