This is a GitHub template, use it to start your own project.
This project requires these packages before setup;
- Node ->
>=20.9.0
(from v20.9.0 upwards) - Yarn ->
v4.1.1
- Operating System - Linux/MacOS
This project runs on a specific version of yarn - @4.1.1. If you are already on this version of yarn, and your node version meets the minimum requirement, you may skip to the Getting Started section.
-
If you are using a different version, consider using nvm to handle different versions of node and yarn on your computer.
-
If you already have nvm, please skip to next step. If you do not already have nvm installed, you can follow a more detailed instructions here on nvm github repo.
-
Once you have installed and verified your nvm installation, you can now install the specified versions of
node
andyarn
.
If you are already on the minimum node version (v20.9.0), you may skip to step 5
- Run
nvm install 21.7.1
to install the specified version - 21.7.1 andnvm use 21.7.1
to use this installed version.
For the purpose of this documentation, we are using node version 21.7.1, however you may replace this with any version that meets the minimum node version, as specified above.
- Verify the currently active node installation on your nvm by running
nvm which node
. You should see value like{user_path}/.nvm/versions/node/v21.7.1/bin/node
corepack should already be installed globally, verify this with
npm list -g
-
Enable corepack using
corepack enable
-
Add the specific version of yarn using
corepack install -g yarn@4.1.1
. For more details, check the yarn docs
Note: Yarn will be installed globally so make sure it doesn't affect other projects which require a different version of yarn. By using nvm, each node version you install will have it's own global packages so you can change to different versions of yarn.
- Restart your terminal and verify you are on the correct versions of node and yarn
-
Click on the
Use this template
button at top right hand corner and chooseCreate a new repository
. Fill out the details and click on the button to continue. -
Clone your newly created repository on your local machine using
git clone ...
. The command to use depends on whether you are using SSH or HTTPS or Github CLI. -
On the root directory, create an
.env
file, copy the variables from the env.example and update the values accordingly in your .env file.
- for WALLETCONNECT_PROJECT_ID visit
https://cloud.walletconnect.com/app
, create an account, set up a project to get your project id.
To finalize the setup, run these commands in this order
yarn install
- install the project's dependencies
./node_modules/.bin/nx prepare @akashaorg/typings
- using nx, runs prepare command using nx for typings package
yarn ceramic:create-config
- used to generate basic configuration for the ceramic node;
- add the printed env values to your .env file;
- this command should be run only for the initial setup;
yarn ceramic:start
- to start Ceramic node(in a separated terminal window)
yarn composedb:deploy
- to deploy ceramic models
yarn composedb:generate-data
- to deploy example-app and save generated data to the models;
- add the printed env values to your .env file;
yarn prepare
- using nx, runs prepare command for other packages
yarn serve
- to start the example app.
You can view the deployment on your browser here https://localhost:8181
This example works on sepolia
network by default.
If you need to change to a different network then update the sdk web3 module and restart from step #7
To clean the cache, run:
yarn clean
for ts compiled filesyarn cache clean
for the yarn cache