REACT Frontend

The classic frontend is a single page application (SPA) written in REACT. See the Github repo of Argus-frontend

It needs its own specific settings and has a handful of API endpoints that are not needed if running headless.

Settings

Base the settings file on argus.spa.settings. The individual settings are in argus.spa.spa_settings, note especially that ROOT_URLCONF is set to argus.spa.root_urls. If you prefer to make your own root urls.py, the frontend-specific urls can be imported from argus.spa.spa_urls.

Domain settings

In production, Argus requires the frontend and the backend to either be deployed on the same domain, or the frontend to be on a subdomain of the ARGUS_SPA_COOKIE_DOMAIN. When running Argus on localhost for development and testing using the dev, dockerdev or test_CI settings-file as a base, ARGUS_SPA_COOKIE_DOMAIN can be empty (and will default to localhost).

Dataporten via OAuth2

Refer to the section dataporten for more information.

API Endpoints

The following endpoints are only used by this frontend:

  • /login-methods/

  • /api/v1/login/

  • /api/v2/login/

  • /api/v1/logout/

  • /api/v2/logout/

Furthermore, visiting /oidc/login/dataporten_feide/ when dataporten is set up will trigger a login via dataporten.