MCPcopy Index your code
hub / github.com/CaptainFact/captain-fact-frontend

github.com/CaptainFact/captain-fact-frontend @1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.0 ↗ · + Follow
668 symbols 1,713 edges 287 files 8 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CaptainFact.io

Discord AGPL3 Build Status



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):

  • Docker and docker-compose (to start the API easily)

  • NodeJS, ideally using asdf with NODEJS_CHECK_SIGNATURES=no asdf install
  • App dependencies: npm install

  • Run:

  • docker-compose up - Start the API
  • npm start - Start the frontend
  • npm run test - run all unit tests

Frontend is started on http://localhost:3333

A default account should have been created for you with email=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
├── styles => stylesheets in .sass format, all included from application.sass
└── router.jsx => Application router and main entry point

Styling

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.

Icons

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/.

Main Libraries / Frameworks

  • ES6 with Babel
  • ReactJS: vue layer
  • Redux: state management
  • ReactRouter: routing
  • phoenix: interaction with phoenix socket
  • Bulma: base styles

Linked projects

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 for more info.

Core symbols most depended-on inside this repo

get
called by 54
app/API/http_api/index.js
push
called by 38
app/API/socket_api.js
createEffect
called by 16
app/state/utils.js
renderPageMenuEntry
called by 13
app/components/Help/Help.jsx
isExternal
called by 12
app/lib/url_utils.js
post
called by 8
app/API/http_api/index.js
delete
called by 8
app/API/http_api/index.js
videoURL
called by 7
app/lib/cf_routes.js

Shape

Method 278
Function 246
Class 144

Languages

TypeScript100%

Modules by API surface

app/components/UsersActions/ActionDiff.jsx14 symbols
app/components/Comments/CommentDisplay.jsx14 symbols
app/components/Utils/FlashMessages.jsx13 symbols
app/components/Users/UserFormFields.jsx11 symbols
app/API/http_api/index.js11 symbols
app/API/http_api/current_user.js11 symbols
app/components/Speakers/SpeakerPage.jsx10 symbols
app/components/LoggedInUser/UserProvider.jsx10 symbols
app/components/App/BackgroundNotifier.jsx10 symbols
app/components/Utils/TimeSince.jsx9 symbols
app/components/Statements/StatementForm.jsx9 symbols
app/components/Speakers/SpeakerPreview.jsx9 symbols

For agents

$ claude mcp add captain-fact-frontend \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact