IMPORTANT FOR NON-DEVELOPERS: If you are not a developer and want to run Elytro locally, please read GETTING_STARTED_FOR_NON_DEVS.md first for a simple, step-by-step guide!
You can set up and run everything with a single command from the project root:
./quickstart.sh- This script will:
- Check/install prerequisites
- Install dependencies
- Start both the extension and recovery app dev servers
- Show you how to load the extension in Chrome
If you see a permissions error, run:
chmod +x quickstart.shElytro is a modern, secure Chrome browser extension ERC-4337 wallet built with React, TypeScript, and Vite. It provides seamless Web3 integration with support for multiple blockchain networks, account abstraction, and advanced wallet recovery features.
- Secure Account Management: Create, import, and manage multiple wallets
- Multi-Chain Support: Compatible with Ethereum and all EVM chains
- Account Abstraction (ERC-4337): Smart contract wallet with programmable validation
- Social Recovery: Contact-based recovery without seed phrases
- DApp Integration: Seamless Web3 connectivity via injected provider
- Modern UI: Clean, responsive interface with dark/light themes
- Fast Performance: Vite-powered builds, instant page loads
| Layer | Technology |
|---|---|
| Frontend | React, TypeScript, Vite |
| UI Framework | Tailwind CSS, Radix UI, shadcn/ui |
| State Management | Zustand, React Context |
| Data Layer | Apollo Client (GraphQL) |
| Ethereum SDK | Viem (TypeScript native EVM interaction) |
| Extension API | Chrome Extension Manifest V3 |
| Build Tooling | Vite + CRX plugin |
- Account Abstraction: Smart contract-based accounts with on-chain auth logic
- Social Recovery: Recovery via trusted contacts, no private key exposure
- Secure Execution (SES): Hardened JavaScript runtime using Secure EcmaScript for isolating untrusted code
- CSP Enforcement: Self-hosted scripts only; no remote code execution
- Minimal Permissions: Only essential Chrome APIs are requested
- Secure Builds: Production strips logs, disables source maps, and enforces immutability
- Node.js 22.15.0 or higher
- pnpm 9.0 or higher
- Chrome browser for testing
- Clone the repository and install dependencies:
# Navigate to the extension directory
cd apps/extension
# Install dependencies
pnpm install- Start development server:
# Run in development mode
pnpm dev
# The extension will be built to the 'dist' directory- Load extension in Chrome:
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the
distfolder - The Elytro extension icon should appear in your browser toolbar
- Open Chrome and navigate to
- Build for different environments:
# Development build (with source maps)
pnpm build:dev
# Test environment build
pnpm build:test
# Production build (optimized)
pnpm build:release
# Version-specific builds
pnpm build:patch # Increments patch version
pnpm build:minor # Increments minor version
pnpm build:major # Increments major version- Install built extension:
- After running any build command, the output will be in the
builddirectory (production) ordistdirectory (development) - Follow the same Chrome extension loading process as step 3, but select the build output directory
- For production builds, you can also package the extension as a ZIP file for distribution
- After running any build command, the output will be in the
Add components from shadcn/ui:
# ALWAYS use --no-overwrite to preserve custom modifications
pnpm dlx shadcn@latest add [component-name] --no-overwrite# Run ESLint
pnpm lint
# Type checking is automatically handled by TypeScript compilationsrc/
├── background/ # Service worker and background scripts
│ ├── index.ts # Main background script entry
│ ├── provider/ # Web3 provider implementations
│ └── services/ # Core wallet services
├── content-scripts/ # Content scripts for web page injection
├── pages/ # UI pages and routes
├── components/ # Reusable React components
│ ├── ui/ # Base UI components (shadcn/ui)
│ └── biz/ # Business logic components
├── contexts/ # React context providers
├── hooks/ # Custom React hooks
├── utils/ # Utility functions and helpers
├── assets/ # Static assets (images, fonts, icons)
├── constants/ # Application constants
└── types/ # TypeScript type definitions
The extension supports multiple environments configured via APP_ENV:
development: Development mode with debugging enabledtest: Testing environmentproduction: Production build with optimizations
Key build settings in vite.config.ts:
- CSS Optimization: Disabled minification for consistent styling across builds
- Code Splitting: Disabled for extension compatibility
- Source Maps: Enabled in development, disabled in production
- Console Removal: Production builds strip console statements
The extension requests the following Chrome permissions:
activeTab: Access to current tabstorage: Local data storagetabs: Tab managementsidePanel: Chrome side panel integrationgcm: Push notificationsnotifications: System notifications
Strict CSP implemented for security:
- Scripts: Self and WebAssembly only
- Objects: None allowed
- Fonts: Self-hosted only
-
Extension not loading: Ensure you've built the project first with
pnpm devorpnpm build:dev -
Hot reload not working: Restart the development server and reload the extension in Chrome
-
Firebase/GraphQL errors: Check your network configuration and API endpoints in the config files
- Use Chrome DevTools for debugging extension pages
- Check the Chrome extension console for background script errors
- Enable verbose logging in development mode for detailed debugging
- React: Modern React with hooks and concurrent features
- TypeScript 5.5: Full type safety and developer experience
- Vite 5.4: Fast build tool with HMR support
- Tailwind CSS 3.4: Utility-first CSS framework
- Radix UI: Accessible, unstyled UI primitives
- Apollo Client: GraphQL client with caching
- Zustand: Lightweight state management
- Viem: TypeScript Ethereum library
- Follow the existing code style and TypeScript conventions
- Use the configured ESLint rules
- Ensure all UI components follow the design system
- Test extension functionality across different environments
- Update documentation for new features