Skip to content

gconnect/cartdev-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Description of Image

CartDevKit CLI

Table of Contents

About CartDevKit

CartDevKit is an all-in-one package to help you get started building your project on Cartesi. The CartDevKit CLI tool is designed to streamline the process of setting up new projects by providing developers with a wide range of templates for backend, frontend, Cartesify, and mobile development.

architecture

System Requirements and Prerequisites

CartDevKit requires Node.js minimum version requirement is Node v.20+ and npm to be installed on your system. Ensure that you have the latest versions of Node.js and npm installed before proceeding with the installation.

Installation Guide

To create a new project, run this command

npx cartdevkit@latest create mydapp

You should see something like this

cardevkit-cli-output

Replace mydapp with the desired name of your project. This command will prompt you to select a template and configure the project settings.

CLI Options:

View available command-line options and flags by running

cartdevkit --help

Backend Setup

To setup your backend here are the required steps:

  • Navigate to the backend directory of your created project and run the below command, keep in mind also ensure your docker is all setup up and running.

  • Install all required dependencies using either yarn install or npm i

!NOTE

To build and run the backend ensure that you have Cartesi CLI is installed and your docker is up and running. For debugging purpose you can run cartesi doctor.

  • Build the project by running the below command;

      cartesi build

This will help build the image and run the Cartesi machine. Once this step is completed you should see something like this build-output

The next step will be to start the local server by running

  cartesi run

If all goes well you should see this run-output

Debugging

For quick troubleshooting incase you run into any issue you can quickly check the status using

cartesi doctor

This will start the development server

Frontend Setup

If you are working on the frontend, here are the required steps:

  • Navigate into the frontend project directory
  • Install all required dependencies using either npm i or yarn install

!NOTE

Once you generate the frontend template, ensure to create a .env file and provide your project Id as it's an important requirement when working with Rainbowkit and wagmi.

Your .env file should look like this πŸ‘‡ on the nextjs template

NEXT_PUBLIC_WALLECT_CONNECT_PROJECT_ID= YOUR PROJECT ID

If using the react-app template your .env file should look like this πŸ‘‡ on the nextjs template

VITE_WALLET_CONNECT_PROJECT_ID= YOUR PROJECT ID
  • Start up the local server using the below command.
npm run dev 

!Note

Detailed setup guide can be found in the readme of the individual template.

Supported Templates

  • Backend (JavaScript, TypeScript)
  • Frontend (React, NestJS)
  • Cartesify (Backend and Frontend)

Template Documentation

Checkout the individual docs to learn more about the template.

Backend Templates:

CartdevKit supports backend templates in various programming languages, including;

Each backend template comes with a basic project structure and configuration files.

Frontend Templates

Frontend templates are available for popular frameworks such as

These templates include components, routing, and styling to kickstart front-end development.

Cartesify Templates

Cartesify templates integrate the Cartesi platform for both backend and frontend development. These templates enable developers to build scalable and secure applications using Cartesi's REST API technology.

The Cartesify template has support for both backend and frontend integration.

Built With

  • Cartesi Rollup
  • Cartesi CLI
  • Deroll/Cartesi Wallet
  • Deroll/Cartesi Router
  • Cartesify
  • Node and Yarn Packages
  • Figlet, fs-extra,inquirer, path shelljs, child_process,commander
  • React
  • Nextjs
  • JavaScript
  • TypeScript

Official CartDevKit Documentaion

To read a more comprehensive version of this doc visit here

Video Tutorials

Check out this playlist to get started using the CLI tool.

Additional Helpful Resources

Contact & Support

Join the Cartesi Discord server. You can also connect with the team here @africinnovate

Roadmap

See the open issues for a full list of proposed features (and known issues).

Contributing

We welcome contributions from the community.

LICENSE

CartdevKit is licensed under the Apache License. Refer to the LICENSE file for more details