- TypeScript 90.6%
- JavaScript 7.3%
- CSS 1.3%
- Shell 0.4%
- HTML 0.3%
- Other 0.1%
* feat: add appkit dependencies * feat: add basic appkit config * feat: add wallet configs for Rabby and Phantom to appKit configuration * feat: update ImportSigners feature with new wallet connection options and replace Metamask image - Added new ConnectWalletApp image for wallet connection. - Removed Metamask image from the project. - Enhanced ImportSignersContainer to support wallet connection via WalletConnect. - Updated item descriptions and titles for clarity in the signer import process. - Introduced new SignerType enum for better type management in signersSlice. * fix: remove borderRadius from SafeCard component * refactor: update SignerType to use string literals and clean up imports in ImportSignersContainer - Replaced SignerType enum with string literals. - Removed unused import of SignerType in ImportSignersContainer. - Updated type assignment for wallet connection in ImportSignersContainer to use string literal 'walletconnect'. * fix: update wallet-related images in mobile assets Make gradient overlay transparent so it works on both light and dark mode * refactor: streamline signer connection handling in ImportSignersContainer - Updated the handling of signer connections to use a more concise approach with a single callback function. - Removed the previous memoization of items and integrated the item definitions directly into the component. - Enhanced the connection logic to include biometric checks for the seed signer option. * fix: update minimum SDK version for Android in app configuration * refactor: migrate from AsyncStorage to MMKV for improved storage performance - Removed AsyncStorage dependency and replaced it with MMKV for better efficiency in data handling. - Updated storage methods in appKit and Storybook configuration to utilize MMKV's API. * refactor: simplify state management in ImportSignersContainer - Removed unused selector for existing signer to streamline the connection logic. * refactor: reorganize component hierarchy in RootLayout for improved readability - Adjusted the order of providers in RootLayout to enhance clarity and maintainability. - Moved AppKitProvider to be nested within the Provider for better context management. * refactor: update type handling in appKit storage methods for improved type safety - Changed generic type from 'any' to 'unknown' in getEntries, setItem, and getItem methods to enhance type safety. - Updated parseEntry function to return a tuple with the correct type inference. * chore: updare yarn.lock * fix: revert removal of `@react-native-async-storage/async-storage` dependency It's needed by appkit * refactor: replace base64 wallet icons with URLs in appKit configuration - Removed base64 encoded icons for Phantom and Rabby wallets. - Updated image URLs to point to hosted images for better performance and maintainability. - Added new image files for the wallets in the web public images directory. |
||
|---|---|---|
| .claude | ||
| .cursor/rules | ||
| .github | ||
| .husky | ||
| .specify | ||
| .vscode | ||
| .yarn/patches | ||
| apps | ||
| config | ||
| docs/solutions/workflow-issues | ||
| expo-plugins/notification-service-ios | ||
| packages | ||
| scripts | ||
| specs | ||
| tools/codemods/migrate-feature | ||
| .codescene.yml | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .lintstagedrc.mjs | ||
| .nvmrc | ||
| .prettierignore | ||
| .prettierrc | ||
| .yarnrc.yml | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| CONTRIBUTING.md | ||
| Dockerfile | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| yarn.config.cjs | ||
| yarn.lock | ||
Safe{Wallet} monorepo
🌐 Safe{Wallet} web app ・ 📱 Safe{Wallet} mobile app
Overview
Welcome to the Safe{Wallet} monorepo! Safe (formerly Gnosis Safe) is a multi-signature smart contract wallet for Ethereum and other EVM chains, requiring multiple signatures to execute transactions.
This repository houses both web and mobile applications along with shared packages, managed under a unified structure using Yarn Workspaces. The monorepo setup simplifies dependency management and ensures consistent development practices across projects.
Key components
- apps/web - Next.js web application (detailed documentation)
- apps/mobile - Expo/React Native mobile application (detailed documentation)
- packages/store - Shared Redux store used by both platforms
- packages/utils - Shared utilities and TypeScript types
- config/ - Shared configuration files
Important
For detailed setup instructions and platform-specific development guides, please refer to the dedicated README files:
- Web App Documentation - Complete guide for the Next.js web application
- Mobile App Documentation - Complete guide for the mobile application, including iOS/Android setup
Getting started
To get started, ensure you have the required tools installed and follow these steps:
Prerequisites
- Node.js: Install the latest stable version from Node.js.
- Yarn: Use Yarn version 4.5.3 or later
to install it with the latest node version you can simply do
corepack enable
and then just run
yarn
This will install the required version of yarn and resolve all dependencies.
Note
Corepack is a tool to help with managing versions of your package managers. It exposes binary proxies for each supported package manager that, when called, will identify whatever package manager is configured for the current project, download it if needed, and finally run it.
Initial setup
- Clone the repository:
git clone <repo-url>
cd monorepo
- Install dependencies:
yarn install
Quick start commands
# Run web app in development mode
yarn workspace @safe-global/web dev
# Run mobile app in development mode
yarn workspace @safe-global/mobile start
# Run tests for web
yarn workspace @safe-global/web test
# Run Storybook for web
yarn workspace @safe-global/web storybook
Tip
For comprehensive setup instructions, environment variables, testing, and platform-specific workflows, see:
- Web App README - Environment setup, Cypress E2E tests, Storybook, and more
- Mobile App README - iOS/Android setup, Maestro E2E tests, Expo configuration, and more
Monorepo commands
Here are some essential commands to help you navigate the monorepo:
Workspace management
- Run a script in a specific workspace:
yarn workspace <workspace-name> <script>
Example:
yarn workspace @safe-global/web dev
- Add a dependency to a specific workspace:
yarn workspace <workspace-name> add <package-name>
- Remove a dependency from a specific workspace:
yarn workspace <workspace-name> remove <package-name>
Note
Yarn treats commands that contain a colon as global commands. For example if you have a command in a workspace that has a colon and there isn't another workspace that has the same command, you can run the command without specifying the workspace name. For example:
yarn cypress:openis equivalent to:
yarn workspace @safe-global/web cypress:open
Linting, formatting, and type-checking
- Run ESLint across all workspaces:
yarn lint
- Run Prettier to check formatting:
yarn prettier
- Run type-check for a workspace:
yarn workspace @safe-global/web type-check
yarn workspace @safe-global/mobile type-check
Testing
- Run unit tests across all workspaces:
yarn test
- Run E2E tests (web only):
yarn workspace @safe-global/web cypress:open # Interactive mode
yarn workspace @safe-global/web cypress:run # Headless mode
Contributing
Adding a new workspace
- Create a new directory under
apps/orpackages/. - Add a
package.jsonfile with the appropriate configuration. - Run:
yarn install
Best practices
- Use Yarn Workspaces commands for managing dependencies.
- Ensure type-check, lint, prettier, and tests pass before pushing changes.
- Follow the semantic commit message guidelines.
- For AI contributors, see AGENTS.md for detailed guidelines.
Tools & configurations
- Husky: Pre-commit hooks for linting, formatting, and type-checking.
- ESLint & Prettier: Enforce coding standards and formatting.
- Jest: Unit testing framework.
- Cypress: E2E testing for the web app.
- Storybook: Component documentation and development for the web app.
- Expo: Mobile app framework for the
mobileworkspace. - Next.js: React framework for the
webworkspace. - Tamagui: UI component library for the mobile app.
Release process
For information on releasing the web app, see the Automated Release Procedure.
Useful links
- Yarn Workspaces Documentation
- Expo Documentation
- Next.js Documentation
- Storybook Documentation
- Jest Documentation
- ESLint Documentation
- Prettier Documentation
- Safe Developer Docs
Ode to the repo
In ages past when Gnosis laid the founding stone,
A vault was wrought that no single key could own.
Where signatures must gather ere the gate will yield,
M-of-N doth guard the treasure, sworn and sealed.
Now Yarn doth wind its threads through hall and bower,
Binding web and mobile in a single tower.
Redux keeps the ledger, RTK Query rides afar,
Returning with the fetched gold beneath the evening star.
Chain by chain the watchers set their vigil wide,
Across th' EVM kingdoms, ever at the Safe's own side.
Storybook doth chronicle each component's tale,
And Cypress walks the paths where lesser tests would fail.
No `any` types shall darken these well-guarded lands —
That ancient law doth hold by Prettier's own hands.
Feature flags like waypoints mark what lies ahead,
And lazy loads awaken only where the road doth tread.
Long the name hath wandered — Gnosis once, now Safe it stands,
Yet still the vow endureth, written into typed commands:
That what you hold stays guarded, deep beyond all theft or flame,
For this the codebase liveth — and security its name.
If you have any questions or run into issues, feel free to open a discussion or contact the maintainers. Happy coding! 🚀