Skip to content

delvtech/council-kit

Repository files navigation

Council Kit Logo

Council-Kit

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+.

What's inside?

This monorepo uses Yarn as a package manager. It includes the following packages/apps:

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.

Packages

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.

Utility Packages

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.

Monorepo commands

Build

To build all apps and packages, run the following command:

yarn build

# build only packages (useful for app development)
yarn build:packages

Develop

To run the development server for all apps, run the following command:

yarn dev

Linting

To run linting on all apps and packages, run the following command:

yarn lint

Formatting

To run formatting on all apps and packages, run the following command:

yarn format:check

# write formatting changes to files
yarn format

Development

  1. Clone the repo: git clone [email protected]:delvtech/council-kit.git
  2. Run yarn at the top-level to install all packages across every workspace

Installing new packages

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

Installing a workspace package

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": "*"
  }
}

Running workspace scripts

To run scripts in workspaces, use the following command:

yarn workspace <workspace-name> <package.json script>

Example

yarn workspace council-ui start

Turborepo

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.

Remote Caching

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

Resources

Learn more about the power of Turborepo:

About

A monorepo of apps and packages for the Council governance protocol.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages