This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
igloo-web is a web-based NOSTR signer UI built with React that provides a simple web implementation of a FROSTR (Frost Signer). It uses the @frostr/igloo-core library for distributed cryptographic signing and relay management via Bifrost nodes.
npm run dev # Start Vite dev server with hot-reload
npm run build # TypeScript compile + Vite production build
npm run preview # Preview production build locally- React 18 + TypeScript + Vite
- TailwindCSS with custom design tokens (dark mode only)
- Radix UI primitives with CVA (class-variance-authority) for component variants
- Web Crypto API (AES-GCM encryption, PBKDF2 key derivation)
- @frostr/igloo-core for Bifrost node operations
Three-page routing controlled by AppState.route:
- Onboarding (
/src/pages/Onboarding.tsx) - Initial setup: enter group credential, share credential, relays, and password - Unlock (
/src/pages/Unlock.tsx) - Decrypt stored credentials with password - Signer (
/src/pages/Signer.tsx) - Main control panel: manage node, relays, peers, view event log
Single React Context store in /src/lib/store.tsx:
StoreProviderwraps app at rootuseStore()hook provides access to global state- State persisted in localStorage under
igloo.vaultkey as encrypted bundle
/src/lib/igloo.ts- Bifrost node integration, credential validation, peer management/src/lib/storage.ts- Encrypted localStorage operations/src/lib/crypto.ts- Web Crypto wrappers (AES-GCM-256, PBKDF2 100k iterations)/src/lib/nostr-shim.ts- Runtime patch for nostr-tools SimplePool filter handling
Import alias configured: @/* → ./src/*
- All components use
cn()utility from/src/lib/utils.tsfor Tailwind class merging - Button variants defined with CVA pattern in
/src/components/ui/button.tsx - Custom
.igloo-cardclass for card styling - Blue color palette: blue-100 through blue-900
- Design tokens in
/src/index.csswith CSS custom properties
- This is an early prototype marked for rework
- No test suite currently exists
- Dark mode is permanent (no light mode toggle)
- Credentials are always encrypted before storage
- Node event listeners must be cleaned up on unmount to prevent memory leaks