From cd97378a42aa2f732befb95fa025b63d5602bce2 Mon Sep 17 00:00:00 2001 From: CodeMaster4711 Date: Fri, 14 Nov 2025 20:34:15 +0100 Subject: [PATCH 1/5] fix: docker dev run --- backend/Cargo.lock | 2 +- backend/Dockerfile | 39 ++++++++++++++++++++++++--------------- backend/Dockerfile.dev | 29 +++++++++++++++++++++++++++++ docker-compose.dev.yml | 5 +++-- 4 files changed, 57 insertions(+), 18 deletions(-) create mode 100644 backend/Dockerfile.dev diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 878fe7c..aa9546d 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -341,7 +341,7 @@ dependencies = [ [[package]] name = "backend" -version = "0.1.4" +version = "0.1.6" dependencies = [ "async-trait", "axum", diff --git a/backend/Dockerfile b/backend/Dockerfile index 3ad2172..593849e 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -14,23 +14,32 @@ RUN apt-get update && apt-get install -y \ sqlite3 \ && rm -rf /var/lib/apt/lists/* -# Copy dependencies manifests -COPY Cargo.toml Cargo.lock ./ -COPY migration/Cargo.toml ./migration/Cargo.toml -COPY entity/Cargo.toml ./entity/Cargo.toml - -# Create a dummy lib.rs to cache dependencies -RUN mkdir -p src && echo "fn main() {}" > src/main.rs -RUN mkdir -p migration/src && touch migration/src/lib.rs -RUN mkdir -p entity/src && touch entity/src/lib.rs +# Copy workspace Cargo files +COPY Cargo.toml ./ +COPY migration/Cargo.toml ./migration/ +COPY entity/Cargo.toml ./entity/ + +# Create dummy source files for dependency caching +RUN mkdir -p src && \ + echo "fn main() {}" > src/main.rs && \ + mkdir -p migration/src && \ + echo "pub use sea_orm_migration::prelude::*; pub struct Migrator; impl MigratorTrait for Migrator { fn migrations() -> Vec> { vec![] } }" > migration/src/lib.rs && \ + mkdir -p entity/src && \ + echo "pub mod entities; pub mod prelude; pub use entities::*;" > entity/src/lib.rs && \ + mkdir -p entity/src/entities && \ + echo "pub mod prelude { pub use super::*; }" > entity/src/entities/mod.rs + +# Build dependencies (this will be cached) +RUN cargo build --release || true + +# Copy all source code +COPY migration/src ./migration/src +COPY entity/src ./entity/src +COPY src ./src + +# Build the actual application RUN cargo build --release -# Copy the rest of the source code -COPY . . - -# Rebuild with real source -RUN touch src/main.rs && cargo build --release - ################### # Final Runtime Stage ################### diff --git a/backend/Dockerfile.dev b/backend/Dockerfile.dev new file mode 100644 index 0000000..c58f0f5 --- /dev/null +++ b/backend/Dockerfile.dev @@ -0,0 +1,29 @@ +# Development Dockerfile for FinanceVault Backend +FROM rust:latest + +WORKDIR /usr/src/app + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + pkg-config \ + libssl-dev \ + sqlite3 \ + && rm -rf /var/lib/apt/lists/* + +# Install cargo-watch for hot reload +RUN cargo install cargo-watch + +# Create data directory for SQLite +RUN mkdir -p /data + +# Expose backend port +EXPOSE 8000 + +# Set environment variables +ENV DATABASE_URL=sqlite:/data/finance.db +ENV RUST_LOG=debug +ENV CARGO_HOME=/usr/local/cargo + +# The source code will be mounted as a volume +# Command will be overridden in docker-compose.dev.yml +CMD ["cargo", "watch", "-x", "run"] diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 30e5597..c387783 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -22,7 +22,7 @@ services: - .env build: context: ./backend - dockerfile: Dockerfile + dockerfile: Dockerfile.dev ports: - "8000:8000" volumes: @@ -34,7 +34,8 @@ services: - DATABASE_URL=sqlite:/data/finance.db - CARGO_HOME=/usr/local/cargo - JWT_SECRET=${JWT_SECRET} - command: sh -c "cargo install cargo-watch && JWT_SECRET=${JWT_SECRET} cargo watch -x run" + - RUST_LOG=debug + command: cargo watch -x run volumes: cargo_registry: From 0db09b995bbc598e5659884314a52cb0321b61be Mon Sep 17 00:00:00 2001 From: CodeMaster4711 Date: Fri, 14 Nov 2025 20:48:23 +0100 Subject: [PATCH 2/5] style: new signup and signin design --- frontend/src/app.css | 6 +- .../lib/components/login-form-client.svelte | 73 ++-- .../lib/components/signup-form-client.svelte | 338 +++++++++++++++--- frontend/src/routes/signup/+page.svelte | 6 +- 4 files changed, 308 insertions(+), 115 deletions(-) diff --git a/frontend/src/app.css b/frontend/src/app.css index ab38e2d..7e97c8d 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -58,10 +58,10 @@ --border: oklch(1 0 0 / 10%); --input: oklch(1 0 0 / 15%); --ring: oklch(0.541 0.281 293.009); - --chart-1: oklch(0.488 0.243 264.376); - --chart-2: oklch(0.696 0.17 162.48); + --chart-1: oklch(59.651% 0.28069 318.49); + --chart-2: oklch(43.953% 0.21478 294.435); --chart-3: oklch(0.769 0.188 70.08); - --chart-4: oklch(0.627 0.265 303.9); + --chart-4: oklch(57.951% 0.2596 315.282); --chart-5: oklch(0.645 0.246 16.439); --sidebar: oklch(0.21 0.006 285.885); --sidebar-foreground: oklch(0.985 0 0); diff --git a/frontend/src/lib/components/login-form-client.svelte b/frontend/src/lib/components/login-form-client.svelte index 58c54f6..6e4baa4 100644 --- a/frontend/src/lib/components/login-form-client.svelte +++ b/frontend/src/lib/components/login-form-client.svelte @@ -111,24 +111,6 @@ isLoading = false; } } - - const features = [ - { - icon: "🔒", - title: "Sicherheit", - description: "Bank-grade Verschlüsselung", - }, - { - icon: "📊", - title: "Analytics", - description: "Detaillierte Finanzanalysen", - }, - { - icon: "⚡", - title: "Schnell", - description: "Blitzschnelle Performance", - }, - ];
@@ -214,9 +196,7 @@