Haithem Mustafa
Loading
Back to projects
TORCH · 2025 — Current

Torch Business OS

Desktop shell & launcher for the business apps

In development · no public link
Overview

A Tauri 2 desktop app that acts as a unified, authenticated entry point for Torch's business apps. Users discover, install, and run child apps in entity-scoped tabs, with centralized auth and binary distribution managed by the launcher.

RoleFull Stack Developer
Year2025 — Current
Stack
  • Tauri 2
  • Rust
  • React 19
  • TypeScript
  • SQLite
  • MessagePack
  • TanStack Query
  • Zustand
  • Tailwind CSS
The build
  1. 01Built the desktop shell in Tauri 2 with a Rust core (~10k lines) and a React 19 frontend, exposing 40+ typed Rust commands with TypeScript bindings auto-generated via tauri-specta.
  2. 02Designed a parent↔child IPC protocol: a TCP server speaking length-delimited MessagePack frames, passing each child app a run ID and port so they can refresh auth, signal readiness, and shut down gracefully.
  3. 03Implemented unified auth: login once, store JWT + refresh tokens in the OS keychain, push tokens to child apps over IPC, and refresh in the background so sessions never expire mid-use.
  4. 04Built a binary distribution system: download platform-specific app bundles from the CDN with resumable Range requests, verify SHA-256, extract, and run queued installs/updates with exponential backoff.
  5. 05Wired the Tauri auto-updater to the distribution API so the launcher keeps itself and its catalog up to date across Linux, Windows, and macOS (x86_64 + aarch64).
  6. 06Built process and lifecycle management: child apps run as separate OS processes tracked via PID files and process groups, stay alive in the background across tab switches, and clean up orphans on crash recovery.
  7. 07Added an embedded mode where child apps serve a local HTTP UI and render seamlessly inside Business OS tabs, plus entity-scoped tabs so the same app can run per business entity in parallel.
  8. 08Built the frontend with React 19, TanStack Query (tuned for native semantics), Zustand, React Router 7, shadcn/ui, and SQLite-backed offline state for sessions, installed apps, and UI.
Highlights
Back to projects