Giter VIP home page Giter VIP logo

cypherock-cysync's Introduction

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 (But less than 3.10)
    • Download and install the latest Python version.
    • Run npm config set python /path/to/executable/python to configure.
  • Install and set up node-gyp -
  • Dependencies for MacOS brew install pkg-config pixman cairo pango
  • If you are using linux, run the following command to configure usb.
    wget -q -O - https://raw.githubusercontent.com/Cypherock/cysync-scripts/main/configure-usb.sh | sudo bash

Understanding the directory structure

├── apps                # Contains all the applications
│   └── desktop             # CySync desktop application, contains all electron code
│   └── cli                 # CySync cli application
│
├── 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 [email protected]:Cypherock/cypherock-cysync.git --recurse-submodules

Local setup

Once you have cloned the repository, follow these steps -

pnpm i         # Install packages
pnpm start     # Start desktop application
pnpm start -s  # Start desktop application with short log format

Other commands

  • 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

  • Desktop App

    • pnpm start: Start desktop application (Hot reload enabled)
    • pnpm make: Created packaged desktop application
  • CLI App

    • pnpm dev:cli -- <ARGS>: Run cli application
    • pnpm make:cli: Created packaged cli application
      • NOTE: You need to install pkg via npm i -g pkg before running pnpm make:cli

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.

Turorepo Remote Caching

  • Create a new file .turbo/config.json and add the following content -
    {
      "teamid": "team_<TEAMID>",
      "apiurl": "<CACHE API URL>"
    }
  • Set the TURBO_TOKEN=yourToken environment variable

Contributing

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

cypherock-cysync's People

Contributors

irshadcypherock avatar jhasuraj01 avatar irshadjsr21 avatar ujjwal-cyph avatar subinsk avatar masterchief164 avatar github-actions[bot] avatar moayaan1911 avatar natto1784 avatar malviyagaurav avatar suraj-tiwari avatar shreyasgeetha avatar ishaan28malik avatar aryancypherock avatar parnikagupta9 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.