- Prerequisites
- Understanding the directory structure
- Development Setup
- Local setup
- Other commands
- Contributing
Before you get started, please make sure you have the following setup -
- Node.js v18 (use nvm if already using a different Node version).
pnpm
npm i -g pnpm
- Python >=3.6
- Download and install the latest Python version.
- Run
npm config set python /path/to/executable/python
to configure.
- Install and set up node-gyp -
npm i -g node-gyp
to install.- For Windows, follow an additional step -
- Install Visual C++ 2017 Build Environment: Visual Studio Build Tools (using "Visual C++ build tools" workload) or Visual Studio Community (using the "Desktop development with C++" workload).
- For more details, please refer to the node-gyp documentation.
├── apps # Contains all the applications
│ └── desktop # CySync desktop application, contains all electron code
│
├── packages # All packages required for apps
│ └── ui # UI library for cysync containing all components
│ └── interfaces # Contains all `types` which needs to be shared between packages
│ └── desktop-ui # Renderer part of desktop application
│ └── coins # Static coin information
│ └── coin-support-* # Coin support functionalities
│ └── cysync-core # Contains all business logic of cysync, like pages,context etc
│ └── db-interfaces # Interface for `database`
│ └── database # Database implementation for electron
│ └── util-* # Common utilities shared between packages
│
├── submodules # Packages used by cysync but exist on different repository
│ └── sdk # SDK for communicating with Cypherock hardware
│
├── scripts # Contains scripts to be used by the build system
├── package.json
The repository contains submodules, which need to be downloaded as well. Clone the repository along with its submodules using -
git clone git@github.com:Cypherock/cypherock-cysync.git --recurse-submodules
Once you have cloned the repository, follow these steps -
pnpm i # Install packages
pnpm start
: Start desktop application (Hot reload enabled)pnpm make
: Created packaged desktop applicationpnpm test
: Run all testspnpm lint
: Lint all filespnpm pretty
: Prettify all filespnpm build:submodules
: Build submodules if you are changing them
- Submodules are contains in
submodules
folder. - Submodules are packages which are used by
CySync
but are managed in a different repository. (Example:sdk
) - When you edit something in the
submodules
, you'll need to runpnpm build:submodues
to see the changes on cysync apps. - You may have to delete the
./apps/desktop/node_modules/.vite
folder if the changes does not reflect on cysync apps.
Please consider making a contribution to the project. Contributions can include bug fixes, feature proposal, or optimizations to the current code.