{"id":19644334,"url":"https://github.com/ampproject/px-toolbox-php","last_synced_at":"2025-04-28T13:31:41.991Z","repository":{"id":41834632,"uuid":"394361618","full_name":"ampproject/px-toolbox-php","owner":"ampproject","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-05T20:05:10.000Z","size":963,"stargazers_count":8,"open_issues_count":10,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-05T09:11:15.238Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ampproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-09T16:20:04.000Z","updated_at":"2023-12-06T15:25:37.000Z","dependencies_parsed_at":"2023-02-04T14:00:35.959Z","dependency_job_id":null,"html_url":"https://github.com/ampproject/px-toolbox-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampproject%2Fpx-toolbox-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampproject%2Fpx-toolbox-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampproject%2Fpx-toolbox-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampproject%2Fpx-toolbox-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ampproject","download_url":"https://codeload.github.com/ampproject/px-toolbox-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251319757,"owners_count":21570451,"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","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":[],"created_at":"2024-11-11T14:26:49.839Z","updated_at":"2025-04-28T13:31:36.960Z","avatar_url":"https://github.com/ampproject.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ch3 align=\"center\"\u003ePage Experience Toolbox for PHP\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    Tooling to get the best possible page experience results out of your PHP-powered web properties.\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/ampproject/px-toolbox-php/tree/main/docs/README.md#readme\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/ampproject/px-toolbox-php/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/ampproject/px-toolbox-php/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n## About The Project\n\nThe Page Experience Toolbox for PHP regroups tooling and library code that enables you to maximize your page experience results for any PHP-powered web properties.\n\nCurrently included in the toolbox:\n\n* [**Page Experience Engine** - Higher-level library that aggregates and normalizes multiple tools to provide analysis and optimization functionality.](/docs/pxe/README.md#readme)\n* [**PageSpeed Insights API** - API wrapper for PHP to run audits through the Google PageSpeed Insights API.](/docs/psi/README.md#readme)\n* [**PX CLI tool** - `px` binary to run the above tooling through the console.](/docs/px/README.md#readme)\n\n```mermaid\n%%{init: {'theme': 'neutral'}}%%\ngraph\n    subgraph PXT[PX Toolbox]\n\n        PSI[\u003cstrong\u003ePageSpeed Insights API Client\u003c/strong\u003e\u003cbr\u003e\u003cbr\u003eAPI wrapper for PHP to run audits through\u003cbr\u003ethe Google PageSpeed Insights API]\n        PXE[\u003cstrong\u003ePage Experience Engine\u003c/strong\u003e\u003cbr\u003e\u003cbr\u003eHigher-level library that aggregates and\u003cbr\u003enormalizes multiple tools to provide\u003cbr\u003eanalysis and optimization functionality]\n        PX[\u003cstrong\u003ePX CLI Tool\u003c/strong\u003e\u003cbr\u003e\u003cbr\u003eConsole \u003ccode\u003epx\u003c/code\u003e binary to run the\u003cbr\u003ePX Toolbox tools through the CLI]\n\n        PX --provides CLI interface for--\u003e PSI\n        PX --provides CLI interface for--\u003e PXE\n        PSI --powers audits in--\u003e PXE\n    end\n\nclassDef package fill:#005af0,stroke:#002080,stroke-width:1px,color:#fff;\nclass PX,PXE,PSI package;\n\nclick PX \"https://github.com/ampproject/px-toolbox-php/tree/main/docs/px/README.md#readme\" \"Documentation for the PX CLI Tool\"\nclick PSI \"https://github.com/ampproject/px-toolbox-php/tree/main/docs/psi/README.md#readme\" \"Documentation for the PageSpeed Insights API Client\"\nclick PXE \"https://github.com/ampproject/px-toolbox-php/tree/main/docs/pxe/README.md#readme\" \"Documentation for the Page Experience Engine\"\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Getting Started\n\nThis is an example of how you may give instructions on setting up your project locally.\nTo get a local copy up and running follow these simple example steps.\n\n### Prerequisites\n\nThe following requirements need to be fulfilled by your PHP installation to make use of the toolbox:\n\n* PHP 5.6+\n* Active PHP extensions:\n   * `curl`\n   * `json`\n   * `zip`\n* Remote connectivity for API requests against the Google PageSpeed Insights API\n\n### Installation\n\nThe toolbox can be pulled into your project via Composer:\n\n```sh\ncomposer require ampproject/px-toolbox\n```\n\nIn case you're only interested in making use of the `px` binary without integrating the library code into an existing project, you can also install the toolbox as a global Composer package:\n\n```sh\ncomposer global require ampproject/px-toolbox\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Usage\n\nUse this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.\n\n_For more examples, please refer to the [Documentation](https://example.com)_\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Roadmap\n\nThe project is currently in its very early stages, with the main focus lying on making the main functionality work as expected.\n\nThe initial end-user integration this library is being coded against is the [PX Plugin for WordPress](https://github.com/ampproject/amp-wp).\n\n```mermaid\n%%{init: {'theme': 'neutral'}}%%\ngraph\n    subgraph pxwp[px-wp]\n        rest[REST API]\n        devtools[Developer Tools]\n\n        devtools -.-\u003e rest\n    end\n\n    subgraph pxtb[px-toolbox-php]\n        pxe[PX Engine]\n    end\n\n    subgraph amptb[amp-toolbox-php]\n        sanitizer[Sanitizer]\n        validator[Validator]\n        optimizer[Optimizer]\n        linter[Linter]\n        spec[AMP Spec]\n\n        sanitizer -.-\u003e spec\n        validator -.-\u003e spec\n        optimizer -.-\u003e spec\n    end\n\n    pxe -.-\u003e sanitizer\n    pxe -.-\u003e validator\n    pxe -.-\u003e optimizer\n    pxe -.-\u003e linter\n\n    rest -.-\u003e pxe\n    devtools -.-\u003e pxe\n\nclassDef cplugin fill:#33aa00,stroke:#002080,stroke-width:1px,color:#fff;\nclassDef cpx fill:#9955f0,stroke:#002080,stroke-width:1px,color:#fff;\nclassDef camp fill:#005af0,stroke:#002080,stroke-width:1px,color:#fff;\nclass rest,devtools cplugin;\nclass pxe,psi cpx;\nclass sanitizer,validator,optimizer,linter,spec camp;\n```\n\nThe roadmap will be further fleshed out as we approach the first feature-complete release. \n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Contributing\n\nPlease see [the CONTRIBUTING file](/CONTRIBUTING.md) for information on contributing to the Page Experience Toolbox for PHP.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## License\n\nThe PHP Page Experience Toolbox is licensed under the [Apache License, Version 2.0](/LICENSE).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fampproject%2Fpx-toolbox-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fampproject%2Fpx-toolbox-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fampproject%2Fpx-toolbox-php/lists"}