{"id":19250250,"url":"https://github.com/charcoalphp/app","last_synced_at":"2025-08-04T02:11:11.944Z","repository":{"id":37490373,"uuid":"505904940","full_name":"charcoalphp/app","owner":"charcoalphp","description":"[READ-ONLY] Slim-based application (modules, routes / controllers and middleware)","archived":false,"fork":false,"pushed_at":"2024-03-13T17:50:12.000Z","size":13714,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T07:02:39.821Z","etag":null,"topics":["app","application","charcoal","php","read-only-repository","slim"],"latest_commit_sha":null,"homepage":"https://github.com/charcoalphp/charcoal","language":"PHP","has_issues":false,"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/charcoalphp.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}},"created_at":"2022-06-21T15:40:49.000Z","updated_at":"2022-06-21T16:31:22.000Z","dependencies_parsed_at":"2023-01-20T21:19:20.111Z","dependency_job_id":null,"html_url":"https://github.com/charcoalphp/app","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charcoalphp","download_url":"https://codeload.github.com/charcoalphp/app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240342695,"owners_count":19786558,"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":["app","application","charcoal","php","read-only-repository","slim"],"created_at":"2024-11-09T18:16:37.672Z","updated_at":"2025-02-23T16:27:33.486Z","avatar_url":"https://github.com/charcoalphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Charcoal App\n============\n\nThe App package provides integration with [Slim] and [Pimple] for building user-facing Web applications and APIs.\n\n## Installation\n\n```shell\ncomposer require charcoal/app\n```\n\n## Overview\n\nThe App package is a collection of _modules_, _routes_ (`templates`, `actions` and `scripts`), _handlers_, and _services_ tied together with a _config_, a _service container_, and _service providers_.\n\nThe framework features (internally and externally) the following:\n\n* PSR-3 logger\n* PSR-6 cache system\u003csup\u003e[†]\u003c/sup\u003e\n* PSR-7 kernel (web, API, CLI)\n* PSR-11 container\n* Translation layer\u003csup\u003e[†]\u003c/sup\u003e\n* File system layer\n* Database layer\n* View layer\u003csup\u003e[†]\u003c/sup\u003e\n\nNotes:\n\n* \u003csup\u003e[†]\u003c/sup\u003e  Provided by external Charcoal components.\n\n### Components\n\nThe main components of the Charcoal App are:\n\n* [Config](docs/components.md#config-component)\n* [App](docs/components.md#app-compoment)\n* ~~[Module](docs/components.md#module-component)~~\n* [Routes \u0026 Request Controllers](docs/components.md#routes--request-controllers)\n  * [Action](docs/components.md#action-request-controller)\n  * [Script](docs/components.md#script-request-controller)\n  * [Template](docs/components.md#template-request-controller)\n  * [Route API](docs/components.md#route-api)\n* [Routable Objects](docs/components.md#routable-objects)\n* [Charcoal Binary](docs/components.md#charcoal-binary)\n* [PHPUnit Tests](docs/components.md#phpunit-tests)\n\nLearn more about [components](docs/components.md).\n\n### Service Providers\n\nDependencies and extensions are handled by a dependency container, using [Pimple][pimple], which can be defined via _service providers_ (`Pimple\\ServiceProviderInterface`).\n\n##### Included Providers\n\nThe Charcoal App comes with several providers out of the box. All of these are within the `Charcoal\\App\\ServiceProvider` namespace:\n\n* [`AppServiceProvider`](docs/providers.md#app-service-provider)\n* [`DatabaseServicePovider`](docs/providers.md#database-service-provider)\n* [`FilesystemServiceProvider`](docs/providers.md#filesystem-service-provider)\n* [`LoggerServiceProvider`](docs/providers.md#logger-service-provider)\n\n##### External Providers\n\nThe Charcoal App requires a few providers from independent components. The following use their own namespace and are automatically injected via the `AppServiceProvider`:\n\n* [`CacheServiceProvider`](docs/providers.md#cache-service-provider)\n* [`TranslatorServiceProvider`](docs/providers.md#translator-service-provider)\n* [`ViewServiceProvider`](docs/providers.md#view-service-provider)\n\nLearn more about [service providers](docs/providers.md).\n\n## Usage\n\nTypical front-controller ([`www/index.php`](www/index.php)):\n\n```php\nuse Charcoal\\App\\App;\nuse Charcoal\\App\\AppConfig;\nuse Charcoal\\App\\AppContainer;\n\ninclude '../vendor/autoload.php';\n\n$config = new AppConfig();\n$config-\u003eaddFile(__DIR__.'/../config/config.php');\n$config-\u003eset('ROOT', dirname(__DIR__) . '/');\n\n// Create container and configure it (with charcoal/config)\n$container = new AppContainer([\n    'settings' =\u003e [\n        'displayErrorDetails' =\u003e true,\n    ],\n    'config' =\u003e $config,\n]);\n\n// Charcoal / Slim is the main app\n$app = App::instance($container);\n$app-\u003erun();\n```\n\nFor a complete project example using `charcoal/app`, see the [charcoal/boilerplate](https://github.com/charcoalphp/boilerplate).\n\n## Resources\n\n* [Contributing](https://github.com/charcoalphp/.github/blob/main/CONTRIBUTING.md)\n* [Report issues](https://github.com/charcoalphp/charcoal/issues) and\n  [send pull requests](https://github.com/charcoalphp/charcoal/pulls)\n  in the [main Charcoal repository](https://github.com/charcoalphp/charcoal)\n\n[Pimple]: https://github.com/silexphp/Pimple\n[Slim]:   https://github.com/slimphp/Slim\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharcoalphp%2Fapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharcoalphp%2Fapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharcoalphp%2Fapp/lists"}