{"id":21664399,"url":"https://github.com/wayofdev/laravel-cycle-starter-tpl","last_synced_at":"2025-05-08T02:01:58.109Z","repository":{"id":164366077,"uuid":"639343533","full_name":"wayofdev/laravel-cycle-starter-tpl","owner":"wayofdev","description":"Laravel backend application template for building APIs with CycleORM support.","archived":false,"fork":false,"pushed_at":"2024-02-04T19:50:31.000Z","size":637,"stargazers_count":4,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-31T16:23:57.681Z","etag":null,"topics":["boilerplate","cycle","cycle-orm","cycleorm","ddd","domain-driven-design","laravel","laravel-api","laravel-application","laravel-boilerplate","laravel-cycle-orm","laravel-ddd","laravel-starter-kit","php","spiral","spiral-framework","starter-kit","starter-project","starter-template"],"latest_commit_sha":null,"homepage":"https://wayof.dev","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/wayofdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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},"funding":{"github":"wayofdev"}},"created_at":"2023-05-11T09:23:44.000Z","updated_at":"2024-09-27T13:38:04.000Z","dependencies_parsed_at":"2023-12-31T11:26:00.705Z","dependency_job_id":"7d501e06-57a4-488e-aecc-f72122897144","html_url":"https://github.com/wayofdev/laravel-cycle-starter-tpl","commit_stats":null,"previous_names":[],"tags_count":2,"template":true,"template_full_name":"wayofdev/laravel-starter-tpl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Flaravel-cycle-starter-tpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Flaravel-cycle-starter-tpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Flaravel-cycle-starter-tpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Flaravel-cycle-starter-tpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wayofdev","download_url":"https://codeload.github.com/wayofdev/laravel-cycle-starter-tpl/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252983757,"owners_count":21835764,"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":["boilerplate","cycle","cycle-orm","cycleorm","ddd","domain-driven-design","laravel","laravel-api","laravel-application","laravel-boilerplate","laravel-cycle-orm","laravel-ddd","laravel-starter-kit","php","spiral","spiral-framework","starter-kit","starter-project","starter-template"],"created_at":"2024-11-25T10:37:24.263Z","updated_at":"2025-05-08T02:01:56.388Z","avatar_url":"https://github.com/wayofdev.png","language":"PHP","funding_links":["https://github.com/sponsors/wayofdev"],"categories":[],"sub_categories":[],"readme":"\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"456\" src=\"https://raw.githubusercontent.com/wayofdev/laravel-cycle-starter-tpl/master/assets/logo.gh-light-mode-only.png#gh-light-mode-only\"\u003e\n\u003cimg width=\"456\" src=\"https://raw.githubusercontent.com/wayofdev/laravel-cycle-starter-tpl/master/assets/logo.gh-dark-mode-only.png#gh-dark-mode-only\"\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://actions-badge.atrox.dev/wayofdev/laravel-cycle-starter-tpl/goto\"\u003e\u003cimg alt=\"Build Status\" src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fwayofdev%2Flaravel-cycle-starter-tpl%2Fbadge\u0026style=flat-square\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/wayofdev/laravel-cycle-starter-tpl/tags\"\u003e\u003cimg alt=\"GitHub package.json version\" src=\"https://img.shields.io/github/package-json/v/wayofdev/laravel-cycle-starter-tpl?style=flat-square\"\u003e\u003c/a\u003e\n\u003ca href=\"LICENSE.md\"\u003e\u003cimg src=\"https://img.shields.io/github/license/wayofdev/laravel-cycle-starter-tpl.svg?style=flat-square\u0026color=blue\" alt=\"Software License\"/\u003e\u003c/a\u003e\n\u003ca href=\"#\"\u003e\u003cimg alt=\"Commits since latest release\" src=\"https://img.shields.io/github/commits-since/wayofdev/laravel-cycle-starter-tpl/latest?style=flat-square\"\u003e\u003c/a\u003e\n\u003ca href=\"https://app.codecov.io/gh/wayofdev/laravel-cycle-starter-tpl\"\u003e\n\u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/gh/wayofdev/laravel-cycle-starter-tpl?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n# Laravel Starter Template\n\nThis is an **opinionated** modified version of the Laravel framework which aims at providing a Domain-Driven Design (DDD) structure and using [CycleORM](https://cycle-orm.dev) instead of Eloquent.\n\n## 📄 About\n\nLaravel is a popular PHP web framework known for its simplicity, elegance and the Active Record ORM - Eloquent. Despite its popularity and convenience, Eloquent often comes in the way of projects that require a Domain-Driven Design (DDD) structure. This is due to Eloquent's active record pattern, which in practice can cause the violation of DDD principles, most notably the separation of the business logic from infrastructure code.\n\nUnderstanding this challenge, we've introduced CycleORM in place of Eloquent in this starter template. CycleORM offers a DataMapper pattern which is a better fit for DDD as it helps to maintain a clear boundary between your business logic and database. This approach ensures that your domain rules and business logic can be modelled according to your needs, and not around the constraints of the active record pattern.\n\nThis repository provides a modified file structure for Laravel that follows DDD principles and tries to adhere to best practices, such as those outlined in Spatie's Laravel Beyond CRUD.\n\nOur goal is to provide a starting point for building Laravel applications using a DDD approach with CycleORM, while still leveraging the power and convenience of the Laravel framework.\n\n\u003cbr\u003e\n\n🙏 If you find this repository useful, consider giving it a ⭐️. Thank you!\n\n\u003cbr\u003e\n\n## 🚀 Features\n\nThis starter template inherits the following features from its upstream template [wayofdev/laravel-starter-tpl](https://github.com/wayofdev/laravel-starter-tpl):\n\n* **Added:**\n  * Strict types declaration in all PHP files\n  * Style checker package for custom rule-sets to php-cs-fixer — [wayofdev/php-cs-fixer-config](https://github.com/wayofdev/php-cs-fixer-config)\n  * Static analysis tool — [PHPStan](https://phpstan.org) and it's extensions:\n    * [phpstan/extension-installer](https://github.com/phpstan/extension-installer) — automatic installation of PHPStan extensions\n    * [phpstan/phpstan-deprecation-rules](https://github.com/phpstan/phpstan-deprecation-rules) — rules for detecting usage of deprecated classes, methods, properties, constants and traits.\n    * [nunomaduro/larastan](https://github.com/nunomaduro/larastan) — PHPStan integration with Laravel\n  * [Pest](https://pestphp.com) testing framework\n  * Github action workflows for:\n    * Continuous integration which includes coding standards checks, unit testing and static analysis\n    * Automatic pull-request labeling\n    * [Deployer](https://deployer.org) for automatic deployments to staging and production servers with support of [Github Environments](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)\n  * [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) composer plugin for normalizing composer.json file\n  * [roave/securityadvisories](https://github.com/Roave/SecurityAdvisories) package to ensure that application doesn't have installed dependencies with known security vulnerabilities.\n  * Application dockerization using docker-compose and Makefile — use `make help` to view available commands\n  * Git pre-commit hooks using [pre-commit](https://pre-commit.com) package\n* **Changed:**\n  * Marked default Laravel classes as `final`\n  * Modified file structure to meet DDD principles\n  * Changed config folder files to use default PHP multi-line comment style\n* **Removed:**\n  * Dependencies like Laravel Sanctum, Laravel Pint, and Laravel Sail.\n  * Broadcasting service provider and it's routes. It can be added back, if it will be required for project\n  * Console routes in favor of Command classes.\n  * Sanctum migration files\n\nFollowing the inherited features, this starter template also introduces a set of additional modifications from the upstream template, [wayofdev/laravel-starter-tpl](https://github.com/wayofdev/laravel-starter-tpl):\n\n* **Added:**\n  * CycleORM support via [wayofdev/laravel-cycle-orm-adapter](https://github.com/wayofdev/laravel-cycle-orm-adapter) - This introduces the DataMapper pattern, which is more compatible with DDD principles, replacing Laravel's default Eloquent ORM which uses the Active Record pattern.\n* **Changed:**\n  * Deployer script uses custom task to run Cycle ORM migrations instead of Eloquent migrations\n* **Removed:**\n  * Default Laravel Eloquent migrations - As we're using CycleORM, the default Eloquent migrations are no longer necessary and have been removed to prevent conflicts.\n\n\u003cbr\u003e\n\n## 🚩 Requirements\n\nTo use this repository, you need to meet the following requirements:\n\n- **macOS** Monterey+ or **Linux**\n- Docker 20.10 or newer\n  - [How To Install and Use Docker on Ubuntu 22.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04)\n- Installed **dnsmasq** service, running in the system. You can use [ansible-role-dnsmasq](https://github.com/wayofdev/ansible-role-dnsmasq) to install and configure this service.\n- **Cloned, configured and running** [docker-shared-services](https://github.com/wayofdev/docker-shared-services) to support system-wide DNS, routing, and TLS support via Traefik.\n\n\u003cbr\u003e\n\n## 💿 Installation\n\n\u003e Warning: You should configure, set up, and run the [docker-shared-services](https://github.com/wayofdev/docker-shared-services) repository to ensure system-wide TLS and DNS support.\n\n1. **Clone** repository:\n\n   After forking or creating generating repository from template, you can clone it to your local machine. In this example we will use `laravel-cycle-starter-tpl` repository as starting point.\n\n   ```bash\n   $ git clone git@github.com:wayofdev/laravel-cycle-starter-tpl.git\n   ```\n\n2. **Generate** `.env` file\n\n   Generate .env file from .env.example file using Makefile command:\n\n   ```bash\n   $ make env \\\n       APP_NAME=laravel \\\n       SHARED_SERVICES_NAMESPACE=ss \\\n       PROJECT_SERVICES_NAMESPACE=wod \\\n       COMPOSE_PROJECT_NAME=laravel-cycle-starter-tpl\n   ```\n\n   **Change** generated `.env` file to match your needs, if needed.\n\n   (Optional): to re-generate `.env` file, add `FORCE=true` to the end of command:\n\n   ```bash\n   $ make env \\\n       APP_NAME=laravel \\\n       SHARED_SERVICES_NAMESPACE=ss \\\n       PROJECT_SERVICES_NAMESPACE=wod \\\n       COMPOSE_PROJECT_NAME=laravel-cycle-starter-tpl \\\n       FORCE=true\n   ```\n\n3. **Build**, install and run. This will also generate Laravel app key:\n\n   ```bash\n   $ make\n\n   # or run commands separately\n   $ make hooks\n   $ make install\n   $ make key\n   $ make prepare\n   $ make up\n   ```\n\n\u003cbr\u003e\n\n## 🤝 License\n\n[![Licence](https://img.shields.io/github/license/wayofdev/laravel-cycle-starter-tpl?style=for-the-badge\u0026color=blue)](./LICENSE)\n\n\u003cbr\u003e\n\n## 🧱 Credits and Useful Resources\n\nUseful resources about Laravel and DDD approach:\n\n* [Laravel Beyond CRUD](https://spatie.be/products/laravel-beyond-crud)\n* [Laravel Skeleton](https://romanzipp.github.io/Laravel-Skeleton/) by [romanzipp](https://github.com/romanzipp)\n\n\u003cbr\u003e\n\n## 🙆🏼‍♂️ Author Information\n\nThis repository was created in **2022** by [lotyp / wayofdev](https://github.com/wayofdev).\n\n\u003cbr\u003e\n\n## 🙌 Want to Contribute?\n\nThank you for considering contributing to the wayofdev community!\nWe are open to all kinds of contributions. If you want to:\n\n- 🤔 Suggest a feature\n- 🐛 Report an issue\n- 📖 Improve documentation\n- 👨‍💻 Contribute to the code\n\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwayofdev%2Flaravel-cycle-starter-tpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwayofdev%2Flaravel-cycle-starter-tpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwayofdev%2Flaravel-cycle-starter-tpl/lists"}