The Problem

Transferring large files without relying on cloud storage forces users to manage temporary servers, credentials, and size limits. Teams that need a quick, zero‑account, end‑to‑end‑encrypted hand‑off end up building ad‑hoc scripts that are hard to audit and maintain.

What This Does

alt‑sendme is a portfolio of four self‑contained pieces that together implement a peer‑to‑peer file‑transfer UI and a native desktop wrapper:

  • web‑app – a React + Tailwind front‑end (66 files) that drives the UI, handles drag‑drop, language switching and progress display. Key entry points are web‑app/src/App.tsx (renders AppContent) and web‑app/src/i18n/react‑i18next‑compat.ts which exports the custom useTranslation hook used by 15 other modules.
  • src‑tauri – a Tauri host (16 files) that packages the web‑app as a native desktop app. Execution starts in src‑tauri/src/main.rs, which creates the window and registers commands defined in src‑tauri/src/commands.rs.
  • sendme – a Rust library (9 files) that wraps the Iroh P2P protocol. The public API lives in sendme/src/lib.rs; the bulk of the transfer logic is in sendme/src/main_reference.rs (937 LOC).
  • scripts – helper utilities for release automation (scripts/release.js, version sync, validation).

The UI invokes the Rust core via Tauri’s command bridge; the Rust core talks to Iroh to generate tickets, stream blobs, and resume interrupted transfers.

How It Is Wired

Execution begins when the desktop binary built by Tauri launches src‑tauri/src/main.rs. This creates the web view and registers the command showAlert (called from 8 places) and cn (called from 9 places). The front‑end’s AppContent component (defined in web‑app/src/App.tsx) renders the main UI and immediately imports useTranslation from web‑app/src/i18n/react‑i18next‑compat.ts. That hook is the hub module: 15 modules depend on it, giving it the widest blast radius.

User actions (file drop, “Send” click) are handled in web‑app/src/hooks/useSender.ts. handleFileSelect gathers file metadata and calls the Tauri command sendFile, which forwards to sendme::core::send::send_file (defined in sendme/src/core/send.rs). The send routine creates an Iroh ticket, streams the payload, and reports progress back through src‑tauri/src/commands.rs. Progress updates travel back to the UI via the useReceiver hook (web‑app/src/hooks/useReceiver.ts), which calls useTranslation for status text and formatSpeed (from web‑app/src/components/common/TransferProgressBar.tsx).

The most‑connected functions are:

FunctionCallersCallees
useTranslation15 modules1
cn (translation shortcut)9 modules0
showAlert8 modules0
getStatusText3 modules0
formatSpeed2 modules0

No circular imports were detected, but the react‑i18next‑compat hub and the oversized sendme/src/main_reference.rs are high‑impact change points.

How To Use It

# Clone the repo
git clone https://github.com/moses-y/alt-sendme
cd alt-sendme

# Install Rust toolchain (required by Cargo)
rustup toolchain install stable

# Install Node dependencies (npm is declared)
npm ci   # respects package-lock.json

# Build the web front‑end
npm run build   # Vite config in vite.config.ts

# Build the desktop app (requires the built web assets)
cargo tauri build   # uses src-tauri/Cargo.toml
# The resulting binary is in target/release/

No additional configuration files (env vars, secrets) are present. The UI reads language preference from localStorage via web‑app/src/i18n/setup.ts. The Rust library reads no external config.

Real‑World Use

A product team can embed alt‑sendme in an internal toolchain to let engineers ship large build artifacts without a cloud bucket. The workflow is:

  1. Run the compiled desktop app, drag a folder onto the window.
  2. The app generates an Iroh ticket (shown in the UI) and copies it to the clipboard.
  3. The recipient pastes the ticket into their own instance; the transfer starts automatically, resuming if the network drops.

All traffic stays peer‑to‑peer; no intermediate storage is created.

Code Health & Issues

Measured code‑quality findings

  • High – Deep nesting (19 locations, e.g., TransferProgressBar.tsx, max depth 8).
  • High – Duplicated blocks (≈126 repeated 6‑line snippets across 19 files, e.g., version scripts, receive.rs).
  • Medium – Empty catch blocks (catch {} in setup.ts, TranslationContext.tsx, analytics.ts).
  • Medium – Hub module (react‑i18next‑compat.ts is imported by 15 modules).
  • Medium – Oversized file sendme/src/main_reference.rs (937 LOC).

Code‑health audit

  • High – Pin third‑party GitHub Actions (.github/workflows/*.yml).
  • High – No test suite (59 source files, 0 tests).
  • Medium – Least‑privilege GITHUB_TOKEN (no permissions declared).
  • Medium – Enable Dependabot/Renovate (no update bot).
  • Medium – Use lockfile in CI (npm install should be npm ci).
  • Medium – Add vulnerability scan step (no dependency‑review action).
  • Medium – Set persist-credentials: false on checkout.
  • Low – Add job timeouts (no timeout-minutes).
  • Low – Add repo convention files (.editorconfig, formatter config).

No Dockerfile, secrets, or missing licence (LICENSE is present). CI runs via GitHub Actions but lacks the safeguards above.

The Bottom Line

alt‑sendme delivers a functional peer‑to‑peer file‑transfer UI and a native desktop wrapper, with a clear separation between front‑end, Tauri host, and Rust core. The codebase is usable as‑is but suffers from a lack of automated tests, deep nesting, and several maintainability hotspots (the translation hub and a monolithic Rust file). Teams that need an off‑the‑shelf, zero‑account transfer tool can adopt it quickly, but should prioritize adding tests and refactoring the high‑impact modules before extending the product.