Civil is a decentralized and censorship resistant ecosystem for online Journalism. Read more in our whitepaper.
WIP Civil DApp - Read Documentation and Interact with Contracts and tools at our DApp, hosted for your convenience. This DApp and associated contracts are a Work In Progress and contracts are deployed on the Rinkeby testnet. If you would like some test CVL to try out the DApp, please ask in our Gitter room and we can send you some.
This repository contains all of the open-source Civil tools and packages written in Typescript. We hope that those tools will be useful for creation of interesting applications on top of the ecosystem as well as be useful in any project in the Ethereum space.
Most of the packages require additional typings for external dependencies. You can include those by prepending @joincivil/typescript-typings package to your typeRoots config.
"typeRoots": ["node_modules/@joincivil/typescript-typings/types", "node_modules/@types"],
||JS library for interacting with Civil ecosystem|
||Linting rules for Civil's Typescript packages|
||Utilities shared between Civil projects used during runtime|
||Types used in multiple Civil packages|
||Typescript type roots for external projects and internal modifications|
||An abstraction of Ethereum communication|
||Smart-contracts needed for the Civil's protocol|
||DApp for interacting with the Civil contracts|
||Utilities needed for the proper working of the mono-repo packages, builds and tests|
||WIP: Minimal website to monitor, observe and debug the protocol and all the utilities and packages of the ecosystem|
Civil's ecosystem is free and open-source, we're all part of it and you're encouraged to be a part of it with us.
Best place to start hacking would be to use the
@joincivil/core and build some application on top of the protocol.
This project is using yarn workspaces. They require
yarn >= 1.0 to work properly.
Set up all dependencies:
from the root directory:
Build all packages in the monorepo:
Turn on file-watch mode and rebuild most of the files on change:
Check all packages for linting errors:
Tests in Civil's ecosystem require the use of Ganache, Ethereum's development test network, spin it in a seperate terminal:
Finally run all the tests in the main repository:
We've added a helper command to assist you if you want to develop using the front-end and a local ganache. Just 3 simple commands.
First, however, you may want to add your own address (e.g. MetaMask account) to our config file so that you are distributed tokens/ETH properly and change the Appellate and GovernmentController addresses. This is especially useful if your MetaMask account is not the same as one of you ganache accounts (all ganache accounts are given tokens by default). Config file can be found at
From the root directory:
Once that is running, in another terminal, from the root directory:
After that completes:
cd packages/dapp yarn start
Now you have the dapp front-end running at
localhost:3000. Make sure to select
localhost 8545 in metamask to interact with the dapp.
Civil's monorepo is using lerna to easily manage the monorepo structure. Two helper yarn scripts are provided for your convenience.
To run the supported lerna version:
To run scripts in all packages in the monorepo:
To refresh the repository state as much as possible run:
yarn clean && yarn lerna clean --yes && rm -r node_modules && yarn install
🐙 was here.