Council kit is the complete toolkit for scaffolding your own DAO using the council protocol. This repository is designed to be forkable for your own council protocol variant.
Get started with the Docs.
Requires Node 14+
.
This monorepo uses Yarn as a package manager. It includes the following packages/apps:
Name | Description |
---|---|
council-ui | A reference user interface built with NextJS and using the SDK. |
council-sdk-starter | A boilerplate TypeScript project that uses the SDK. |
Name | Description |
---|---|
council-sdk | A TypeScript SDK for interfacing with the Council protocol. |
council-deploy | A template for deploying council contracts on Goerli. |
council-typechain | Type classes generated from the council protocol contracts using Typechain. |
Name | Description |
---|---|
@council/eslint-config | Package for static type checking. |
prettier-config | Package for code formatting. |
@council/tsconfig | Package for TypeScript configuation. |
Each package/app is 100% TypeScript.
To build all apps and packages, run the following command:
yarn build
# build only packages (useful for app development)
yarn build:packages
To run the development server for all apps, run the following command:
yarn dev
To run linting on all apps and packages, run the following command:
yarn lint
To run formatting on all apps and packages, run the following command:
yarn format:check
# write formatting changes to files
yarn format
- Clone the repo:
git clone [email protected]:delvtech/council-kit.git
- Run
yarn
at the top-level to install all packages across every workspace
Here are a few examples of how to install packages in this repo:
# Install prettier for the top-level package.json, useful for tooling that
# runs against the entire monorepo
yarn add prettier
# Install lodash for the packages/council-sdk workspace.
# Note: specify the workspace by the name in its `package.json`, ie: `@council/sdk` not `council-sdk`
yarn workspace @council/sdk add lodash
To install a project from the packages/ directory as a dependency, copy it
directly into your app package.json like this, then run yarn
.
{
"dependencies": {
"@council/sdk": "*",
"@council/typechain": "*"
}
}
To run scripts in workspaces, use the following command:
yarn workspace <workspace-name> <package.json script>
Example
yarn workspace council-ui start
This package uses the turborepo monorepo framework. Turborepo provides additional features compared to a plain monorepo such as local/remote command caching and parallel npm script execution.
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
cd my-turborepo
npx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
npx turbo link
Learn more about the power of Turborepo: