{"id":24016339,"url":"https://github.com/decodelabs/fabric","last_synced_at":"2025-04-15T14:07:39.268Z","repository":{"id":205899081,"uuid":"715315282","full_name":"decodelabs/fabric","owner":"decodelabs","description":"Lightweight PHP framework implementation using DecodeLabs libraries","archived":false,"fork":false,"pushed_at":"2025-04-14T08:47:13.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-15T14:07:25.026Z","etag":null,"topics":["framework","php"],"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/decodelabs.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}},"created_at":"2023-11-06T22:30:13.000Z","updated_at":"2025-04-14T08:47:17.000Z","dependencies_parsed_at":"2023-11-08T05:46:52.570Z","dependency_job_id":"d6360905-9c86-4886-aef8-8cdd2caa03aa","html_url":"https://github.com/decodelabs/fabric","commit_stats":null,"previous_names":["decodelabs/fabric"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodelabs%2Ffabric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodelabs%2Ffabric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodelabs%2Ffabric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decodelabs%2Ffabric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decodelabs","download_url":"https://codeload.github.com/decodelabs/fabric/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085438,"owners_count":21210267,"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":["framework","php"],"created_at":"2025-01-08T08:48:58.901Z","updated_at":"2025-04-15T14:07:39.262Z","avatar_url":"https://github.com/decodelabs.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fabric\n\n[![PHP from Packagist](https://img.shields.io/packagist/php-v/decodelabs/fabric?style=flat)](https://packagist.org/packages/decodelabs/fabric)\n[![Latest Version](https://img.shields.io/packagist/v/decodelabs/fabric.svg?style=flat)](https://packagist.org/packages/decodelabs/fabric)\n[![Total Downloads](https://img.shields.io/packagist/dt/decodelabs/fabric.svg?style=flat)](https://packagist.org/packages/decodelabs/fabric)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/decodelabs/fabric/integrate.yml?branch=develop)](https://github.com/decodelabs/fabric/actions/workflows/integrate.yml)\n[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-44CC11.svg?longCache=true\u0026style=flat)](https://github.com/phpstan/phpstan)\n[![License](https://img.shields.io/packagist/l/decodelabs/fabric?style=flat)](https://packagist.org/packages/decodelabs/fabric)\n\n### Lightweight PHP framework implementation using DecodeLabs ecosystem\n\nFabric provides the structures, prerequisites and conventions for building a web application using the DecodeLabs ecosystem.\n\n---\n\n## Installation\n\nInstall via Composer:\n\n```bash\ncomposer require decodelabs/fabric\n```\n\n## Usage\n\nA Fabric app looks very similar to a standard package with most code residing in the src folder, under a namespace of your choice and loaded via composer.\n\nIt does not require a custom entry point as it will automatically detect and load the app when the framework is initialised via the built in Bootstrap:\n\n```nginx\n# Example nginx config\nserver {\n    listen          443 ssl;\n    server_name     my-app.localtest.me;\n    root            /var/www/my-app/;\n\n    # Rewrite to fabric Bootstrap\n    rewrite         .* /vendor/decodelabs/fabric/src/Bootstrap.php last;\n\n    include         snippets/php81.conf;\n    include         snippets/ssl.conf;\n}\n```\n\n### Config\n\nFabric utilises \u003ccode\u003eDovetail\u003c/code\u003e for config loading - via a private .env file in the app root and data files in /config (though this can be customised if necessary).\n\nThe most important config file is the \u003ccode\u003eEnvironment.php\u003c/code\u003e file which defines some key values for the rest of the app to initialize with.\n\nThe _appNamespace_ value will allow you to define the namespace in which the majority of your app code will reside, and which is already defined for loading in your composer file.\n\n### App file\n\nThe App file is the main entry point for your app and is where you can override default behaviour in key areas of your app. If one is not defined, a default will be used.\n\nWhile in early development, the interface for this class will change a lot, however default implementations will be provided in the Generic instance of the interface to ensure backwards compatibility.\n\nThe App instance can be recalled using the Fabric Veneer frontage:\n\n```php\nuse DecodeLabs\\Fabric;\n\n$app = Fabric::getApp();\n```\n\n### Structure\n\nFabric provides solid HTTP and CLI kernels that can handle requests in both contexts. \u003ccode\u003eClip\u003c/code\u003e is used for CLI tasks, and \u003ccode\u003eHarvest\u003c/code\u003e for HTTP.\n\nThe HTTP kernel uses an extensible set of Middlewares to provide a flexible request handling pipeline. The default implementation is provided by \u003ccode\u003eHarvest\u003c/code\u003e and is a good starting point for most apps.\n\nGreenleaf is used for routing and provides a simple, flexible and powerful routing system for HTTP Actions.\n\n## Licensing\n\nFabric is licensed under the MIT License. See [LICENSE](./LICENSE) for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecodelabs%2Ffabric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecodelabs%2Ffabric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecodelabs%2Ffabric/lists"}