Coder Social home page Coder Social logo

cartesapp's Introduction

Cartesapp

Requirements

  • venv, Python virtual environment
  • npm to install dependencies and run the frontend
  • Sunodo to run the DApp backend
  • json-schema-to-typescript to generate typescript interfacesnpm install -g json-schema-to-typescript --save
  • cartesi-client, an interface to cartesi rollups framework

Installing

After you create a virtual environment and activate it you can install with

pip3 install git+https://github.com/prototyp3-dev/cartesapp@main#egg=cartesapp[dev]

Creating new project

cartesapp create NAME
cd NAME
make setup-env

or (without a previous cartesapp installation and using this Makefile)

mdir NAME
cd NAME
wget https://raw.githubusercontent.com/prototyp3-dev/cartesapp/main/cartesapp/Makefile
make setup-env

We then recommend to activate the virtual environment so you can run the cartesapp commands directly

Creating new module

First you'll need to create a module and

cartesapp create-module MODULE_NAME

Then edit the MODULE_NAME/settings.py to import the project files.

Building

cartesapp build

Running

You can run a cartesapp app with

cartesapp run 

You can set the log level with

cartesapp run --log-level debug

Generating frontend libs

Run the following command to generate the libraries for the frontend (this will add them to frontend/src)

cartesapp generate-frontend-libs

You can also define the path to the libs

cartesapp generate-frontend-libs --libs-path path/to/libs

Then install frontend dependencies:

cd frontend
yarn

Link cartesi client lib (in ./frontend), redo this step every time you install or remeve a package:

npm link cartesi-client

Running the backend in dev mode

First you should create the dev image

cartesapp build-dev-image

Then you can run the dev node

cartesapp node --mode dev

Export Dockerfile

The cartesi machine Dockerfile is saved as a template, so if you want to customize it, you can export it with

cartesapp export-dockerfile

cartesapp's People

Contributors

felipefg avatar lynoferraz avatar

Stargazers

 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.