GithubHelp home page GithubHelp logo

shreyc711 / colonycdapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joincolony/colonycdapp

0.0 0.0 0.0 35.81 MB

A interation of the Colony Dapp sporting both a fully decentralized operating mode, as well as a mode enhanced by a metadata caching layer

Shell 0.18% JavaScript 5.12% TypeScript 88.98% CSS 5.25% HTML 0.32% Dockerfile 0.06% Velocity Template Language 0.08%

colonycdapp's Introduction

Colony CDapp

An iteration of the Colony Dapp sporting both a fully decentralized operating mode, as well as a mode enhanced by a metadata caching layer.

Prerequisites

  • node v16.16.x (Best use nvm)
  • npm v8.11.x (At least. The newer, the better)
  • docker v19.03.0+ (See install instructions)

Installation

First, clone this repository :)

Install packages

Pick the right node version (as seen in .nvmrc):

nvm use

Install all dependencies:

npm install

Note: at the end of the install there's a post-install script that will recursively install dependencies for all the currently declared lambda functions

Running the dev environment

npm run dev

This will build your local docker images, then attempt to start them _(the local dev environment runs inside a couple of docker containers).

On the next start, assuming no key cache files changed, it will skip the image building step (as it will just used the cached version), and go straight to starting your environment.

Running the dev web server

Once the above dev environment is up and running, you need to start your dev web server, running through webpack:

npm run webpack

You can access it at http://localhost:9091 (notice the different port, as to not cause a local storage and cache conflict with the Dapp)

Additional services

Amplify

You can access the Amplify / Mock Appsync GraphQL api playground at http://localhost:20002

Reputation Monitor

In order for reputation to function within your dev environment, you will need to toggle it on first.

Access the following URL to toggle the reputation monitor auto-mining on or off: http://127.0.0.1:3001/reputation/monitor/toggle

You can also view the status of the reputation monitor using the following URL: http://127.0.0.1:3001/reputation/monitor/status

Truffle

If needed, the truffle console is available to you via:

npm run truffle console

NOTE: This only works while the environment is running

Building the bundle locally

If you want to build the bundle locally for inspection, you can do it via:

npm run webpack:build

Note: It's a straight-up dev build. Just bundled, no code optimizations whatsoever.

Linting

Linting your code via eslint can be done as such:

npm run lint

To lint the project's style sheets you run:

npm run stylelint

Type checking

Type checking using TypeScript can be accessed using this npm script:

npm run typecheck

# Or, with file watching (or any other `tsc optional arguments`)
npm run typecheck --watch

Testing

To run unit tests you have the following npm script:

npm run test

Upgrading colony-js

When upgrading colony-js package, you usually want to do it for not just CDapp but also all the lambdas that depend on it. There's an upgrade-colony-js script that does it for you:

npm run upgrade-colony-js <version>

Twemoji graphics made by Twitter and other contributors, licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/

colonycdapp's People

Contributors

jakubcolony avatar willm30 avatar ink-pot-monkey avatar rdig avatar armandograterol avatar czarekdryl avatar katarzynastefanowiczpagepro avatar julianahlk avatar joanna-pagepro avatar krawczykkatarzyna avatar arrenv avatar chmanie avatar tomaszchmielpagepro avatar chinins avatar bassgeta avatar bogdan-1337 avatar kornelkwiatkowski avatar danbr avatar alicjakujawa avatar agnieszkajarosikloj avatar area avatar dwnorm2 avatar kornel-kwiatkowski 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.