Skip to content

rijulER6/cartesapp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.6%
  • Makefile 2.4%