Skip to content

Commit 60b1978

Browse files
Merge pull request #3 from MarcosBrendonDePaula/feature/tailwind-integration
Feature/tailwind integration
2 parents 09def56 + 2c5003e commit 60b1978

File tree

17 files changed

+1902
-350
lines changed

17 files changed

+1902
-350
lines changed

.claude/settings.local.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@
3232
"Bash(tsc --noEmit)",
3333
"WebSearch",
3434
"WebFetch(domain:elysiajs.com)",
35-
"Bash(tree:*)"
35+
"Bash(tree:*)",
36+
"Bash(git checkout:*)",
37+
"Bash(npx tailwindcss init:*)",
38+
"Bash(pkill:*)",
39+
"Bash(taskkill:*)",
40+
"Bash(npx eslint:*)",
41+
"Bash(export NODE_ENV=production)"
3642
],
3743
"deny": []
3844
}

app/client/src/App.tsx

Lines changed: 430 additions & 257 deletions
Large diffs are not rendered by default.

app/client/src/index.css

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
@import "tailwindcss";
2+
3+
/* Custom CSS variables for dynamic colors */
4+
:root {
5+
--gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
6+
--gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
7+
--gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
8+
}
9+
10+
/* Base styles with improved typography */
11+
* {
12+
box-sizing: border-box;
13+
}
14+
15+
body {
16+
margin: 0;
17+
padding: 0;
18+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
19+
-webkit-font-smoothing: antialiased;
20+
-moz-osx-font-smoothing: grayscale;
21+
line-height: 1.6;
22+
}
23+
24+
/* Smooth scrolling */
25+
html {
26+
scroll-behavior: smooth;
27+
}
28+
29+
/* Custom scrollbar for webkit browsers */
30+
::-webkit-scrollbar {
31+
width: 8px;
32+
}
33+
34+
::-webkit-scrollbar-track {
35+
background: #f1f5f9;
36+
}
37+
38+
::-webkit-scrollbar-thumb {
39+
background: #cbd5e1;
40+
border-radius: 4px;
41+
}
42+
43+
::-webkit-scrollbar-thumb:hover {
44+
background: #94a3b8;
45+
}
46+
47+
/* Focus styles for accessibility */
48+
*:focus {
49+
outline: 2px solid #3b82f6;
50+
outline-offset: 2px;
51+
}

app/server/index.ts

Lines changed: 11 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// User application entry point
2-
import { FluxStackFramework, loggerPlugin, vitePlugin, swaggerPlugin } from "@/core/server"
2+
import { FluxStackFramework, loggerPlugin, vitePlugin, swaggerPlugin, staticPlugin } from "@/core/server"
3+
import { isDevelopment } from "@/core/utils/helpers"
34
import { apiRoutes } from "./routes"
45

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

3637

3738
// Usar plugins de infraestrutura primeiro (mas NÃO o Swagger ainda)
38-
app
39-
.use(loggerPlugin)
40-
.use(vitePlugin)
39+
app.use(loggerPlugin)
40+
41+
// Usar plugins condicionalmente baseado no ambiente
42+
if (isDevelopment()) {
43+
app.use(vitePlugin)
44+
} else {
45+
app.use(staticPlugin)
46+
}
4147

4248

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

4955

5056

51-
// Configurar proxy/static files
52-
const framework = app.getApp()
53-
const context = app.getContext()
54-
55-
if (context.isDevelopment) {
56-
// Import the proxy function from the Vite plugin
57-
const { proxyToVite } = await import("@/core/plugins/built-in/vite")
58-
59-
// Proxy para Vite em desenvolvimento com detecção automática de porta
60-
framework.get("*", async ({ request }) => {
61-
const url = new URL(request.url)
62-
63-
if (url.pathname.startsWith("/api")) {
64-
return new Response("Not Found", { status: 404 })
65-
}
66-
67-
// Use the intelligent proxy function that auto-detects the port
68-
const vitePort = context.config.client?.port || 5173
69-
return await proxyToVite(request, "localhost", vitePort, 5000)
70-
})
71-
} else {
72-
// Servir arquivos estáticos em produção
73-
const { join } = await import("path")
74-
75-
framework.get("*", ({ request }) => {
76-
const url = new URL(request.url)
77-
const clientDistPath = join(process.cwd(), "app/client/dist")
78-
const filePath = join(clientDistPath, url.pathname)
79-
80-
if (!url.pathname.includes(".")) {
81-
return Bun.file(join(clientDistPath, "index.html"))
82-
}
83-
84-
return Bun.file(filePath)
85-
})
86-
}
87-
8857
// Iniciar servidor
8958
app.listen()
9059

9160
// Exportar tipo da aplicação para Eden Treaty (método correto)
92-
export type App = typeof framework
61+
export type App = typeof app

bun.lock

Lines changed: 109 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)