# `@luxfi/wallet` **Project**: `luxfi/wallet` — canonical Lux Wallet upstream (web + mobile + extension + backend). **Org**: Lux Industries Inc. (`luxfi`). **Status**: `apps/web` builds clean. `apps/backend` (Go MPC custody server) builds + tests green (17 tests). `apps/{extension,mobile}` retain upstream-shaped src that requires an app-level refactor to compile against current `@l.x/*` npm packages. The canonical bones (`pkgs/{wallet,brand,analytics}`) are stable. > The freshly-scaffolded MIT TS shared core lives in a SEPARATE org — > `github.com/luxwallet/*` (`@luxwallet/{chains,rpc,crypto,keyring,tx,sdk}`, > + `connect`, `ui`, `desktop`, native ios/android/mobile-rn). That is the > cross-target shared core; `luxfi/wallet` here is the GPL product monorepo > (web/extension/mobile FE + this Go custody backend + PQ stack). The backend's > custody port mirrors `@luxwallet/keyring`'s account model + the lux/mpc > `client.Threshold` security contract. ## Canonical structure ``` luxfi/wallet/ ├── apps/ │ ├── web/ — Vite 8 SPA, React 19, brand-aware. Builds in <100ms. │ ├── backend/ — Go MPC custody server (App(Wallet) backend). See below. │ ├── extension/ — Chrome/Firefox MV3 (upstream-shaped; app-refactor pending). │ └── mobile/ — React Native + Expo (upstream-shaped; app-refactor pending). ├── pkgs/ │ ├── wallet/ — `@luxfi/wallet` — canonical wallet feature bones. │ ├── brand/ — `@luxfi/wallet-brand` — runtime white-label config. │ └── analytics/ — `@luxfi/wallet-analytics` — provider-pluggable analytics. ├── SCREENS.md — UX spec freeze (2025-12-15). └── LEGACY.md — Sibling repos (wallet-legacy, wwallet, xwallet) to archive. ``` ## Build commands (verified working) ```bash pnpm install --no-frozen-lockfile pnpm --dir apps/web build # Vite SPA — clean. Output in apps/web/dist/. ``` `apps/{extension,mobile}` build via Nx targets that depend on workspace packages still upstream-shaped (`@universe/*`, `wallet/*` direct paths) and will not type-check or build until refactored to consume the npm-published `@l.x/*` and the workspace `@luxfi/wallet`. Track in this file when fixed. ## Foundation slice (apps/web shell) `apps/web` is the Vite SPA shell. Provider tree: ``` GuiProvider → QueryClientProvider → WagmiProvider → RouterProvider ``` - `src/main.tsx` — awaits `loadBrandConfig()` before first render. - `src/App.tsx` — wraps the four providers above. - `src/router.tsx` — react-router-dom v7 with lazy-loaded screen modules. - `src/components/AppShell.tsx` — top bar + side drawer + Outlet. - `src/components/ChainSwitcher.tsx` — native `