https://github.com/CaptainFact/captain-fact-frontend
🔎 CaptainFact - Frontend. The one you see on https://captainfact.io
https://github.com/CaptainFact/captain-fact-frontend
captain-fact civic-tech collaborative fact-checking frontend hacktoberfest react spa
Last synced: 6 months ago
JSON representation
🔎 CaptainFact - Frontend. The one you see on https://captainfact.io
- Host: GitHub
- URL: https://github.com/CaptainFact/captain-fact-frontend
- Owner: CaptainFact
- License: agpl-3.0
- Created: 2017-10-23T01:01:25.000Z (over 8 years ago)
- Default Branch: staging
- Last Pushed: 2025-05-21T17:58:23.000Z (9 months ago)
- Last Synced: 2025-07-30T18:31:59.189Z (7 months ago)
- Topics: captain-fact, civic-tech, collaborative, fact-checking, frontend, hacktoberfest, react, spa
- Language: JavaScript
- Homepage:
- Size: 32.4 MB
- Stars: 86
- Watchers: 11
- Forks: 33
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

CaptainFact.io
## Getting started
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](https://github.com/asdf-vm/asdf) with `NODEJS_CHECK_SIGNATURES=no asdf install`
- App dependencies: `npm install`
- Run:
- `npm start` - Start the front-end
- `npm 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=`admin@captainfact.io` and password=`password`.
## Conventions
#### File structure
```
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
└── router.jsx => Application router and main entry point
```
#### Styling
Styling is based on [Tailwind](https://tailwindcss.com). Some legacy code still uses [styled-components](https://styled-components.com/), but its usage is discouraged.
## Main Libraries / Frameworks
- [ES6](http://es6-features.org) with [Babel](https://babeljs.io/)
- [React](https://reactjs.org/): View layer
- [React Router](https://github.com/ReactTraining/react-router): Routing
- [Phoenix](https://phoenixframework.org/): Interaction with [https://hexdocs.pm/phoenix/Phoenix.Socket.html](Phoenix.Socket)
- [TailwindCSS](https://tailwindcss.com/): Utility-first CSS framework
- [Redux](https://redux.js.org/): State management (deprecated)
## Linked projects
- [Community discussions and documentation](https://github.com/CaptainFact/captain-fact/)
- [API](https://github.com/CaptainFact/captain-fact-api)
- [Extension](https://github.com/CaptainFact/captain-fact-extension)
- [Overlay injector](https://github.com/CaptainFact/captain-fact-overlay-injector)
## License
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](LICENSE) for more info.
