CaptainFact / CaptainFact/captain-fact
Maintenance guide
- Dominant language
- No language data
- Stars
- 71
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
This project is currently under low-maintenance mode and will likely receive very few updates in the future.
This guide aims to provide:
- A reference for developers who want to pursue the development of CaptainFact.
- An overview of the project's architecture and the technologies used.
- Some technical guidelines to move the project in a more maintainable direction.
We will update this guide as the project evolves.
# CaptainFact
CaptainFact is composed of several parts:
- [A Fronted](https://github.com/CaptainFact/captain-fact-frontend) in React
- [An API](https://github.com/CaptainFact/captain-fact-api) built with Elixir, Phoenix, PostgreSQL, and Absinthe
- [A Browser Extension](https://github.com/CaptainFact/captain-fact-extension) for Chrome and Firefox
- [An Overlay injector](https://github.com/CaptainFact/captain-fact-overlay-injector), on which the browser extension relies
# Architecture
## Frontend
The frontend is a React application built with Webpack and Babel.
### State management
The project was initially setup with Redux, but the latest versions break the project. Redux seems an overkill for our use case, especially since we introduced Apollo Client for GraphQL queries (see below).
We would gladly accept a PR that removes Redux and replaces it with a simpler solution, such as React's Context API.
### Data fetching
There are three types of data fetching in the project: REST, GraphQL, and WebSockets:
- REST is used mainly for authentication and user data. It is now deprecated in favor of GraphQL and should ideally be removed.
- GraphQL is used for all the newer features. It is powered by Apollo Client.
- WebSockets are used for everything real-time (comments, statements, votes...etc), namely the `VideoDebate` page. They're currently served by the REST API, but new sockets should be served by the GraphQL API.
## API
The API is built with Elixir, Phoenix, PostgreSQL, and Absinthe.
Many libraries and core functionalities need to be updated. Any tested PR that aims to update the project's dependencies would be welcome.
## Extension
The extension is built with Webpack, Babel, and React.
It was recently migrated to Manifest V3.
## Overlay injector
The overlay injector uses React and extracts the logic of injecting the overlay into a separate library. It can be used
on any website.
Having to update this library to update the extension is a pain point, so we may want to merge the two projects at some point.
Contributor guide
Research direction
Start by reviewing the architecture and technology sections in this issue, then inspect the linked frontend, API, extension, and overlay injector projects. Done means a maintainable guide covers the project's architecture, technologies, and technical guidelines, with a clear place for future updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, elixir, graphql, postgresql, react, redux, webpack
- Domain
- developer-experience, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100