{"id":19250265,"url":"https://github.com/charcoalphp/boilerplate","last_synced_at":"2025-10-09T04:34:42.073Z","repository":{"id":38025112,"uuid":"506404001","full_name":"charcoalphp/boilerplate","owner":"charcoalphp","description":"A skeleton to get started with Charcoal.","archived":false,"fork":false,"pushed_at":"2025-07-30T18:42:15.000Z","size":13795,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-30T21:12:01.139Z","etag":null,"topics":["boilerplate","charcoal","cms","php","skeleton"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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}},"created_at":"2022-06-22T20:58:03.000Z","updated_at":"2025-05-06T20:07:04.000Z","dependencies_parsed_at":"2023-12-19T01:26:42.690Z","dependency_job_id":"6c73fe76-b609-4189-8e84-c8dee2217d5b","html_url":"https://github.com/charcoalphp/boilerplate","commit_stats":{"total_commits":223,"total_committers":16,"mean_commits":13.9375,"dds":0.641255605381166,"last_synced_commit":"cb6801b49d871fb728929ff58fcd073b1362ed2c"},"previous_names":[],"tags_count":20,"template":true,"template_full_name":null,"purl":"pkg:github/charcoalphp/boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fboilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fboilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fboilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fboilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charcoalphp","download_url":"https://codeload.github.com/charcoalphp/boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fboilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000701,"owners_count":26082921,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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":["boilerplate","charcoal","cms","php","skeleton"],"created_at":"2024-11-09T18:16:40.499Z","updated_at":"2025-10-09T04:34:42.042Z","avatar_url":"https://github.com/charcoalphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Charcoal Project Boilerplate\n\nA skeleton for creating Web sites with [Charcoal][charcoal/charcoal].\n\nSee below for an [overview](#overview) of this skeleton's structure and objectives.\n\n## Installation\n\nThis skeleton is available on [Packagist][charcoal/boilerplate] and can be\ninstalled using [Composer]:\n\n```shell\ncomposer create-project charcoal/boilerplate example-project\n```\n\nAfter the skeleton is installed, point the document root of your Web server\nto the [`example-project/www`](www) directory.\n\nBy default, the skeleton includes an Apache [`.htaccess`](www/.htaccess) file.\nSee below for examples on [configuring your Web server](#server-configuration).\n\nFrom the command line, PHP provides a [built-in Web server][PHP-CLI/webserver]\nfor quickly serving your project:\n\n```shell\ncd www\nphp -S localhost:8080\n```\n\nVisit `http://localhost:8080` in your browser to see the following:\n\n\u003cdetails\u003e\n\u003csummary\u003eExample: Skeleton's default index page\u003c/summary\u003e\n\n![Screen capture of the skeleton's unstyled index page](docs/images/boilerplate-home.png)\n\n\u003c/details\u003e\n\n## Update\n\nThe skeleton does not provide any process for automated upgrades.\nYou will have to port any updates manually.\n\nThis is because the skeleton is a starting point for your project and its\nvarious files are mainly present for demonstration and would otherwise be\nremoved or modified for your purposes.\n\n## Application Configuration\n\nCreate a copy of the [`config/config.sample.json`](config/config.sample.json)\nfile and name it `config/config.local.json`. This is your environment specific\nconfiguration file and it should be excluded from your project's source control\nrepository. Edit this file to configure services such as the database,\nthird-party services, logs, and caches.\n\nAny other options relevant to your project should be changed in all other\nfiles in the [`config`](config) directory.\n\n### Database Configuration\n\nIf your project does not require any database storage, use a database in-memory\nsuch as [SQLite] by adding the following to the `config/config.local.json` file:\n\n```json\n{\n    \"databases\": {\n        \"default\": {\n            \"type\": \"sqlite\",\n            \"database\": \":memory:\"\n        }\n    },\n    \"default_database\": \"default\"\n}\n```\n\nIf your project uses MySQL, create an empty database and ensure a SQL user\nhas the proper permissions for this database. Then add the following to the\n`config/config.local.json` file:\n\n```json\n{\n    \"databases\": {\n        \"default\": {\n            \"type\": \"mysql\",\n            \"hostname\": \"127.0.0.1\",\n            \"database\": \"foobar\",\n            \"username\": \"foo_bar\",\n            \"password\": \"l337\"\n        }\n    },\n    \"default_database\": \"default\"\n}\n```\n\n### Project Name\n\nBy default, the skeleton uses \"Acme\" as a dummy name. There are a few occurrences\nthroughout the repository that should be changed to reflect your project:\n\n* [`config/admin.json`](config/admin.json): See `admin.title`.\n* [`config/config.json`](config/config.json): See `project_name` and `cache.prefix`.\n\nYou should also change the details of the Composer dependency manifest:\n\n* [`composer.json`](composer.json): See `name`.\n\n### Administration Dashboard\n\nA quick-and-dirty command line script is provided to install the assets\nfor the administration area:\n\n```shell\n./build/scripts/install-charcoal-admin.sh\n```\n\nAfterwards, visit `http://localhost:8080/admin/login` in your browser to see\nthe following:\n\n\u003cdetails\u003e\n\u003csummary\u003eExample: Charcoal's administration login page\u003c/summary\u003e\n\n![Screen capture of Charcoal's administration login page](docs/images/admin-login.png)\n\n\u003c/details\u003e\n\nThe administration area can be customized from the\n[`config/admin.json`](config/admin.json) file.\n\n### Install Locomotive Boilerplate\n\nOptionally, another quick-and-dirty script is provided to install the Locomotive's\n[front-end development tools][locomotive/boilerplate]:\n\n```shell\n./build/scripts/install-locomotive-boilerplate.sh\n```\n\nFor more information, visit Locomotive's [Boilerplate repository][locomotive/boilerplate].\n\n## Server Requirements\n\n* [PHP] \u003e= 7.4\n* PHP Extensions:\n  * [JSON](https://www.php.net/manual/en/book.json.php)\n  * [MBString](https://www.php.net/manual/en/book.mbstring.php)\n  * [PDO](https://www.php.net/manual/en/book.pdo.php)\n  * [SPL](https://www.php.net/manual/en/book.spl.php)\n\n## Server Configuration\n\n### Apache Configuration\n\nUse the following configuration as a starting point for configuring\nthe [Apache HTTP server](https://httpd.apache.org/). Note that this\nshould be used instead of the skeleton's `.htaccess` file.\n\n\u003e Note that you should replace `path/to/example-project/www` with the actual\n\u003e path for `example-project/www`.\n\n\u003cdetails\u003e\n\u003csummary\u003eExample: Apache configuration\u003c/summary\u003e\n\n```apache\n# Set document root to be \"example-project/www\"\nDocumentRoot \"path/to/example-project/www\"\n\n\u003cDirectory \"path/to/example-project/www\"\u003e\n    \u003cIfModule mod_rewrite.c\u003e\n        RewriteEngine on\n\n        # If a directory or a file does not exist,\n        # forward the request to the application controller\n        RewriteCond %{REQUEST_FILENAME} !-d\n        RewriteCond %{REQUEST_FILENAME} !-f\n        RewriteRule ^ index.php\n    \u003c/IfModule\u003e\n\u003c/Directory\u003e\n```\n\n\u003c/details\u003e\n\n### Nginx Configuration\n\nUse the following configuration as a starting point for configuring\nthe [Nginx HTTP server](https://nginx.org/).\n\n\u003e Note that you should replace `path/to/example-project/www` with the actual\n\u003e path for `example-project/www`.\n\n\u003cdetails\u003e\n\u003csummary\u003eExample: Nginx configuration\u003c/summary\u003e\n\n```nginx\nserver {\n    listen 80;\n    listen [::]:80;\n\n    server_name example-project.test;\n    root        /path/to/example-project/www;\n    access_log  /path/to/example-project/logs/access.log;\n    error_log   /path/to/example-project/logs/error.log;\n\n    index index.php;\n\n    charset utf-8;\n\n    location / {\n        # Redirect everything that isn't a real file to index.php\n        try_files $uri $uri/ /index.php$is_args$args;\n    }\n\n    location = /favicon.ico {\n        access_log off;\n        log_not_found off;\n    }\n\n    location = /robots.txt  {\n        access_log off;\n        log_not_found off;\n    }\n \n    error_page 404 /index.php;\n\n    location ~ \\.php$ {\n        fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;\n        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;\n        include fastcgi_params;\n    }\n\n    location ~* /\\. {\n        deny all;\n    }\n}\n```\n\n\u003c/details\u003e\n\n## Development\n\n### Linting\n\nBy default, the skeleton is developed with a number of coding style and\nstatic code analysis tools:\n\n* [EditorConfig] — Maintain consistent coding styles between different editors.\n* [JSON Lint][seld/jsonlint] — JSON coding style linter.\n* [PHP Syntax Check][PHP-CLI/options] — PHP syntax checker from the command line.\n* [PHP_CodeSniffer] (PHPCS) — PHP coding style linter.\n* [PHPStan] — Static PHP code analyser.\n* [Psalm] — Static PHP code analyser.\n\nPHPStan and Psalm are used together to take advantage of each one's specialties.\n\nLinting can be executing by running one of the following commands:\n\n```shell\n# Run JSON Lint, PHP Lint, PHPCS, PHPStan, and Psalm\ncomposer lint\n\n# Run only JSON Lint\ncomposer lint:json\n./vendor/bin/jsonlint config/*.json\n\n# Run only PHP syntax check\ncomposer lint:php\nphp -l src/*.php\n\n# Run only PHPCS\ncomposer lint:phpcs\n./vendor/bin/phpcs -ps --colors src/\n\n# Run only PHPStan\ncomposer lint:phpstan\n./vendor/bin/phpstan analyse\n\n# Run only Psalm\ncomposer lint:psalm\n./vendor/bin/psalm\n```\n\nMost of these tools can be configured from the following files:\n\n* _EditorConfig_ — The [`.editorconfig`](.editorconfig) file.\n* _PHP_CodeSniffer_ — The [`phpcs.xml.dist`](phpcs.xml.dist) file\n  or a `phpcs.xml` file.\n* _PHPStan_ — The [`phpstan.neon.dist`](phpstan.neon.dist) file\n  or a local `phpstan.neon` file.\n* _Psalm_ — The [`psalm.xml.dist`](psalm.xml.dist) file\n  or a local `psalm.xml` file.\n\n### Testing\n\nBy default, PHP tests are located in the [`tests`](tests) directory and developed\nwith the [PHPUnit] framework.\n\nTests can be executing by running one of the following commands:\n\n```shell\ncomposer test\ncomposer test:phpunit\n./vendor/bin/phpunit\n```\n\nPHPUnit can be configured from the [`phpunit.xml.dist`](phpunit.xml.dist)\nor a local `phpunit.xml` file.\n\n## Optimization\n\n### Locked Dependencies\n\nYour project's dependencies can be installed considerably faster when you\ninclude the `composer.lock` file in your project's source control repository.\nComposer automatically generates and keeps this file up to date.\n\n### Autoloader Optimization\n\nWhen deploying to production, ensure that you are optimizing Composer's class\nautoloader map so Composer can rapidly find the corresponding file for a given\nPHP class:\n\n```shell\ncomposer install --optimize-autoloader --no-dev\n```\n\n## Contributing\n\nWe appreciate any contribution to the skeleton and Charcoal, whether it's a bug,\ntypo, suggestions, or improvements.\n\n## Overview\n\nAlthough it is ready to use, this skeleton is still incomplete.\n\nIt does not _yet_ showcase all of the features of the Charcoal framework and\ntherefore requires a lot of manual tinkering for options.\n\nThe following is a short \"mission statement\" of what is expected to be\naccomplished with this skeleton:\n\n* A fully automated setup process.\n    * Optional installation of [Locomotive Boilerplate][locomotive/boilerplate]\n      for rapid front-end integration.\n* Support for unilingual and multilingual applications.\n    * Default data provided in English and French.\n    * Easy internationalization (i18n) and localization (l10n).\n* Support for Mustache and Twig templating.\n    * Home page, with a few options and widgets (like carousel) or similar.\n    * News list / news details, with attachment support.\n    * Calendar (event list) with ajax options / event details, with attachment support.\n    * Blog / article details, with attachment support and options to enable comments, and ajax actions\n    * Contact, with a contact form that saves to a database and send a confirmation email depending to category options, with ajax actions.\n    * Map, with locations by categories.\n* A working administration dashboard.\n    * User management.\n    * With a default configuration that allows to manage CMS objects (sections, news, events, blogs, locations, etc.)\n    * Permission system working and enabled.\n    * Notification system working and enabled.\n    * Revisioning system working and enabled.\n    * Media library working and enabled.\n    * Built-in help (doc) system working and enabled.\n* Metadata 100% fully working on every pages and for every objects.\n    * Use objects' metadata information, which all are editable in `charcoal-admin`.\n* Provide an optimized set of SEO features.\n* Search enabled\n    * Results returned for all types of cms objects (sections, news, events, blogs, locations, etc.)\n    * Used keywords, which all are editable in `charcoal-admin`.\n    * Also search in attachments.\n    * Auto-complete enabled and working.\n* 100% tested with PHPUnit.\n\n---\n\n🚂\n\n[charcoal/admin]:                       https://github.com/charcoalphp/charcoal/tree/main/packages/admin\n[charcoal/boilerplate]:                 https://packagist.org/packages/charcoal/boilerplate\n[charcoal/charcoal]:                    https://github.com/charcoalphp/charcoal\n[Composer]:                             https://getcomposer.org/\n[EditorConfig]:                         https://editorconfig.org/\n[locomotive/boilerplate]:               https://github.com/locomotivemtl/locomotive-boilerplate\n[packagist.org]:                        https://packagist.org/packages/charcoal/boilerplate\n[PHP]:                                  https://php.net/\n[PHP-CLI/options]:                      https://php.net/manual/en/features.commandline.options.php\n[PHP-CLI/webserver]:                    https://php.net/manual/en/features.commandline.webserver.php\n[PHP_CodeSniffer]:                      https://github.com/squizlabs/PHP_CodeSniffer\n[PHPStan]:                              https://phpstan.org/\n[PHPUnit]:                              https://phpunit.de/\n[Psalm]:                                https://psalm.dev/\n[PSR-4]:                                https://www.php-fig.org/psr/psr-4/\n[PSR-12]:                               https://www.php-fig.org/psr/psr-12/\n[seld/jsonlint]:                        https://github.com/Seldaek/jsonlint\n[SQLite]:                               https://www.sqlite.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharcoalphp%2Fboilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharcoalphp%2Fboilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharcoalphp%2Fboilerplate/lists"}