This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm run setup # Install dependencies and setup husky hooks
npm run setup:full # Complete clean setup with cache cleaning
npm run setup:clean # Clean setup without cache cleaningnpm run dev # Start development server with hot reload
npm run serve # Bundle bridge and start dev server with compilation watching
npm run launch:dev # Launch Electron app in development mode
npm run launch:dev:traffic # Development mode with traffic logging
npm run launch:dev:fullheight # Development mode with full height UInpm run compile # Compile TypeScript to ./compiled
npm run compile:watch # Compile with watch mode
npm run bundle # Create all bundle targets (bridge, tray, dash, dapp, etc.)
npm run prod # Full production build and launch
npm run build # Build distributable for current platformnpm run test # Run all tests (unit + e2e)
npm run test:unit # Run all unit tests
npm run test:unit:main # Run main process unit tests
npm run test:unit:resources # Run resources unit tests
npm run test:unit:components # Run React component tests
npm run test:e2e # Run end-to-end testsnpm run lint # Run ESLint
npm run lint:fix # Run ESLint with auto-fix
npm run format # Format code with Prettier
npm run format:check # Check code formattingFrame is an Electron-based Web3 wallet with a multi-process architecture:
-
main/- Electron main process code handling core functionalityindex.ts- Application entry point with Electron initializationstore/- Centralized state management using a custom store systemaccounts/- Account management and wallet operationssigners/- Hardware signer integrations (Ledger, Trezor, GridPlus)chains/- Blockchain connection and chain managementprovider/- JSON-RPC provider implementationdapps/- DApp permission and interaction handlingwindows/- Window management and UI coordination
-
app/- Frontend React applicationstray/- System tray interfacedash/- Main dashboard interfacedapp/- DApp interaction interfaceonboard/- User onboarding flownotify/- Notification interface
-
resources/- Shared utilities and componentsComponents/- React components shared across appsHooks/- React hooks for state managementstore/- Store utilities and state managementutils/- General utility functionsbridge/- Bridge between main and renderer processes
Frame uses Parcel to bundle multiple targets:
bridge- Bridge script for communication between processestray,dash,dapp,onboard,notify- Individual app bundlesinject- DApp injection script
- Uses a custom state management system based on
react-restore - Store persists to user data directory
- State synchronization between main and renderer processes via bridge
- Ledger integration via
@ledgerhq/hw-app-eth - Trezor integration via
@trezor/connect - GridPlus integration via
gridplus-sdk - USB transport layer for hardware communication
- Jest for unit testing with multiple environments (node/jsdom)
- Separate test configurations for main process and UI components
- E2E testing with dedicated configuration
- Custom test utilities in
test/directory
- TypeScript compilation to
./compileddirectory - Bundle output to
./bundledirectory - Uses
npm(not yarn) - package-lock.json is committed - Electron version 23 with Node.js 18.12.1+
- Cross-platform support (macOS, Windows, Linux)