Skip to content

irshadCypherock/cypherock-cysync

 
 

Repository files navigation

Cypherock CySync

Table of contents

  1. Prerequisites
  2. Understanding the directory structure
  3. Development Setup
  4. Local setup
  5. Other commands
  6. Contributing

Prerequisites

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 -

Understanding the directory structure

├── 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

Development Setup

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

Local setup

Once you have cloned the repository, follow these steps -

pnpm i        # Install packages

Other commands

  • pnpm start: Start desktop application (Hot reload enabled)
  • pnpm make: Created packaged desktop application
  • pnpm test: Run all tests
  • pnpm lint: Lint all files
  • pnpm pretty: Prettify all files
  • pnpm build:submodules: Build submodules if you are changing them

Editing submodules

  • 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 run pnpm 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.

Contributing

Please consider making a contribution to the project. Contributions can include bug fixes, feature proposal, or optimizations to the current code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 91.8%
  • JavaScript 7.6%
  • Other 0.6%