Overview
Trezor Suite is a monorepo containing three main projects:- Connect - Library for integrating Trezor functionality into third-party applications
- Trezor Suite - Desktop and web application for managing Trezor hardware wallets
- Trezor Suite Mobile - Mobile/tablet application for managing Trezor hardware wallets
Repository Structure
Top-Level Directories
packages/ - Core Libraries
Domain-agnostic packages including libraries, tools, and utilities that can be used across all projects.
suite/ - Web & Desktop Code
Contains code specific to the web and desktop applications.
The desktop application is built with Electron and shares most code with the web version.
suite-common/ - Shared Domain Logic
Shared code that is domain-specific but can be used across all platforms (Web, Desktop, Mobile).
suite-native/ - Mobile Code
Contains code specific to the mobile and tablet applications.
Workspace Configuration
The monorepo uses Yarn workspaces defined inpackage.json:
- Shared dependencies across packages
- Efficient installation and linking
- Centralized dependency management
Key Packages
@trezor/connect
The core library for device communication. Version 9 is actively developed in this monorepo. Location:packages/connect/
Documentation: See the Connect documentation
The historical Connect repository is now archived.
@trezor/suite-web
The web application for Trezor Suite. Location:packages/suite-web/
Run dev server:
@trezor/suite-desktop
The Electron-based desktop application. Location:packages/suite-desktop/
Run dev server:
@suite-native/app
The React Native mobile application. Location:suite-native/app/
Run dev server:
Supporting Directories
scripts/
Build scripts, code generators, and maintenance utilities:
update-submodules.sh- Update Git submodulesupdate-coins.sh- Update cryptocurrency definitionsupdate-protobuf.sh- Update Protocol Buffer definitionscheck-workspace-resolutions.ts- Verify dependency versionsupdateProjectReferences.ts- Update TypeScript project references
docs/
Technical documentation including:
- Package-specific documentation
- Feature implementation guides
- Release process documentation
- Testing guides
skills/
Development guidelines and best practices:
- Code style conventions
- TypeScript patterns
- React component structure
- Testing strategies
- Git commit guidelines
All skills are mandatory reading before contributing. See the AGENTS.md for the complete list.
submodules/
External dependencies managed as Git submodules:
- Trezor firmware
- Protocol definitions
- Cryptocurrency data
Build System
Nx Integration
The repository uses Nx for task orchestration and caching:Webpack Configuration
Front-end builds are managed by Webpack configurations in thesuite-build package:
configs/base.webpack.config.ts- Common base configurationconfigs/web.webpack.config.ts- Web-specific configurationconfigs/desktop.webpack.config.ts- Desktop-specific configuration
TypeScript Configuration
Project References
The monorepo uses TypeScript project references for efficient type-checking:Path Aliases
Import aliases are defined intsconfig.json:
Dependency Management
Version Resolutions
Critical dependencies are pinned inpackage.json resolutions:
Adding Dependencies
File Organization Patterns
Component Structure
Package Structure
Navigation Tips
Finding Files
Understanding Dependencies
Next Steps
Now that you understand the project structure:- Learn how to Build the Project
- Start Running Development Servers
- Read the Development Guidelines