If you're already have the API running locally, a simple npm install && npm start
should be enough. Otherwise follow the procedure below:
-
Install (if you don't have them):
- The API project: https://github.com/opencollective/opencollective-api
- NodeJS, ideally using asdf-vm with
NODEJS_CHECK_SIGNATURES=no asdf install
- App dependencies:
npm install
-
Run:
npm start
- Start the front-endnpm run test
- Runs all unit tests
Front-end is started on http://localhost:3333
A default account should have been created for you with
e-mail=[email protected]
and password=password
.
app
βββ API => API libraries for both REST API and websockets
βββ assets => Assets imported from JS
βββ components => All react components
βββ i18n => Translations
βββ lib => Misc utilities
βββ state => All redux related
βΒ Β βββ comments
βΒ Β βΒ Β βββ effects.js => Async actions creators, always return a promise
βΒ Β βΒ Β βββ record.js => The object representing a single comment
βΒ Β βΒ Β βββ reducer.js => Reducer + actions creators, always return an action object
βΒ Β βΒ Β βββ selectors.js => Re-select selectors to select data in state
βΒ Β βββ ...
βββ static => Static assets, directly copied to the public directory
βββ styles => Stylesheets in .sass format, all included from application.sass
βββ router.jsx => Application router and main entry point
Styling is based on Bulma and was initially customized with SASS. However we now include styled-components, styled-system and @rebass/grid. This has become the prefered way to build new components.
We bundle a custom font icon built with IcoMoon. You can find scripts and config
for this in dev/
but the preferred (and easiest) way to add new icons today
is to use https://styled-icons.js.org/
.
- ES6 with Babel
- React: View layer
- Redux: State management
- React Router: Routing
- Phoenix: Interaction with https://hexdocs.pm/phoenix/Phoenix.Socket.html
- Bulma: Base styles
GNU AFFERO GENERAL PUBLIC LICENSE Version 3
Permissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available.
See LICENSE for more info.