the core value proposition of informed-citizen is encapsulated the analysis workflow:
cronkite
is the core API and serves the ui application assets. other services can be referenced in the docker-compose file in the root of the project.
install:
- nodejs 10.+
- docker, 18.*
- yarn, latest
this project houses multiple artifacts. at the time of writing:
- a webservice,
cronkite
- a common library, sharing functionality between the ui & webserver
- tbd
a ui application
see the packages/
folder for individual project sources.
this project uses lerna to link the dependent projects together, so co-development may occur.
- ensure
NODE_ENV
is set in your environment. e.g.echo NODE_ENV=development >> ~/.bashrc && . ~/.bashrc
- cd
/path/to/project
yarn bootstrap
to install and link all child project dependencies- never
yarn add <thing>
into a project directly, unless you know what you are doing. it's advisable to add dependencies to the relevant package.json and runyarn bootstrap
again from the root project. this ensures that all links remain intact between packages!
- never
yarn build
to compile all sub projects.
- add
ENV
variables to ainformed.env
file, usinginformed.env.example
as the guiding template
- trust the dev cert at
./reverse-proxy/sercurity/cert.pem
yarn start:services
to start required services (scraper, analyzer, database, dev-only reverse-proxy),cd packages/cronkite
&yarn start
to:- launch the api,
- migrate the db
- serve thi isomorphicjs ui app
edit freely.
- if you see a
ENOSPC
error on linux, consider this remedy.
- VSCode users can benefit from the multi-package project by opening
project.code-workspace
- e.g.
code project.code-workspace
- this enables all of the VSCode workspace radness
- e.g.
see packages
all code is autoformatted using prettier-standard
for an opinionated, rigid style