- 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 interfaces
npm install -g json-schema-to-typescript --save
- cartesi-client, an interface to cartesi rollups framework
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]
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
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.
cartesapp build
You can run a cartesapp app with
cartesapp run
You can set the log level with
cartesapp run --log-level debug
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
First you should create the dev image
cartesapp build-dev-image
Then you can run the dev node
cartesapp node --mode dev
The cartesi machine Dockerfile is saved as a template, so if you want to customize it, you can export it with
cartesapp export-dockerfile