The Guardian Editions app includes the UK Daily edition, Australia Weekend and other special editions. The app is available on Android and iOS phones and tablets.
If you haven't already it's worth running strap & then installing gu-base
which adds a load of useful stuff including VSCode - the editor used by the editions team.
The project uses nvm so this will need to be installed before if it's not already. Do not install it using brew.
Once nvm is installed run nvm use
.
Run make install
, this will install the dependencies for all sub-projects.
You will need mobile
and cmsFronts.s3Read
credentials loaded. (NOTE: At present, if you have [default] credentials set in ~/.aws/credentials) the app won't build - best to delete these before continuing)
To run the client-side app, cd into projects/Mallard
and check out it's README.
The project is split into several sub projects, located in the projects directory. Each of these contains a package.json
and README.md
file.
Make targets are used to build, lint, test and install dependencies. These can either run against one, some, or all of the subprojects.
make install
install node dependencies with yarnmake validate
run lintmake fix
run lint with autofixmake test
run unit testsmake build
compilemake clean
delete node modules and other build related thingsmake list
To run a make target against one project only, follow it with -
and the project name:
make install-Mallard
To exclude one or more projects, set the EXCLUDE
environment variable to the names of the project seperated by spaces. This is used on CI to produce backend only builds.
This is the mobile app for downloading and viewing Editions. It runs on Android and iOS via react-native.
This is the lambda which turns CAPI, fronts data and images into a format the app can use, it can be run as a local http service for development.
This is a collection of lambdas which form a step function which uses the backend to generate the contents of the S3 buckets which the app reads from.
This is the Amazon architecture for the backend and archiver, expressed as cdk.
This contains common
which is the code shared between app and backends and crosswords
which is the crossword.
These all deploy in one go. The default github branch is main
which automatically triggers CI deployment once someone merges code changes into it. If you need to deploy from a different branch (i.e. from a PR branch) first make sure it builds ok in teamcity job (Editions > Build) and make sure you choose the right branch before you press the run
button in teamcity. Once the build completes successfully, make a note of the build number, go to riffraff, type/find the editions
project and choose the build number you noted from teamcity. As usual, you can choose CODE or PROD to deploy depending on your needs.
There is a scheduled github action which runs everyday at 3pm and uploads an internal beta build to testflight.
To manually upload an internal beta
- Go to the scheduled github action
- Select Run Worflow
- Select which branch you would like to use the workflow from
- Editors open the Fronts tool and collate the content for an issue.
- Editors click 'Proof'
- The list of articles forming the content is written to a json file in a specific s3 bucket
- A policy on that bucket notifies a function running in AWS Lambda service
- That function (and a bunch of others that follow it) produces the entire issue content and write it to a different s3 bucket ('proofed')
- The download location of that content is added to an index file in that bucket
- Editions click 'Publish' when it is ready
- That triggers another step function in 'archiver' which copy all the generated content in previous step to a different s3 ('published')
- The app is opened and fetches the index file
- The user chooses which issues they would like to have
- The app fetches those issues
- The user reads the e-paper, there is applause, fireworks, etc.
- Fronts tool (aka facia-tool)
- owned by the
cmsFronts
account,facia-$STAGE
stack
- owned by the
writes to
- bucket
published-editions-$STAGE
- owned by the
cmsFronts
account,facia-db-$STAGE
stack
- owned by the
which notifies
- the lambda specified in the
mobile
account- Currently this is:
arn:aws:lambda:eu-west-1:201359054765:function:editions-proof-archiver-s3-event-listener-CODE
arn:aws:lambda:eu-west-1:201359054765:function:editions-proof-archiver-s3-event-listener-PROD
- Currently this is:
which kicks off the step function, which writes to
-
the s3 bucket
editions-proofed-$STAGE
- owned by the
mobile
account
- owned by the
until the complete issue is ready to publish, when it is copied to
- the s3 bucket
editions-published-$STAGE
- owned by the
mobile
account
- owned by the