{"id":18285511,"url":"https://github.com/bemit/satellite-app","last_synced_at":"2025-04-05T07:32:24.011Z","repository":{"id":57032778,"uuid":"222789086","full_name":"bemit/satellite-app","owner":"bemit","description":"Easy to use Event \u0026 Middleware Framework, powered by popular micro-libraries and based on PSRs.","archived":false,"fork":false,"pushed_at":"2023-04-21T20:46:34.000Z","size":615,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T00:33:04.336Z","etag":null,"topics":["middleware-framework","php","php-framework"],"latest_commit_sha":null,"homepage":"","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/bemit.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2019-11-19T21:02:19.000Z","updated_at":"2024-11-02T11:49:44.000Z","dependencies_parsed_at":"2024-11-10T02:02:49.674Z","dependency_job_id":null,"html_url":"https://github.com/bemit/satellite-app","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":"0.027027027027026973","last_synced_commit":"04b07177be6664bd5c54aa28c7c686924d436aca"},"previous_names":[],"tags_count":7,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bemit","download_url":"https://codeload.github.com/bemit/satellite-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305879,"owners_count":20917201,"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":["middleware-framework","php","php-framework"],"created_at":"2024-11-05T13:16:53.391Z","updated_at":"2025-04-05T07:32:19.000Z","avatar_url":"https://github.com/bemit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Orbiter\\Satellite\n\n```lang-none\n\n\n                       🌐\n                     🛰️\n                   ·          \n                · \n     🛰️🛰️️   ·\n    🛰️🌐🛰️   ·  ·  · 🛰️🌐\n     🛰️🛰️️\n\n \n```\n\nEasy to use Event \u0026 Middleware Framework, powered by popular micro-libraries and based on [PSRs](https://www.php-fig.org/psr/).\n\n- [Setup](#setup)\n    - [Config](#config)\n- [Implemented PSRs](#psrs)\n- [Packages](#packages)\n- [Download Build](#download-build)\n- [License](#license)\n\nSupports PHP 8.1+ and [composer](https://getcomposer.org/)\n\n## TL;DR\n\nQuick-Jump into develop:\n\n```bash\ncomposer create-project orbiter/satellite-app ./satellite\n\ncd ./satellite\n\n# create `.env` file, \n# add for local-dev: `env=local`\ntouch .env \n\n# start PHP Dev Server\ncd web \u0026\u0026 php -S localhost:3333 ./index.php display_errors=0\n\n# or point the Apache Root to `/web/`\n# or point the NGINX entry to `/web/index.php`\n# or use Docker: `docker-compose up`\n```\n\nOpen your browser on: http://localhost:3333\n\nLook into files:\n\n- [`config`](./config) folder with [app config and wiring](#config)\n- [`assemble.php`](./assemble.php) composer autoload, gathers configurations and creates the system modules from that config\n- [`launch.php`](./launch.php) runs `assemble()` and dispatches the `SatelliteApp` event\n- [`app`](./app) folder with a basic commands and route handler structure\n\n## Setup\n\nInstall app skeleton and dependencies with composer in folder `satellite`:\n\n```bash\n# with composer installed on machine:\ncomposer create-project orbiter/satellite-app satellite\n\n# with composer and docker on windows:\ndocker run -it --rm -v %cd%/satellite:/app composer create-project orbiter/satellite-app .\ndocker run -it --rm -v %cd%/satellite:/app composer create-project --stability=dev orbiter/satellite-app:dev-master .\n\n# with composer and docker on unix:\ndocker run -it --rm -v `pwd`/satellite:/app composer create-project orbiter/satellite-app .\ndocker run -it --rm -v `pwd`/satellite:/app composer create-project --stability=dev orbiter/satellite-app:dev-master .\n\n# go into project folder:\ncd ./satellite\n```\n\nRun with:\n\n- [Linux, PHP Dev Server](#linux-php-dev-server)\n- [PHP Command-Line](#php-command-line)\n- [Docker, docker-compose](#docker-docker-compose)\n- [Web-Server](#web-server)\n\n### Linux, PHP Dev Server\n\nSetup correct user rights, then start and open http://localhost:3333\n\n```bash \nchmod +x start.sh\n\n./start.sh\n```\n\n### PHP Command-Line\n\nExecute defined commands.\n\n```bash \nphp cli \u003ccommand\u003e \u003c..attr\u003e \u003c..b\u003e\n```\n\n### Docker, docker-compose\n\nIncludes configurable PHP Dockerfile with:\n\n- PHP 8.1\n    - with FPM and a few extensions\n    - reusing FPM for a clean CLI worker image\n- OPCache\n- PostgreSQL Client libs (using `pdo`)\n- NGINX base image for local routing\n- customize in [Dockerfile](Dockerfile)\n- a more \"production\" ready image, preconfigured for building [in CI](.github/workflows/blank.yml) with [docker-compose--prod.yml](docker-compose--prod.yml)\n\nFor docker image configs see files in [`_docker`](./_docker) and [`_nginx`](./_nginx).\n\nStart containers specified in [`docker-compose.yml`](./docker-compose.yml), then open: [http://localhost:3333](http://localhost:3333)\n\n```bash\ndocker-compose up\n\n# open shell in app container\ndocker-compose exec app sh\n\n# run command in temporary worker container\ndocker-compose run --rm worker php cli demo\n\n# run extra composer container on windows:\ndocker run -it --rm -v %cd%:/app composer dumpautoload\n# run extra composer container on unix:\ndocker run -it --rm -v `pwd`:/app composer dumpautoload\n\n# run tests with temporary `app` container:\ndocker-compose run -T --rm app sh -c \"cd /var/www/html \u0026\u0026 ./vendor/bin/phpunit --testdox tests\"\n\n# running tests with a temporary `phpunit` in a prebuild container:\ndocker run -i --rm bemiteu/satellite-app:master sh -c \"cd /var/www \u0026\u0026 wget -O phpunit https://phar.phpunit.de/phpunit-9.phar \u0026\u0026 chmod +x phpunit \u0026\u0026 cd html \u0026\u0026 /var/www/phpunit --testdox tests\"\n```\n\n### Web-Server\n\nOn a web-server the `web/index.php` file serves as public entry point.\n\n**Apache:** point server/vhost root to `/web` and use the included `.htaccess`\n\n**NGINX**: example files in [_nginx](./_nginx).\n\n## Config\n\nUse e.g. `.env` to add configuration.\n\nDefault's config includes:\n\n- env var `env`: if in production or not in production\n    - with value `prod` it is assumed in the App (not the framework) that it is in production\n    - use `$_ENV['env'] === 'prod'` to check for production\n    - for dev-error pages: add var `dev.editor` with one value of `PrettyPageHandler::EDITOR_*` to link `whoops` \"open file\" with IDE\n- `/config/config.php` - main config\n    - configures which other config files are included\n    - aggregates and caches the config for production usage\n- `/config/dependencies.php` - definitions for PHP-DI\n- `/config/events.php` - define app components flow\n- `/config/pipeline.php` - setup PSR middlewares and pipeline\n\n## PSRs\n\nThis app serves as mini-framework, with PSR powered libraries, ready-to-use Annotations and not much more.\n\nIt is build upon [PSRs](https://www.php-fig.org/psr/) and popular, specialized packages implementing them or other great stuff.\n\n- **PSR-3** - Logger\n    - 📦 `monolog/monolog`\n    - [more implementations](https://packagist.org/providers/psr/log-implementation)\n- **PSR-4** - autoload classes and forget `require_once`\n    - handled by composer, more in [composer docs.](https://getcomposer.org/doc/01-basic-usage.md#autoloading)\n- **PSR-1,12** - Code Style Guides\n    - except brackets location rule: same-line instead of next-line for opening `{`\n- **PSR-6** - Cache\n    - 📦 `cache/filesystem-adapter`\n    - includes [`FilesystemCachePoolNormalized`](./app/Lib/FilesystemCachePoolNormalized.php) for `Doctrine\\Common\\Annotations\\PsrCachedReader` compatibility\n    - [more implementations](https://packagist.org/providers/psr/cache-implementation)\n- **PSR-7** - HTTP Message\n    - 📦 `nyholm\\psr7`\n    - request and response data definitions\n    - used further by `PSR-15`, `PSR-17` and `PSR-18`\n- **PSR-11** - Container for InterOp\n    - 📦 `php-di/php-di`\n    - service container for ease and modularity\n    - dependency injection with `@Annotations`, `@var` PHPDoc and Reflection support\n- **PSR-14** - Event Dispatcher and Listener\n    - 📦 `orbiter/satellite`\n    - as the core of how things are put together\n- **PSR-15** - HTTP Handlers\n    - 📦 `orbiter/satellite-response`\n    - handle route requests with a powerful middleware pipeline\n- **PSR-16** - Simple Cache\n    - 📦 `cache/filesystem-adapter`\n    - [more implementations](https://packagist.org/providers/psr/simple-cache-implementation)\n- **PSR-17** - HTTP Factories\n    - 📦 `nyholm\\psr7`\n    - context about request\n    - for request \u0026 response initiations\n- **PSR-18** - HTTP Client\n    - 📦 `guzzlehttp/guzzle`\n    - send requests to other APIs\n    - [more implementations](https://packagist.org/providers/psr/http-client-implementation)\n\n\u003e 📦 = included in `satellite-app` template\n\n## Packages\n\n- `orbiter/satellite` [![Latest Stable Version](https://poser.pugx.org/orbiter/satellite/version.svg?style=flat-square)](https://packagist.org/packages/orbiter/satellite)\n    - implements **PSR-14** Event Dispatcher and Listener\n    - with invoker to execute anything, **PSR-11** compatible\n    - optional event-handler based profiling\n    - see [package repository](https://github.com/bemit/satellite)\n- `orbiter/satellite-console` [![Latest Stable Version](https://poser.pugx.org/orbiter/satellite-console/version.svg?style=flat-square)](https://packagist.org/packages/orbiter/satellite-console)\n    - console execution\n    - console command annotations\n    - uses [getopt-php](https://github.com/getopt-php/getopt-php)\n    - see [package repository](https://github.com/bemit/satellite-console)\n- `orbiter/satellite-response` [![Latest Stable Version](https://poser.pugx.org/orbiter/satellite-response/version.svg?style=flat-square)](https://packagist.org/packages/orbiter/satellite-response)\n    - middleware pipe execution\n    - implements **PSR-15** through `equip/dispatch`, **PSR-11** compliant\n    - implements **PSR-7,17** through `nyholm/psr7` and `nyholm/psr7-server`\n    - with simple emitter by `narrowspark/http-emitter`\n    - see [package repository](https://github.com/bemit/satellite-response)\n- `orbiter/satellite-route` [![Latest Stable Version](https://poser.pugx.org/orbiter/satellite-route/version.svg?style=flat-square)](https://packagist.org/packages/orbiter/satellite-route)\n    - routes by annotations\n    - uses [nikic/fast-route](https://github.com/nikic/FastRoute) as router\n    - made for PSR middleware usage, but not limited\n    - see [package repository](https://github.com/bemit/satellite-route)\n- `orbiter/annotations-util` [![Latest Stable Version](https://poser.pugx.org/orbiter/annotations-util/version.svg?style=flat-square)](https://packagist.org/packages/orbiter/annotations-util)\n    - annotations by `doctrine/annotations` with cached reflections\n    - get classes, methods and properties which are annotated\n    - see [AnnotationsUtil](https://github.com/bemit/orbiter-annotations-util)\n- `orbiter/satellite-whoops` [![Latest Stable Version](https://poser.pugx.org/orbiter/satellite-whoops/version.svg?style=flat-square)](https://packagist.org/packages/orbiter/satellite-whoops)\n    - Whoops error display for CLI and Routes\n    - only when `$_ENV['env']` not `prod` (configurable in [`assemble.php`](./assemble.php))\n- `orbiter/satellite-config` [![Latest Stable Version](https://poser.pugx.org/orbiter/satellite-config/version.svg?style=flat-square)](https://packagist.org/packages/orbiter/satellite-config)\n    - simple config aggregator with caching\n    - see [package repository](https://github.com/bemit/satellite-config)\n- `orbiter/satellite-launch` [![Latest Stable Version](https://poser.pugx.org/orbiter/satellite-launch/version.svg?style=flat-square)](https://packagist.org/packages/orbiter/satellite-launch)\n    - `SatelliteApp` event data objects\n    - see [package repository](https://github.com/bemit/satellite-launch)\n- `orbiter/satellite-system` [![Latest Stable Version](https://poser.pugx.org/orbiter/satellite-system/version.svg?style=flat-square)](https://packagist.org/packages/orbiter/satellite-system)\n    - system setup and core wire-up, e.g. from `$config` to a cached PSR container\n    - see [package repository](https://github.com/bemit/satellite-system)\n\nA lot of work for APIs is done by PSR-15 HTTP Middleware, find more [awesome middlewares](https://github.com/middlewares/awesome-psr15-middlewares).\n\n## Download Build\n\nThere is no downloadable version - see [Setup](#setup) on how to install with composer.\n\nWe use composer as package manager, like in any modern PHP project.\n\nFeel free to reach out for a [training request](https://bemit.codes).\n\n## License\n\nThis project is free software distributed under the [**MIT License**](LICENSE).\n\n### Contributors\n\nBy committing your code to the code repository you agree to release the code under the MIT License attached to the repository.\n\n***\n\nMaintained by [Michael Becker](https://i-am-digital.eu)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemit%2Fsatellite-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbemit%2Fsatellite-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemit%2Fsatellite-app/lists"}