{"id":43873225,"url":"https://github.com/markhughes/flight-skeleton","last_synced_at":"2026-02-06T14:37:23.329Z","repository":{"id":42006247,"uuid":"86962533","full_name":"markhughes/flight-skeleton","owner":"markhughes","description":"🐘 A basic PHP 8 project skeleton with Sass, Twig or Latte, Webpack, and FlightPHP","archived":false,"fork":false,"pushed_at":"2024-11-21T08:12:51.000Z","size":925,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-21T08:22:00.648Z","etag":null,"topics":["composer","flight-php","flightphp","latte","monolog","php","php8","sass","skeleton-application","twig","typescript","webpack"],"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/markhughes.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":"2017-04-02T04:21:50.000Z","updated_at":"2024-11-21T08:14:46.000Z","dependencies_parsed_at":"2024-06-16T22:45:44.443Z","dependency_job_id":"59a547c3-118f-4219-888b-817350866510","html_url":"https://github.com/markhughes/flight-skeleton","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/markhughes/flight-skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhughes%2Fflight-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhughes%2Fflight-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhughes%2Fflight-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhughes%2Fflight-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markhughes","download_url":"https://codeload.github.com/markhughes/flight-skeleton/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhughes%2Fflight-skeleton/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29164909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T14:37:12.680Z","status":"ssl_error","status_checked_at":"2026-02-06T14:36:22.973Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","flight-php","flightphp","latte","monolog","php","php8","sass","skeleton-application","twig","typescript","webpack"],"created_at":"2026-02-06T14:37:22.726Z","updated_at":"2026-02-06T14:37:23.318Z","avatar_url":"https://github.com/markhughes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flight Skeleton\n\nThis skeleton provides a quick start for the development of an application with the [Flight](http://flightphp.com) PHP microframework. The\ngoal here is to get going as fast as possible.\n\nIt also adds support for Runway (CLI), Sass, Twig or Latte, and even TypeScript (it also includes Volta for npm version managing)!\n\n## Downloading the skeleton\n\nFirst, check that you have installed and configured a web server (such as Nginx) with PHP 8 or higher.\n\nYou can either use this [template on github](https://github.com/markhughes/flight-skeleton/generate), or use git to clone this repo:\n\n`$ git clone https://github.com/markhughes/flight-skeleton.git my-app-name`\n\n## Creating the application\n\nIf you want to define global constants or other settings, you can use the `config.php` in `app/config/`.\n\n### Routing\n\nTo define your routes, use the file `app/config/routes.php`:\n\n```php\n\u003c?php\n\nFlight::route(\"/\", [\"\\Acme\\Demo\\Controllers\\Demo\", \"index\"]);\n```\n\nAn example API router has been created in `src/Acme/Demo/Controllers/API.php` where `Flight::json` is used to send the response back.\n\n### Controllers\n\nPlace your code in the `src` folder. All classes from here are autoloaded by their namespace. For an example, have a look in the demo code in `src/Acme/demo/Controllers/Demo.php`. As you can see, the controller uses the namespace `Acme\\Demo\\Controllers`.\n\n### Templates\n\nTwig and Latte templates are loaded by default from `app/resouces/views/`. You can change this by editing the path set in `FLIGHT_SET_VARS` from the `app/config/config.php` file.\n\nYou should call `Flight::render(\"template name\", [ ... optional contenxt ... ])` directly, and .twig or .latte is added for you.\n\nYou can easily change the template engine in `app/config/config.php` and change `TEMPLATE_ENGINE` to either `twig` or `latte`\n\n### Logging\n\nYour application logs into `var/logs`. Should you want to, you can add more loggers in `app/config/logger_handlers.php`, or completely reconfigure it in\n`app/logger.php`.\n\nYou can then at any time log messages, for example:\n\n```php\n$logger-\u003einfo('hello world!');\n```\n\n### Webpack\n\nCompile your scripts using `npm run build` which will throw it all together in `public/dist/main.js` - check the webpack docs on how to use it more effectively. Your entrypoint is located in `app/resources/scripts/index.ts` if you don't want to use TypeScript just rename index.ts to index.js.\n\nYou can also run `npm run dev` to start webpack in watch mode, great for development.\n\n### Commands\n\nUsing Runway you can add commands into the application.\n\n```\n./runway example:example-command\n```\n\nWill execute the command in src/Acme/Demo/Comands/ExampleCommand.php\n\nRunway has a few strict restrictions for commands:\n\n1. They must be in a directory called \"commands\"\n2. The file name must end in Command.php\n\n## Volta\n\nThis project uses [Volta](https://volta.sh/) to manage the node and npm version, it is optional to setup but it is a great tool to manage your JavaScript toolchain.\n\n# License\n\nThe skeleton is licensed under the [MIT](https://opensource.org/licenses/MIT) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkhughes%2Fflight-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkhughes%2Fflight-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkhughes%2Fflight-skeleton/lists"}