Clean working version: deployed TypeScript backend + JSX frontend

- Replace old JS backend with working TypeScript backend from deployed containers
- Backend: Fastify + better-sqlite3 + Yjs CRDT, 17 TS source files, 13 test files
- Frontend: React JSX with fabric.js CAD canvas, vite build, nginx serving
- Fix nginx proxy port 5000→3001 to match backend
- Fix docker-compose port mapping 5000→3001
- Fix vite dev proxy port 5000→3001
- Add backend healthcheck to docker-compose
- Update index.html title to 'Web CAD', lang to 'de'
- Add .a0/ to .gitignore
- Remove old JS backend files (models, routes, config, middleware, seed)
- Remove tracked build artifacts (backend/public/)
This commit is contained in:
Agent Zero
2026-06-28 01:24:31 +02:00
parent 249d5fbdb6
commit 8fa6f795c0
60 changed files with 8988 additions and 3708 deletions
+2 -2
View File
@@ -1,10 +1,10 @@
<!doctype html>
<html lang="en">
<html lang="de">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>frontend</title>
<title>Web CAD</title>
</head>
<body>
<div id="root"></div>
+19 -20
View File
@@ -1,25 +1,24 @@
server {
listen 80;
server_name localhost;
listen 80;
root /usr/share/nginx/html;
index index.html;
root /usr/share/nginx/html;
index index.html;
resolver 127.0.0.11 valid=30s;
# Serve static frontend
location / {
try_files $uri /index.html;
}
location / { try_files $uri $uri/ /index.html; }
# Proxy API requests to backend
location /api/ {
proxy_pass http://backend:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /api/ {
set $backend http://backend:3001;
proxy_pass $backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /ws {
set $backend http://backend:3001;
proxy_pass $backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
+5080 -420
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -5,7 +5,7 @@ export default defineConfig({
plugins: [react()],
server: {
proxy: {
'/api': 'http://localhost:5000',
'/api': 'http://localhost:3001',
},
},
preview: {