{"id":14036086,"url":"https://github.com/Financial-Times/google-amp","last_synced_at":"2025-07-27T03:31:24.003Z","repository":{"id":4110011,"uuid":"51845484","full_name":"Financial-Times/google-amp","owner":"Financial-Times","description":"⚡️ FT.com's implementation of the AMP project.","archived":true,"fork":false,"pushed_at":"2022-09-21T14:12:03.000Z","size":2301,"stargazers_count":12,"open_issues_count":32,"forks_count":5,"subscribers_count":80,"default_branch":"main","last_synced_at":"2025-03-21T10:53:54.979Z","etag":null,"topics":["amp","amp-html","team-apps"],"latest_commit_sha":null,"homepage":"https://amp.ft.com/content/94e97eee-ce9a-11e5-831d-09f7778e7377","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Financial-Times.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2016-02-16T15:14:40.000Z","updated_at":"2023-08-20T11:25:11.000Z","dependencies_parsed_at":"2023-01-11T16:23:21.352Z","dependency_job_id":null,"html_url":"https://github.com/Financial-Times/google-amp","commit_stats":null,"previous_names":[],"tags_count":235,"template":false,"template_full_name":null,"purl":"pkg:github/Financial-Times/google-amp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Financial-Times%2Fgoogle-amp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Financial-Times%2Fgoogle-amp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Financial-Times%2Fgoogle-amp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Financial-Times%2Fgoogle-amp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Financial-Times","download_url":"https://codeload.github.com/Financial-Times/google-amp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Financial-Times%2Fgoogle-amp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267294180,"owners_count":24065343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amp","amp-html","team-apps"],"created_at":"2024-08-12T03:01:49.846Z","updated_at":"2025-07-27T03:31:23.483Z","avatar_url":"https://github.com/Financial-Times.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# google-amp\n\n[![Circle CI](https://circleci.com/gh/Financial-Times/google-amp/tree/main.svg?style=svg)](https://circleci.com/gh/Financial-Times/google-amp/tree/main) [![Known Vulnerabilities](https://snyk.io/test/github/Financial-Times/google-amp/badge.svg)](https://snyk.io/test/github/Financial-Times/google-amp)\n\nAMP HTML rendering for FT articles\n\nGetting started\n---\n\n1. Install the project dependencies, `make install`\n2. Fetch the environment variables for the app, `make .env`\n3.\n    Generate a self-signed certificate:\n\n    ```\n    make certificate\n    ```\n\n    And add the certificate to your keychain:\n\n    ```\n    security import cert.pem; security add-trusted-cert cert.pem\n    ```\n4. Run the app (no build is required in development mode), `make run`\n5. Open `https://local.ft.com:5050/content/\u003cContent UUID\u003e`\n\nBarrier flow diagram\n---\nhttps://app.lucidchart.com/invitations/accept/97a58184-f4b9-4ebf-b253-17f62799e460\n\nTests\n---\n\nTo run the tests and linter locally, run `npm test`.\n\nA Day in the Life of an AMP Article\n---\n\n1. Google crawls FT.com and finds an article, `/content/ffffffff-ffff-ffff-ffff-ffffffffffff`\n2. The article has a `\u003clink rel=\"amphtml\"\u003e`, with href pointing to `amp.ft.com/content/ffffffff-ffff-ffff-ffff-ffffffffffff`\n3. The Google crawler fetches the AMP URL, which hits this service\n4. The [amp-page.js](server/controllers/amp-page.js) controller runs\n    1. It fetches the content from Elastic Search using [n-es-client](https://github.com/financial-times/n-es-client)\n    2. It runs various [transforms](server/lib/transforms) on the [article data](server/lib/transforms/article.js) and [body HTML](server/lib/transforms/body.js)\n    3. It renders the transformed data into the [template](views/article.html) and responds with it\n5. The crawler [validates](https://www.ampproject.org/docs/guides/validate) the returned markup, and if it's valid AMP markup, stores it in the AMP cache\n6. When a mobile user searches for something that returns articles from FT with AMP versions, they're preloaded, and if the user taps on one of those results the AMP page is displayed immediately.\n\nDeployment\n---\n\nThe `main` branch deploys automatically to prod once the tests are green. Pull requests deploy to review apps, look out for the `@username deployed to google-amp-prod-eu-pr-XXX` messages in the PR.\n\n### Rolling back\n\nUse the `Roll back to...` button on the Heroku activity tab or the `heroku releases:rollback` command.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFinancial-Times%2Fgoogle-amp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFinancial-Times%2Fgoogle-amp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFinancial-Times%2Fgoogle-amp/lists"}