Skip to content
Guardian front pages editor
JavaScript TypeScript Scala HTML CSS Python Other
Branch: master
Clone or download
blishen Merge pull request #1132 from guardian/db-aus-mod-4
Avoid duplication between containers
Latest commit b61e2f4 Dec 11, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Replace flow with Typescript (#420) Oct 17, 2018
app Updates from Chris that try to exclude repetition between containers Dec 11, 2019
client-v2 Integration test fix Dec 4, 2019
conf Changes after comments Nov 19, 2019
docs Improve delete functionality Nov 22, 2019
grunt-configs Rahb/fix jspm (#710) Apr 25, 2019
nginx Remove trailing slash in nginx proxy config (#516) Jan 7, 2019
project
public Lint Dec 6, 2019
scripts fail fast Nov 13, 2019
test handle pagination to get all data from capi on Suggest Articles (#1126) Dec 6, 2019
.editorconfig just trying this out Jul 28, 2015
.eslintrc Code now runs 1000% faster due to linting fixes Feb 5, 2019
.gitignore add local config Jun 19, 2019
.jscsrc Use dotfile for JSCS config, as per convention Jun 17, 2015
.nvmrc Upgrade to node 9 Feb 5, 2019
.prettierrc Fix some global editor / config stuff (#694) Apr 23, 2019
.prout.json Update .prout.json Jul 24, 2019
.sbtopts add .sbtopts Sep 11, 2019
GUIDE_TO_FRONTS.md Add info on pressing fronts Sep 9, 2019
Gruntfile.js switch to sbt riff raff upload Jun 2, 2017
LICENSE
PULL_REQUEST_TEMPLATE.md update PR template Aug 20, 2019
README.md adding command to run tests with Database to README (#1062) Oct 11, 2019
build.sbt Upgrade facia-scala-client to 3.0.19; add code to handle uri-encoded … Dec 6, 2019
docker-compose.yml Database name is now facia-tool Jun 19, 2019
package-lock.json Bump mixin-deep from 1.3.1 to 1.3.2 Aug 28, 2019
package.json Fix jspm (#709) Apr 25, 2019
riff-raff.yaml Use an encrypted AMI Feb 16, 2018
yarn.lock

README.md

Facia Tool

The Guardian front pages editor.

Client V2

Fronts Client V2 is in Active Development. You'll find it over at client-v2.

Setup (need to be done once)

  1. Install NVM.
  2. Get credentials from Janus.
  3. From the project root, run ./scripts/setup.sh.

Dev Start

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

Unit tests

IT tests with Database

sbt test database-int:test

Pressing fronts

  • Before fronts can appear on site, they have to be pressed by Facia-Press which lives on the frontend account.

  • The fronts tool sends events to an sqs queue which Facia-Press listens. You can read more about Facia-Press here.

  • If you are adding a new kind of content to a front or changing the front configuration, you should check that the front can still be pressed.

  • To check this, check that a piece of content still appears on frontend. Edit the articles appearing on a front, launch the front and check that your changes are appearing here: http://m.code.dev-theguardian.com/{name-of-front}

  • If the front that you are trying to view cannot be found, it is probably because the front is hidden.

  • You can remove this property from the front in the fronts config page.

  • Select the front your are trying to view on the config page, click on the edit-metadata link, and deselect the is hidden-property.

  • If you are developing locally and do not have frontend credentials from janus, the fronts tool won't have permissions to push events to the sqs queue that Facia-Press reads from. To test that a front is pressed, you will have to deploy your changes to code, and test the code from there.

Troubleshooting

Postgres
  • If you wish to delete everything in the database you can use docker-compose down -v which will delete the container's persistent volumes.

  • If you wish to connect to the local database you can run ./scripts/local-psql.sh which has the user, database and password preconfigured and ready to go.

  • If you need the master passwords for the production postgres instances they are stored as SSM parameters and can be found at:

    • CODE: facia-tool/cms-fronts/CODE/db/password
    • PROD: facia-tool/cms-fronts/PROD/db/password To fetch these can be fetched using the aws cli like so:

    aws ssm get-parameter --name /facia-tool/cms-fronts/CODE/db/password --with-decryption --profile cmsFronts --region eu-west-1

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.

You can’t perform that action at this time.