guardian / facia-tool

Guardian front pages editor (AKA Fronts tool)
Other
26 stars 7 forks source link
production

Facia Tool

The Guardian front pages editor, known as the Fronts tool.

For information on core Fronts concepts, see the glossary.

Fronts Client

You can find the client for the Fronts tool in fronts-client.

Setup (need to be done once)

  1. Install NVM.
  2. Ensure Docker is installed
  3. Get credentials from Janus (cmsFronts, capi & frontend).
  4. Grant code permissions (used for local builds as well). Any engineer on ed tools should be able to give you access. You need:
    1. fronts_access
    2. launch_commercial_fronts
    3. edit_editorial_fronts
    4. edit_editions
    5. launch_editorial_fronts
    6. configure_fronts
  5. From the project root, run ./scripts/setup.sh.

Dev Start

  1. Run Docker locally
  2. To run the application:
    • From the project root, run ./scripts/dev-start.sh
    • From the project root, run without debug ./scripts/dev-start.sh --no-debug
  3. Open https://fronts.local.dev-gutools.co.uk.

Unit tests

Client side tests for V1

Client side tests for V2

Run yarn test in fronts-client folder. See fronts-client for more details.

IT tests with Database

sbt test database-int:test

Pressing fronts

The Fronts Tool

The most important part of this app is the Fronts Tool, used to curate the web and app front pages of the Guardian. Additionally it is used to manually curate emails.

In the UI, users can move stories from the Content API feed into different front pages or emails. These fronts can then be launched or published.

The Fronts Tool uses the most up-to-date front end, a React-Redux app located in fronts-client

Useful things to know:

The Editions creator

The Editions creator is used to curate content on both the Editions app (currently known as The Daily on iOS and Android), and the Feast recipes app. Editions creator also uses the fronts-client front end, and can be accessed from the Manage Editions menu on the homepage.

Curation works in the same way as the main fronts tool. But there are these differences:

For the specific, technical, definitions of the terms Edition, CuratedPlatform etc. please refer to the Glossary.

For more information about how specific Editions are built from Templates, see the technical docs at docs/EditionsTemplating.md

Full Editions codebase and documentation here.

The Config Tool

Fronts and collections are configured in the config tool. This allows for the name, geolocation and visual properties of collections to be set. The types and order of collections in a Front is set here too. This tool uses the "old" front end client. Each "type of fronts" has its own config url eg: https://fronts.gutools.co.uk/email/config

The Breaking News Tool

This enables breaking news notifications to be sent to app users who have signed up. This tool also uses the "old" front end client. You need permission from Central Production to access this tool in PROD. https://fronts.gutools.co.uk/breaking-news

In CODE the breaking news tool sends notifications to the "debug version" of the Android/iOS App.

Breaking News is represented by a front called breaking-news which is considered to be a special case. It has a Send Alert button rather than a Launch button. Only one thing can be added to a collection at a given time. You cannot send the same alert twice, and snap links cannot be added / alerted on. Different collections represent different audience groups (eg by location or by subscription to different topics.) To add a new one, just create a container. New breaking news containers need to have the layout breaking-news/not-for-other-fronts.

Client-side vulnerabilities: Synk and JSPM

The older client side tools (those with source code at /public/src - not the Fronts-tool) are bundled using JSPM. Instead of dependencies for the application being listed in the package.json file in the normal way, they are listed under "jspm" and compiled by JSPM using an import map.

A side effect of this is that the vulnerabilities are not surfaced by Synk. To address this, there is a workaround to construct a "regular" package.json file out real one, and a custom action so that Synk can report on vulnerabilities (see PR#1521).

To audit vulernabilities locally:

Troubleshooting

Postgres

Linting

Fronts tool uses eslint to ensure consistent style. Run eslint with

grunt eslint

More detailed instructions of how to develop fronts tool available here

Get Fronts Editors

There is a script to get a list of the fronts editors in the get-editors-script. See the script README for more details.