The Main Monorepo and entry-point of all things Civil
Switch branches/tags
am9u/components/email-signup am9u/dapp/card-dates-hocomponents am9u/dapp/listing-page-mobile-ui am9u/dapp/mobile-nav am9u/dapp/multi-rescue-tokens am9u/dapp/parameterizer-metamask-transaction-modals am9u/dapp/registry-card-status-updates am9u/dapp/registry-page-mobile-ui checkboxesandsteps dankins/buy-sell-transfer dankins/token-restrictions dependabot/npm_and_yarn/bignumber.js-8.0.1 dependabot/npm_and_yarn/react-scripts-ts-3.0.0 dependabot/npm_and_yarn/react-scripts-ts-3.1.0 dependabot/npm_and_yarn/rxjs-6.3.3 dependabot/npm_and_yarn/@storybook/addon-storyshots-4.1.1 dependabot/npm_and_yarn/styled-components-4.1.1 dependabot/npm_and_yarn/@types/lodash-4.14.119 dependabot/npm_and_yarn/@types/node-10.12.9 dependabot/npm_and_yarn/@types/react-redux-6.0.11 dependabot/npm_and_yarn/@0xproject/subproviders-2.0.7 everybody/wip-apollo-listing-events gh-pages jorge/ch1460/user-should-be-able-to-use-hardware-wallet jorge/ch1985/change-dapp-to-use-two-civil-s-one-for-read jorge/ch1985/change-dapp-to-use-two-civils-one-for-read master nickreynolds/address-to-bytes nickreynolds/audit-3-33-34 nickreynolds/audit-3-37 nickreynolds/audit-issue-55 nickreynolds/audit-issue-56 nickreynolds/charter nickreynolds/fix-challenge-page nickreynolds/gas-limit-issue nickreynolds/govt-readme-update nickreynolds/graphql-listing-history nickreynolds/listing-item-appeal-statement-fix nickreynolds/little-tcr-touches nickreynolds/login-button-enhancement nickreynolds/my-activity nickreynolds/readme-updates nickreynolds/remove-parameterizer-row nickreynolds/save-vote-option nickreynolds/secondary-audit-feedback nickreynolds/solidity-cleanup-2 nickreynolds/solidity-cleanup nickreynolds/test-plcr-from-epm nickreynolds/token-formatting nickreynolds/user-switching production ritave/fix-ts ritave/mocha-states tobek/copy tobek/dapp/charter walfly/blockconfirm walfly/checkboxspacing walfly/fix-failing-archive walfly/fixarchive walfly/makecreatoreditor walfly/optomistic-editors walker/hold-on-to-apply-button
Nothing to show
Clone or download
walfly Publish
 - @joincivil/components@1.7.3
 - @joincivil/contracts@4.7.3
 - @joincivil/core@4.7.3
 - @joincivil/dapp@0.8.3
 - @joincivil/dev-utils@1.5.1
 - @joincivil/ethapi@0.3.3
 - @joincivil/newsroom-manager@1.7.3
 - @joincivil/signing-server@1.1.3
 - @joincivil/tslint-rules@2.7.1
 - @joincivil/typescript-types@1.3.1
 - @joincivil/typescript-typings@1.3.1
 - @joincivil/utils@1.8.2
Latest commit ee41b5f Dec 14, 2018

README.md

Civil Logo


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.

Coverage Status CircleCI Gitter chat Telegram chat

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"],

Published packages

Package NPM Description
@joincivil/core npm link JS library for interacting with Civil ecosystem
@joincivil/tslint-rules npm link Linting rules for Civil's Typescript packages
@joincivil/utils npm link Utilities shared between Civil projects used during runtime
@joincivil/typescript-types npm link Types used in multiple Civil packages
@joincivil/typescript-typings npm link Typescript type roots for external projects and internal modifications
@joincivil/ethapi npm link An abstraction of Ethereum communication

Private packages

Package Description
@joincivil/contracts Smart-contracts needed for the Civil's protocol
@joincivil/dapp DApp for interacting with the Civil contracts
@joincivil/dev-utils Utilities needed for the proper working of the mono-repo packages, builds and tests
@joincivil/debug-ui WIP: Minimal website to monitor, observe and debug the protocol and all the utilities and packages of the ecosystem

Contributing

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.

If you're itching to dwelve deeper inside, help wanted and good first issue labels are good places to get started and learn the architecture.

Dev Setup

Install dependencies

This project is using yarn workspaces. They require yarn >= 1.0 to work properly.

Set up all dependencies:

from the root directory:

yarn install

Build

Build all packages in the monorepo:

yarn build

Turn on file-watch mode and rebuild most of the files on change:

yarn watch

Lint

Check all packages for linting errors:

yarn lint

Testing

Tests in Civil's ecosystem require the use of Ganache, Ethereum's development test network, spin it in a seperate terminal:

yarn ganache

Finally run all the tests in the main repository:

yarn test

Easy Setup with front-end

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 packages/contracts/conf/config.json.

From the root directory:

yarn ganache

Once that is running, in another terminal, from the root directory:

yarn preparelocally

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.

Run commands in all packages

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:

yarn lerna

To run scripts in all packages in the monorepo:

yarn lerna:run

Cleaning the state

To refresh the repository state as much as possible run:

yarn clean && yarn lerna clean --yes && rm -r node_modules && yarn install

🐙 was here.