diff --git a/README.md b/README.md index 7f24e25..41f341c 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,32 @@ -# Jolly-Roger +

+ + Jolly-Roger Logo + +

+

+ + Twitter + + + GitHub commit activity + + + License + + + open issues + +

+ +--- A template to develop decentralised applications -## How to use? +# How to use? We are assuming here that you already setup your env as specified in the [initial setup section](#initial-setup) -### install dependencies +## install dependencies Note here that while you can use `pnpm i`, we recommend you follow the instruction here so you can have everything setup with your own project's name. @@ -22,7 +42,7 @@ You can also manually set the name yourself : pnpm set-name [] && pnpm i ``` -### start! +## start! Then Assuming you have [zellij](https://zellij.dev/) installed @@ -64,7 +84,7 @@ pnpm indexer:dev pnpm web:dev ``` -## Deploying to a network +# Deploying to a network Just execute the following @@ -84,7 +104,7 @@ Then you can deploy your contract pnpm contracts:deploy ``` -## Initial Setup +# Initial Setup You need to have these installed diff --git a/docker-compose-geth.yml b/dev/docker-compose-geth.yml similarity index 100% rename from docker-compose-geth.yml rename to dev/docker-compose-geth.yml diff --git a/docker-compose-ipfs.yml b/dev/docker-compose-ipfs.yml similarity index 100% rename from docker-compose-ipfs.yml rename to dev/docker-compose-ipfs.yml diff --git a/docker-compose.yml b/dev/docker-compose.yml similarity index 100% rename from docker-compose.yml rename to dev/docker-compose.yml diff --git a/wezterm.lua b/dev/wezterm.lua similarity index 93% rename from wezterm.lua rename to dev/wezterm.lua index 0d451f3..88d3d7e 100755 --- a/wezterm.lua +++ b/dev/wezterm.lua @@ -8,10 +8,10 @@ wezterm.on('gui-startup', function(cmd) } - tab:set_title 'jolly-roger' - window:set_title 'jolly-roger' + tab:set_title 'stratagems' + window:set_title 'stratagems' - local pane_indexer = pane:split { + local pane_indexer = pane:split { args = {'bash', '-i', '-c', 'cd '.. cmd.args[1] .. '; sleep 1; pnpm indexer:dev; bash'}, direction = 'Bottom' } diff --git a/zellij-attach.kdl b/dev/zellij-attach.kdl similarity index 68% rename from zellij-attach.kdl rename to dev/zellij-attach.kdl index 308f64b..20ecea7 100644 --- a/zellij-attach.kdl +++ b/dev/zellij-attach.kdl @@ -2,13 +2,13 @@ layout { pane { pane {} pane split_direction="vertical" { - pane command="bash" { + pane name="INDEXER" command="bash" { args "-c" "pnpm indexer:dev; cd indexer; ${SHELL-bash}" } - pane command="bash" { + pane name="COMMON" command="bash" { args "-c" "pnpm common:dev; cd common; ${SHELL-bash}" } - pane command="bash" { + pane name="WEB" command="bash" { args "-c" "pnpm web:dev; cd web; ${SHELL-bash}" } } diff --git a/zellij-remote.kdl b/dev/zellij-remote.kdl similarity index 69% rename from zellij-remote.kdl rename to dev/zellij-remote.kdl index 42e8c1d..151bc33 100644 --- a/zellij-remote.kdl +++ b/dev/zellij-remote.kdl @@ -2,21 +2,21 @@ layout { pane { pane {} pane split_direction="vertical" { - pane command="bash" { + pane name="COMPILE" command="bash" { args "-c" "pnpm contracts:compile:watch; cd contracts; ${SHELL-bash}" } - pane command="bash" { + pane name="DEPLOY" command="bash" { args "-c" "pnpm contracts:deploy:watch ${MODE}; cd contracts; ${SHELL-bash}" } } pane split_direction="vertical" { - pane command="bash" { + pane name="INDEXER" command="bash" { args "-c" "pnpm indexer:dev; cd indexer; ${SHELL-bash}" } - pane command="bash" { + pane name="COMMON" command="bash" { args "-c" "pnpm common:dev; cd common; ${SHELL-bash}" } - pane command="bash" { + pane name="WEB" command="bash" { args "-c" "pnpm web:dev; cd web; ${SHELL-bash}" } } diff --git a/dev/zellij.kdl b/dev/zellij.kdl new file mode 100644 index 0000000..edbec33 --- /dev/null +++ b/dev/zellij.kdl @@ -0,0 +1,28 @@ +layout { + pane { + pane {} + pane split_direction="vertical" { + pane name="NODE" command="bash" { + args "-c" "pnpm local_node; ${SHELL-bash}" + } + pane name="COMPILE" command="bash" { + args "-c" "pnpm contracts:compile:watch; cd contracts; ${SHELL-bash}" + } + pane name="DEPLOY" command="bash" { + args "-c" "pnpm contracts:deploy:watch; cd contracts; ${SHELL-bash}" + } + } + pane split_direction="vertical" { + pane name="INDEXER" command="bash" { + args "-c" "pnpm indexer:dev; cd indexer; ${SHELL-bash}" + } + pane name="COMMON" command="bash" { + args "-c" "pnpm common:dev; cd common; ${SHELL-bash}" + } + pane name="WEB" command="bash" { + args "-c" "pnpm web:dev; cd web; ${SHELL-bash}" + } + } + } + +} diff --git a/package.json b/package.json index 941b30f..fa74d17 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "set-name": "npx change-name@0.3.1 --ask jolly-roger", "template-test": "pnpm --filter ./contracts local_node & pnpm run --filter ./contracts deploy localhost ~~ pnpm export -n localhost --ts ../indexer/src/contracts.ts,../web/src/data/contracts.ts ~~ && pnpm run --filter ./common build && pnpm --filter ./indexer build", "sync-deps": "syncpack fix-mismatches && pnpm -r format:fix", + "update-deps": "pnpm update -r -i --latest && pnpm sync-deps", "---------------------- FORMAT ----------------------": "", "format": "prettier --write . && pnpm -r format", "format:check": "prettier --check . && pnpm -r format:check", @@ -39,10 +40,10 @@ "docs:build": "pnpm contracts:docs && vitepress build docs", "docs:preview": "vitepress preview docs", "---------------------- WEB USING EXISTING DEPLOYMENT ----------------------": "", - "zellij-attach": "zellij --layout zellij-attach.kdl a ${npm_package_name}-attach-$MODE || zellij --layout zellij-attach.kdl -s ${npm_package_name}-attach-$MODE", + "zellij-attach": "zellij --layout dev/zellij-attach.kdl a ${npm_package_name}-attach-$MODE || zellij --layout dev/zellij-attach.kdl -s ${npm_package_name}-attach-$MODE", "attach": "ldenv -m localhost pnpm --filter ./contracts export -n @@MODE --ts ../indexer/src/contracts.ts,../web/src/data/contracts.ts ~~ pnpm run zellij-attach ~~ @@", "---------------------- FULL AGAINST AN EXISTING NETWORK ----------------------": "", - "zellij-remote": "zellij --layout zellij-remote.kdl a ${npm_package_name}-remote-$MODE || zellij --layout zellij-remote.kdl -s ${npm_package_name}-remote-$MODE", + "zellij-remote": "zellij --layout dev/zellij-remote.kdl a ${npm_package_name}-remote-$MODE || zellij --layout dev/zellij-remote.kdl -s ${npm_package_name}-remote-$MODE", "remote": "ldenv pnpm run zellij-remote @@", "---------------------- DEPLOY ----------------------": "", "build": "ldenv -m sepolia pnpm run --filter ./contracts export -n @@MODE --ts ../indexer/src/contracts.ts,../web/src/data/contracts.ts ~~ pnpm run --filter ./common build ~~ pnpm run --filter ./indexer build ~~ pnpm run --filter ./web build ~~ @@", @@ -51,8 +52,8 @@ "contracts:deploy:prepare": "ldenv -m localhost ask-env -f contracts/.env.local ETH_NODE_URI_@@MODE MNEMONIC_@@MODE ETHERSCAN_API_KEY:?:ETHERSCAN_API_KEY @@", "contracts:deploy:watch": "ldenv -m localhost pnpm _contracts:deploy:watch @@", "---------------------- RUN FULL LOCAL SETUP ----------------------": "", - "start:wezterm": "wezterm --config-file wezterm.lua start $PWD", + "start:wezterm": "wezterm --config-file dev/wezterm.lua start $PWD", "stop": "zellij kill-session $npm_package_name", - "start": "zellij --layout zellij.kdl a $npm_package_name || zellij --layout zellij.kdl -s $npm_package_name" + "start": "zellij --layout dev/zellij.kdl a $npm_package_name || zellij --layout dev/zellij.kdl -s $npm_package_name" } } diff --git a/zellij.kdl b/zellij.kdl deleted file mode 100644 index e68dc61..0000000 --- a/zellij.kdl +++ /dev/null @@ -1,30 +0,0 @@ -layout { - pane { - pane {} - pane split_direction="vertical" { - pane command="bash" { - args "-c" "pnpm local_node; ${SHELL-bash}" - } - pane { - pane command="bash" { - args "-c" "pnpm contracts:compile:watch; cd contracts; ${SHELL-bash}" - } - pane command="bash" { - args "-c" "pnpm contracts:deploy:watch; cd contracts; ${SHELL-bash}" - } - } - } - pane split_direction="vertical" { - pane command="bash" { - args "-c" "pnpm indexer:dev; cd indexer; ${SHELL-bash}" - } - pane command="bash" { - args "-c" "pnpm common:dev; cd common; ${SHELL-bash}" - } - pane command="bash" { - args "-c" "pnpm web:dev; cd web; ${SHELL-bash}" - } - } - } - -}