diff --git a/apps/desktop-wallet/Dockerfile b/apps/desktop-wallet/Dockerfile new file mode 100644 index 0000000..1a31d93 --- /dev/null +++ b/apps/desktop-wallet/Dockerfile @@ -0,0 +1,104 @@ +# Dockerfile for building Synor Desktop Wallet +# Multi-stage build: Frontend (Node) + Backend (Rust/Tauri) + +# ============================================================================== +# Stage 1: Build Frontend +# ============================================================================== +FROM node:20-bookworm AS frontend-builder + +WORKDIR /app + +# Install pnpm +RUN npm install -g pnpm + +# Copy package files +COPY package.json pnpm-lock.yaml* ./ + +# Install dependencies +RUN pnpm install --frozen-lockfile || pnpm install + +# Copy source files +COPY . . + +# Build frontend +RUN pnpm build + +# ============================================================================== +# Stage 2: Build Tauri Backend +# ============================================================================== +FROM rust:1.85-bookworm AS backend-builder + +# Install Tauri build dependencies +RUN apt-get update && apt-get install -y \ + libwebkit2gtk-4.1-dev \ + build-essential \ + curl \ + wget \ + file \ + libssl-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + cmake \ + clang \ + libclang-dev \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +# Copy Rust workspace files from root +COPY --from=frontend-builder /app/dist ./dist + +# Copy Tauri source +COPY src-tauri ./src-tauri + +# Copy monorepo crates (needed for local dependencies) +# Note: In CI/CD, this would be handled differently +COPY ../../../crates ./crates 2>/dev/null || true + +WORKDIR /app/src-tauri + +# Build release binary +RUN cargo build --release + +# ============================================================================== +# Stage 3: Development environment +# ============================================================================== +FROM node:20-bookworm AS development + +# Install Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" + +# Install Tauri dependencies +RUN apt-get update && apt-get install -y \ + libwebkit2gtk-4.1-dev \ + build-essential \ + curl \ + wget \ + file \ + libssl-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + cmake \ + clang \ + libclang-dev \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* + +# Install pnpm and Tauri CLI +RUN npm install -g pnpm + +WORKDIR /app + +# Copy everything +COPY . . + +# Install dependencies +RUN pnpm install + +# Install Tauri CLI globally +RUN cargo install tauri-cli --version "^2.0.0" + +# Default command for development +CMD ["pnpm", "tauri", "dev"] diff --git a/apps/desktop-wallet/index.html b/apps/desktop-wallet/index.html new file mode 100644 index 0000000..de04174 --- /dev/null +++ b/apps/desktop-wallet/index.html @@ -0,0 +1,13 @@ + + +
+ + + ++ This password will encrypt your wallet. You'll need it every time + you open the app. +
+ +
+
+ Write down these 24 words in order. This is the ONLY way to + recover your wallet if you lose access. +
+ + {/* Security countdown timer */} + {!mnemonicHidden && ( ++ Recovery phrase hidden for security +
++ If you haven't saved it, go back and create a new wallet. +
+ ++ Never share your recovery phrase. Anyone with these words can + steal your funds. +
++ Enter word #{verifyIndex + 1} from your recovery phrase to verify + you've saved it correctly. +
+ +
+
Total Balance
++ {balance?.balanceHuman || '0 SYN'} +
+ {balance?.pending ? ( ++ +{(balance.pending / 100_000_000).toFixed(8)} SYN pending +
+ ) : null} +Transfer SYN
+Get your address
+Status
++ {networkStatus.connected ? ( + Connected + ) : ( + Disconnected + )} +
+Network
++ {networkStatus.network || '-'} +
+Block Height
++ {networkStatus.blockHeight?.toLocaleString() || '-'} +
+Peers
+{networkStatus.peerCount ?? '-'}
++ {primaryAddress} +
+Loading transactions...
+No transactions yet.
++ Transactions will appear here once you send or receive SYN. +
++ {formatDate(tx.timestamp)} +
++ {formatAmount(tx.amount, tx.direction)} +
+ {tx.fee && ( ++ Fee: {(tx.fee / 100_000_000).toFixed(8)} SYN +
+ )} ++ {tx.txid} +
+
+
+ {primaryAddress} +
++ {addr.address} +
++ No addresses yet. Generate one to receive funds. +
+ )} ++ Available: {maxAmount.toFixed(8)} SYN +
+
+
+ {mnemonic} +
++ Enter your password to reveal your recovery phrase. +
+
+
+ Keep your recovery phrase safe +
++ Anyone with access to your recovery phrase can steal your funds. + Never share it with anyone. +
++ A secure desktop wallet for the Synor blockchain with post-quantum + cryptography support. +
+ + {/* Action cards */} ++ Generate a new wallet with a secure 24-word recovery phrase. +
++ Restore a wallet using your 24-word recovery phrase. +
++ Estimate transaction fees and gas usage +
+