A modern, secure cryptocurrency wallet for the Pactus blockchain.
Pactus Wallet is a cross-platform wallet solution for managing digital assets on the Pactus blockchain. Built with security and usability in mind, it provides a seamless experience for users to create wallets, manage accounts, and perform transactions.
This project is structured as a monorepo using Yarn workspaces:
pactus-wallet/
├── apps/ # User-facing applications
│ └── web/ # Web wallet application (Next.js)
├── packages/ # Shared libraries and modules
│ ├── wallet/ # Core wallet functionality
│ └── utils/ # Shared utilities
└── tests/ # Test suites
- TypeScript - For type safety across the codebase
- Yarn - Package manager with Workspaces support
- Turborepo - Build system for monorepos
- Next.js - React framework for production
- Tailwind CSS - Utility-first CSS framework
- next-themes - Theme management for Next.js
- TrustWallet Core - For cryptographic operations
- Node.js (v18+)
- Yarn (v4+)
- Clone the repository:
git clone https://github.com/pactus-project/pactus-wallet.git
cd pactus-wallet
- Install dependencies:
yarn install
# From the root directory
yarn build:web
yarn workspace web dev
# Or navigate to web app directory
cd apps/web
yarn dev
# Build all packages and applications
yarn build
# Build only the web application
yarn build:web
# Build only the packages
yarn build:pkg
- Keep related code in the appropriate package
- Share common functionality through packages
- Include comprehensive tests for all code
- Document components and APIs using JSDoc
- Follow the established coding style and conventions
- Zustand - For global state management
- React Hook Form - For form handling
- Zod - For schema validation
- TanStack Query - For data fetching and caching
- Axios - For HTTP requests
- Jest - For unit and integration testing
- Testing Library - For component testing
We welcome contributions to the Pactus Wallet project! Please follow these guidelines to ensure your contributions align with our standards.
- Understand the Project: Familiarize yourself with the project goals and architecture
- Check Existing Issues: See if there's already an issue for what you want to work on
- Discuss Major Changes: For significant changes, open an issue first to discuss with maintainers
- Follow clean code principles and TypeScript best practices
- Maintain type safety throughout the codebase
- Write comprehensive tests for new code or changes
- Ensure all tests pass before submitting a pull request
- Maintain consistent code style using ESLint and Prettier
We use Conventional Commits format for commit messages and PR titles. Follow these rules:
Type | Description |
---|---|
fix | A bug fix |
feat | A new feature |
docs | Documentation changes |
test | Adding or correcting tests |
build | Build system or dependency changes |
ci | CI configuration changes |
perf | Performance improvements |
refactor | Code changes that don't fix bugs or add features |
style | Formatting, white-space, etc. |
chore | Other changes not modifying src/test files |
Specify which part of the code is affected (e.g., wallet, web, api). Multiple scopes can be used if changes impact several areas.
- Keep under 50 characters
- Start with lowercase letter
- No ending punctuation
- Use imperative mood (e.g., "fix bug" not "fixed bug")
Examples:
- Correct ✅: "feat(wallet): add biometric authentication"
- Incorrect ❌: "feat(wallet): Added biometric authentication."
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes following our code guidelines
- Ensure tests pass:
yarn test
- Commit your changes using conventional commit format
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
Your PR will go through these checks:
- Dependency installation verification
- Code formatting check
- TypeScript compilation
- Linting with ESLint
- Test execution
- Final maintainer review
- If Approved: Your PR will be merged into the main branch
- If Changes Requested: Address the feedback and update your PR
When reporting bugs, include:
- Detailed reproduction steps
- Environment information (OS, Node.js version, etc.)
- Screenshots if applicable
- Suggested fixes if possible
We follow a Code of Conduct to ensure a welcoming community for all contributors. Please read it before contributing.
This project is licensed under the MIT License.