{"id":51118862,"url":"https://github.com/detain/phlix-shared","last_synced_at":"2026-06-25T00:30:24.192Z","repository":{"id":358402801,"uuid":"1241088777","full_name":"detain/phlix-shared","owner":"detain","description":"Shared interfaces, DTOs, event names, and protocol types used by both phlix-server and phlix-hub. Composer-installable, PHP 8.3+, zero I/O.","archived":false,"fork":false,"pushed_at":"2026-06-21T01:24:12.000Z","size":129,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-21T03:12:37.492Z","etag":null,"topics":["composer-package","dto","event-dispatcher","interfaces","jwt","library","media-server","oauth2","oidc","php","php8","plugin-api","psr-11","psr-14","psr-7","sdk","shared-library","strict-types","typed-php"],"latest_commit_sha":null,"homepage":"https://phlex.media","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/detain.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-17T00:12:49.000Z","updated_at":"2026-06-21T01:24:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/detain/phlix-shared","commit_stats":null,"previous_names":["detain/phlex-shared","detain/phlix-shared"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/detain/phlix-shared","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detain%2Fphlix-shared","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detain%2Fphlix-shared/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detain%2Fphlix-shared/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detain%2Fphlix-shared/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/detain","download_url":"https://codeload.github.com/detain/phlix-shared/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detain%2Fphlix-shared/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34755061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"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":["composer-package","dto","event-dispatcher","interfaces","jwt","library","media-server","oauth2","oidc","php","php8","plugin-api","psr-11","psr-14","psr-7","sdk","shared-library","strict-types","typed-php"],"created_at":"2026-06-25T00:30:23.641Z","updated_at":"2026-06-25T00:30:24.173Z","avatar_url":"https://github.com/detain.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# detain/phlix-shared\n\n[![CI](https://github.com/detain/phlix-shared/actions/workflows/ci.yml/badge.svg)](https://github.com/detain/phlix-shared/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/detain/phlix-shared/graph/badge.svg)](https://codecov.io/gh/detain/phlix-shared)\n[![PHP](https://img.shields.io/badge/PHP-8.3%2B-777bb4?logo=php\u0026logoColor=white)](https://www.php.net/)\n[![PHPStan](https://img.shields.io/badge/PHPStan-level%209-brightgreen)](https://phpstan.org/)\n[![Psalm](https://img.shields.io/badge/Psalm-level%201-brightgreen)](https://psalm.dev/)\n[![Code style](https://img.shields.io/badge/code%20style-PSR--12-blueviolet)](https://www.php-fig.org/psr/psr-12/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nShared interfaces, DTOs, event names, and protocol types used by both\n[`detain/phlix-server`](https://github.com/detain/phlix-server) (the media server)\nand [`detain/phlix-hub`](https://github.com/detain/phlix-hub) (the multi-server hub).\nComposer-installable, PHP 8.3+, zero I/O — pure interfaces and value objects only.\n\n## Status\n\n**v0.10.0 — adds the HTTP-over-relay protocol types (`HTTP_REQUEST`/`HTTP_RESPONSE` frames + request/response envelopes + chunk codec) so the hub can proxy a browser's HTTP request to a paired media server over the reverse tunnel.** Cumulative surface:\n\n- `Phlix\\Shared\\Plugin\\{LifecycleInterface, Manifest, ManifestType, ManifestValidationError, EventNameMap}`\n- `Phlix\\Shared\\Events\\{AbstractEvent, Playback\\*, Library\\*, Auth\\*}` — 12 event DTOs.\n- `Phlix\\Shared\\Auth\\{JwtClaims, ProviderInterface, AuthResult, UserInfo}`\n- `Phlix\\Shared\\Hub\\{ClaimRequest, ClaimResponse, ServerInfoDto, HeartbeatDto}`\n- `Phlix\\Shared\\Relay\\{RelayFrameType, RelayWireCodecInterface, RelayFrame}` — channel-mux protocol (0.5+);\n  plus `{RelayHttpRequest, RelayHttpResponseHead, RelayHttpResponseChunk, RelayHttpResponseCodec}` —\n  HTTP-over-relay request/response envelopes + `HEAD→BODY*→END` chunk framing (0.10.0+).\n- `Phlix\\Shared\\Arr\\{BazarrClient, ProwlarrClient, RadarrClient, SonarrClient}` — *arr HTTP clients.\n- `Phlix\\Shared\\Schema\\SchemaPaths` — pure path resolver for the bundled `schemas/` files (0.7.0+).\n\n### Bundled schemas\n\nThe package ships the canonical JSON files used by both phlix-server and the\nadmin SPA under `schemas/` (resolve their absolute paths via\n`Phlix\\Shared\\Schema\\SchemaPaths`):\n\n- `schemas/manifest.schema.json` — JSON Schema (draft 2020-12) for plugin manifests,\n  loaded at runtime by `phlix-server`'s `Phlix\\Plugins\\Manifest\\ManifestSchema` validator (0.6.0+).\n  Per-setting `label` and `description` are permitted, and `integer`/`boolean` are accepted as\n  aliases of `int`/`bool` in the setting `type` enum (0.9.1+).\n- `schemas/server-settings.schema.json` — JSON Schema (draft 2020-12) for the editable\n  server settings (`/api/v1/admin/settings`); mirrors phlix-server's\n  `AdminSettingsController::ALLOWED_KEYS` allow-list and drives the admin SPA settings form (0.7.0+).\n- `schemas/webhook-events.json` — data catalog of the supported webhook event types for the\n  admin SPA webhook picker. Distinct from the plugin PSR-14 events in `EventNameMap` (0.7.0+).\n- `schemas/library-query.schema.json` — JSON Schema (draft 2020-12) for the query parameters of\n  the movie-list browse API (`GET /api/v1/media`); drives `ItemRepository::query()` and the\n  admin SPA browse page (0.8.0+). Adds the `libraryId`/`parentId`/`topLevel` scoping parameters\n  for series→season→episode navigation (0.9.0+).\n- `schemas/media-item.schema.json` — JSON Schema (draft 2020-12) for a single media item returned\n  by the browse API; flattens `metadata_json` into stable top-level fields and always includes\n  `poster_url` (0.8.0+). The `type` enum gains `season` alongside `parent_id`, `season_number`,\n  `episode_number`, and `episode_title` for the series hierarchy (0.9.0+).\n\nThe PSR-14 dispatcher wiring (Tukio) and the schema validators stay in\n`phlix-server` and consume this package via Composer.\n\n## Requirements\n\n- PHP `^8.3`\n- Composer 2.x\n- `psr/container ^2.0`\n- `psr/event-dispatcher ^1.0`\n\nThe package has zero framework dependencies — no Workerman, no Monolog,\nno Smarty. It is intended to be safely required by any PHP 8.3+ codebase.\n\n## Installation\n\nUntil `detain/phlix-shared` is published to Packagist (planned post-v1.0),\nconsumers require it via a Composer VCS repository entry. Use the HTTPS URL\nso CI runners without SSH keys can resolve it:\n\n```json\n{\n    \"repositories\": [\n        {\n            \"type\": \"vcs\",\n            \"url\": \"https://github.com/detain/phlix-shared.git\"\n        }\n    ],\n    \"require\": {\n        \"detain/phlix-shared\": \"^0.6\"\n    }\n}\n```\n\nThen:\n\n```bash\ncomposer update detain/phlix-shared\n```\n\n## Related repositories\n\n- [`detain/phlix-server`](https://github.com/detain/phlix-server) — the Phlix media server (consumes this package).\n- [`detain/phlix-hub`](https://github.com/detain/phlix-hub) — the multi-server hub + reverse-tunnel relay.\n\n## Development\n\n```bash\ncomposer install\n./vendor/bin/phpunit\n./vendor/bin/phpstan analyze --no-progress\n./vendor/bin/phpcs --standard=PSR12 src/\n./vendor/bin/psalm --no-progress\ncomposer validate --strict\ncomposer audit --no-dev\n```\n\n## License\n\nMIT — see [`LICENSE`](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdetain%2Fphlix-shared","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdetain%2Fphlix-shared","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdetain%2Fphlix-shared/lists"}