Overview
Hermis is built with a modular, layered architecture that provides maximum flexibility while maintaining clean separation of concerns. This design allows you to use only the parts you need and easily extend or customize functionality.Architecture Diagram
Layer Breakdown
1. Adapter Integration Layer (@hermis/solana-headless-adapter-base)
Provides wallet adapter management and Wallet Standard support.
Responsibilities
- Wallet adapter lifecycle
- Wallet Standard integration
- Event-driven architecture
- Adapter prioritization
- State management
Key Features
- Multi-wallet support
- Automatic wallet detection
- Event emitters
- Adapter sorting
- Ready state management
- Vanilla JavaScript apps
- Custom framework integration
- Need event-driven updates
- Building custom UI components
2. Framework Integration Layer
Framework-specific implementations with hooks, components, and utilities.React (@hermis/solana-headless-react)
Features
- React Hooks (useWallet, useConnection, etc.)
- Context Providers
- Automatic state management
- React 18+ support
- TypeScript definitions
- Building React applications
- Want automatic state management
- Need React hooks
- Prefer declarative approach
Vue (@hermis/solana-headless-vue)
Vue support is under development. Follow our GitHub for updates.
Design Principles
1. Headless-First
No UI Constraints
No UI Constraints
Unlike traditional wallet adapters with built-in UI components, Hermis provides zero UI. You have complete control over look, feel, and user experience.
Bring Your Own UI
Bring Your Own UI
Use any UI library or framework:
- Tailwind CSS
- Material-UI
- Ant Design
- Custom CSS
- Styled Components
- CSS Modules
2. Modular Architecture
Each layer can be used independently or combined as needed:3. Type Safety
Full TypeScript support throughout the stack:4. Framework Agnostic
The adapter-base package works anywhere:- React
- Vue
- Angular
- Svelte
- Vanilla JavaScript
- Node.js (backend)
- Electron
- React Native
Data Flow
Connection Flow
Transaction Flow
State Management
React
State is managed automatically through Context and hooks:Vanilla JS
State managed through events:Extension Points
Custom Wallet Adapters
Create custom adapters for non-standard wallets:Custom Hooks (React)
Build custom hooks on top of the provided ones:Middleware Pattern
Intercept and modify transactions:Performance Considerations
Bundle Size
Adapter Base
~20KB gzipped
React
~25KB gzipped
Optimization Strategies
-
Tree Shaking: Import only what you need
-
Lazy Loading: Load wallet adapters on demand
-
Connection Reuse: Share connection instances
Security Architecture
Key Management
- Private keys never leave the wallet
- Signing happens in the wallet extension
- SDK only receives signatures
