Welcome to manage.theguardian.com repo!
🤝 This code is owned by the SR Value team, please feel free to join our chat room for advice 🤝
💡 This README contains mainly set-up information. 💡
Please see the wiki for the main documentation
DEV only Dependencies
gateway
- IDAPI
members-data-api
holiday-stop-api
delivery-records-api
cancellation-sf-cases-api
- Stripe
- Google ReCaptcha
NOTE: nginx proxies CODE instances of gateway
for sign-in and members-data-api
if they're not running locally. See sections further down if you need to actually develop either of those services in parallel with manage-frontend
.
Note: When using the local proxy, the sign-in flow for social logins (for example Google) doesn't quite work as the provider has no knowledge of the proxy and redirects back to CODE which doesn't know how to handle the request. The solution is to either use a username/password to sign in or if you need social login run gateway
locally.
- Install Yarn if you don't already have it.
- Follow the Nginx steps for manage-frontend
- Ensure you have a Node.js version manager installed. We recommend using
fnm
. - Run
fnm use
(or equivalent) - Run
yarn
to install dependencies
-
First fetch credentials from Janus for the
membership
profile. -
You will need to have nginx running (
sudo nginx
) if it's not running already. -
Run
yarn watch
. -
This should open https://manage.thegulocal.com/ in the browser (this often happens before the server is fully up and running so you may need to refresh if you see an error).
-
You will very likely be redirected to
profile.thegulocal.com
(as you need to be signed in, in the last hour, to use MMA - see wiki/IDAPI-Integration). You can use the same login as you would use in CODE, and you can create new subs by visiting https://support.code.dev-theguardian.com (when sign-in there with the same account). Social sign-in (Google, Facebook etc.) doesn't appear to work via the proxy unfortunately.
- Follow the setup instructions for members-data-api.
- You will also need to have members-data-api (
./start-api.sh
) running, to get subscription data (from CODE Zuora/Salesforce). - You will probably also need the tunnel to the
contributions-store
, see point 2 of members-data-api#running-locally
You must ssh via the bastion, e.g. using ssm-scala:
ssm ssh --profile membership --bastion-tags contributions-store-bastion,support,PROD --tags manage-frontend,support,CODE -a -x --newest
Description | Command |
---|---|
application directory | /etc/gu/dist |
application logs | /var/log/manage-frontend.log |
service config | /etc/systemd/system/manage-frontend.service |
service logs | journalctl -u manage-frontend |
service status | systemctl status manage-frontend |
healthcheck | curl http://127.0.0.1:9233/_healthcheck |