Skip to content

Maintenance guide #235

@Betree

Description

@Betree

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions