feat: Reinitialize frontend with SvelteKit and TypeScript

- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
This commit is contained in:
2026-02-17 16:19:59 -05:00
parent 54df6018f5
commit f935754df4
120 changed files with 21772 additions and 90 deletions

103
docker-compose.yml Normal file
View File

@@ -0,0 +1,103 @@
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:latest
container_name: headroom-postgres
restart: unless-stopped
environment:
POSTGRES_DB: headroom
POSTGRES_USER: headroom
POSTGRES_PASSWORD: ${DB_PASSWORD:-headroom_secret}
volumes:
- ./data/postgres:/var/lib/postgresql
ports:
- "5432:5432"
networks:
- headroom-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U headroom"]
interval: 10s
timeout: 5s
retries: 5
# Redis Cache
redis:
image: redis:alpine
container_name: headroom-redis
restart: unless-stopped
volumes:
- ./data/redis:/data
ports:
- "6379:6379"
networks:
- headroom-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Laravel Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: headroom-backend
restart: unless-stopped
working_dir: /var/www/html
volumes:
- ./backend:/var/www/html
- /var/www/html/vendor
ports:
- "3000:3000"
environment:
- APP_ENV=local
- APP_DEBUG=true
- DB_CONNECTION=pgsql
- DB_HOST=postgres
- DB_PORT=5432
- DB_DATABASE=headroom
- DB_USERNAME=headroom
- DB_PASSWORD=${DB_PASSWORD:-headroom_secret}
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=${REDIS_PASSWORD:-null}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- headroom-network
# SvelteKit Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: headroom-frontend
restart: unless-stopped
working_dir: /app
volumes:
- ./frontend:/app
- /app/node_modules
ports:
- "5173:5173"
environment:
- NODE_ENV=development
- PORT=5173
- VITE_API_URL=http://localhost:3000/api
depends_on:
- backend
networks:
- headroom-network
networks:
headroom-network:
driver: bridge
volumes:
postgres_data:
redis_data: