{"id":21664378,"url":"https://github.com/wayofdev/spiral-starter-tpl","last_synced_at":"2025-04-12T00:16:33.088Z","repository":{"id":167930914,"uuid":"630883604","full_name":"wayofdev/spiral-starter-tpl","owner":"wayofdev","description":"🌪️ Pre-configured Spiral Framework Project Template with support of the Temporal. Includes PHPUnit, Pest PHP, PHPStan, PHP CS Fixer, and CI tools. Supports OpenAPI, DDD, Deptrac, Deployer, PHP 8.3, Docker, local SSL, and DNS. Your next choice for a SaaS project backend.","archived":false,"fork":false,"pushed_at":"2025-03-31T21:43:40.000Z","size":1422,"stargazers_count":2,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-12T00:16:25.056Z","etag":null,"topics":["boilerplate","ddd","php","spiral","spiral-api","spiral-application","spiral-boilerplate","spiral-ddd","spiral-framework","spiral-starter-kit","spiral-starter-template","starter-kit","starter-project","starter-template","temporal"],"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":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"wayofdev"}},"created_at":"2023-04-21T11:27:33.000Z","updated_at":"2024-11-21T07:30:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"82bcc0c9-2a94-4ef5-87de-9d4af22755f2","html_url":"https://github.com/wayofdev/spiral-starter-tpl","commit_stats":null,"previous_names":["wayofdev/spiral-starter-tpl"],"tags_count":6,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Fspiral-starter-tpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Fspiral-starter-tpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Fspiral-starter-tpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayofdev%2Fspiral-starter-tpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wayofdev","download_url":"https://codeload.github.com/wayofdev/spiral-starter-tpl/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497818,"owners_count":21113984,"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","ddd","php","spiral","spiral-api","spiral-application","spiral-boilerplate","spiral-ddd","spiral-framework","spiral-starter-kit","spiral-starter-template","starter-kit","starter-project","starter-template","temporal"],"created_at":"2024-11-25T10:37:05.198Z","updated_at":"2025-04-12T00:16:33.056Z","avatar_url":"https://github.com/wayofdev.png","language":"PHP","funding_links":["https://github.com/sponsors/wayofdev"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://wayof.dev\" target=\"_blank\"\u003e\n        \u003cpicture\u003e\n            \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/wayofdev/.github/master/assets/logo.gh-dark-mode-only.png\"\u003e\n            \u003cimg width=\"400\" src=\"https://raw.githubusercontent.com/wayofdev/.github/master/assets/logo.gh-light-mode-only.png\" alt=\"WayOfDev Logo\"\u003e\n        \u003c/picture\u003e\n    \u003c/a\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003eBuild\u003c/strong\u003e\u003cbr\u003e\n    \u003ca href=\"https://actions-badge.atrox.dev/wayofdev/spiral-starter-tpl/goto\" target=\"_blank\"\u003e\u003cimg alt=\"Build Status\" src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fwayofdev%2Fspiral-starter-tpl%2Fbadge\u0026style=flat-square\u0026label=github%20actions\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/wayofdev/spiral-starter-tpl/actions/workflows/deploy-staging.yml?query=workflow%3ADeploy\" target=\"_blank\"\u003e\u003cimg alt=\"Deploy to Staging Status\" src=\"https://img.shields.io/github/actions/workflow/status/wayofdev/spiral-starter-tpl/deploy-staging.yml?branch=develop\u0026style=flat-square\u0026label=deploy%20to%20staging\u0026logo=github\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/wayofdev/spiral-starter-tpl/actions/workflows/deploy-release.yml?query=workflow%3ADeploy\" target=\"_blank\"\u003e\u003cimg alt=\"Deploy to Production Status\" src=\"https://img.shields.io/github/actions/workflow/status/wayofdev/spiral-starter-tpl/deploy-release.yml?style=flat-square\u0026label=deploy%20to%20prod\u0026logo=github\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003eProject\u003c/strong\u003e\u003cbr\u003e\n    \u003ca href=\"https://github.com/wayofdev/spiral-starter-tpl\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/wayofdev/spiral-starter-tpl?style=flat-square\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/wayofdev/spiral-starter-tpl\" target=\"_blank\"\u003e\u003cimg alt=\"Commits since latest release\" src=\"https://img.shields.io/github/commits-since/wayofdev/spiral-starter-tpl/latest?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/wayofdev/spiral-starter-tpl\" target=\"_blank\"\u003e\u003cimg alt=\"PHP Version Require\" src=\"https://poser.pugx.org/wayofdev/laravel-package-tpl/require/php?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003eQuality\u003c/strong\u003e\u003cbr\u003e\n    \u003ca href=\"https://app.codecov.io/gh/wayofdev/spiral-starter-tpl\" target=\"_blank\"\u003e\u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/wayofdev/spiral-starter-tpl?style=flat-square\u0026logo=codecov\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://dashboard.stryker-mutator.io/reports/github.com/wayofdev/spiral-starter-tpl/develop\" target=\"_blank\"\u003e\u003cimg alt=\"Mutation testing badge\" src=\"https://img.shields.io/endpoint?style=flat-square\u0026label=mutation%20score\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fwayofdev%2Fspiral-starter-tpl%2Fmaster\"\u003e\u003c/a\u003e\n    \u003ca href=\"\"\u003e\u003cimg src=\"https://img.shields.io/badge/phpstan%20level-8%20of%209-brightgreen?style=flat-square\" alt=\"PHP Stan Level 8 of 9\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003eCommunity\u003c/strong\u003e\u003cbr\u003e\n    \u003ca href=\"https://discord.gg/CE3TcCC5vr\" target=\"_blank\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/1228506758562058391?style=flat-square\u0026logo=discord\u0026labelColor=7289d9\u0026logoColor=white\u0026color=39456d\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://x.com/intent/follow?screen_name=wayofdev\" target=\"_blank\"\u003e\u003cimg alt=\"Follow on Twitter (X)\" src=\"https://img.shields.io/badge/-Follow-black?style=flat-square\u0026logo=X\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n# Spiral Framework Starter Template\n\nThis is an **opinionated** modified version of the Spiral Framework which aims at providing a Domain-Driven Design (DDD) structure.\n\n## 📄 About\n\nTo be added...\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 includes several added, changed, and removed features:\n\n### → Framework Modifications\n\n* **Added:**\n  * To be added...\n* **Changed:**\n  * To be added...\n* **Removed:**\n  * To be added...\n\n### → Development Tools\n\n* **Added:**\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  * [Phive](https://github.com/phar-io/phive) support for managing PHP tools\n    * [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) composer plugin for normalizing composer.json file\n    * [maglnet/ComposerRequireChecker](https://github.com/maglnet/ComposerRequireChecker) to check whether a specific composer package uses imported symbols that aren't part of its direct composer dependencies\n  * Application dockerization using docker-compose and Makefile — use `make help` to view available commands\n    * [docker-php-dev](https://github.com/wayofdev/docker-php-dev) as PHP development environment with XDebug support out of the box\n\n### → Testing\n\n* **Added:**\n  * Configured [PHPUnit](https://phpunit.de/index.html) for unit testing.\n  * Integrated [Pest PHP](https://pestphp.com) for elegant console support and architecture testing.\n  * [Infection](https://github.com/infection/infection) for mutation testing to ensure quality.\n  * Mutation test reports are uploaded [Stryker Mutator Dashboard](https://dashboard.stryker-mutator.io).\n\n### → Static Analysis\n\n* **Added:**\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    * [larastan/larastan](https://github.com/larastan/larastan) for Laravel-specific static analysis.\n  * [Psalm](https://github.com/vimeo/psalm) static analysis tool and it's extensions:\n    * [psalm/plugin-laravel](https://github.com/psalm/psalm-plugin-laravel) — Psalm plugin for Laravel\n    * [psalm/plugin-phpunit](https://github.com/psalm/psalm-plugin-phpunit) — Psalm plugin for PHPUnit\n  * [PHP Rector](https://github.com/rectorphp/rector) for automated code upgrades and refactoring, maintaining modern code standards.\n\n### → Continuous Integration\n\n* **Added:**\n  * GitHub action workflows for:\n    * Continuous integration which includes coding standards checks, unit testing and static analysis\n    * Automatic pull-request labeling\n  * Git pre-commit hooks using [pre-commit](https://pre-commit.com) package\n\n### → Deployments\n\n* **Added:**\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  * For more information see [Deployments](#-requirements) section\n\n### → Services\n\n* **Added:**\n  * [Mailpit](https://github.com/axllent/mailpit) service to simplify email testing in development. Mailpit is an email testing tool that provides a web interface for viewing and managing test emails sent by the application.\n  * [MinIO](https://min.io) service for object storage, compatible with the Amazon S3 API. This enables the application to store and retrieve files in a development environment.\n  * [Temporal](https://temporal.io/) service is included by default for managing distributed workflows. The configuration for Temporal is located in the separate [docker-compose.temporal.yaml](./docker-compose.temporal.yaml) file, allowing easier integration with the main application.\n\n\u003cbr\u003e\n\n## 🚩 Requirements\n\nTo use this repository, you need to meet the following requirements:\n\n* **Operating System**: macOS Monterey+, Linux, or Windows with WSL2.\n* **Docker**: Version 26.0.0 or newer. Installation guides:\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  * [How To Install Docker Desktop on Mac](https://docs.docker.com/desktop/install/mac-install/)\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 [!Note]\n\u003e 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\n### → Docker Shared Services\n\nCheck full instructions in [docker-shared-services](https://github.com/wayofdev/docker-shared-services) repository.\n\n1. **Create shared project directory:**\n\n   ```bash\n   mkdir -p ~/projects/infra \u0026\u0026 cd ~/projects/infra\n   ```\n\n2. **Clone `docker-shared-services` repository:**\n\n    ```bash\n    git clone \\\n    git@github.com:wayofdev/docker-shared-services.git \\\n    ~/projects/infra/docker-shared-services \u0026\u0026 \\\n    cd ~/projects/infra/docker-shared-services\n   ```\n\n3. **Create `.env` file:**\n\n    ```bash\n    make env\n    ```\n\n4. **Install root certificate** and generate default project certs:\n\n    ```bash\n    make cert-install\n    ```\n\n5. **Run shared services:**\n\n    ```bash\n    make up\n    ```\n\n### → Spiral Starter Template\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 `spiral-starter-tpl` repository as starting point.\n\n   ```bash\n   git clone \\\n     git@github.com:wayofdev/spiral-starter-tpl.git \\\n     ~/projects/spiral-starter-tpl \u0026\u0026 \\\n   cd ~/projects/spiral-starter-tpl\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       SHARED_SERVICES_NAMESPACE=ss \\\n       COMPOSE_PROJECT_NAME=spiral-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       SHARED_SERVICES_NAMESPACE=ss \\\n       COMPOSE_PROJECT_NAME=spiral-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\n4. **Open** your browser and navigate to `https://api.spiral-starter-tpl.docker` to see Laravel welcome page.\n\n\u003cbr\u003e\n\n## 🧰 Project Architecture\n\nThe project architecture of `wayofdev/spiral-starter-tpl` follows a structured approach with distinct layers:\n\n* **Domain:** Contains core business logic and entities.\n* **Bridge:** Connects the domain layer with external systems or services.\n* **Infrastructure:** Handles interactions with external systems, such as databases, APIs, or file systems.\n* **Support:** Provides general-purpose helper classes that assist various parts of the application.\n* **DatabaseSeeders:** Handles database seeding logic.\n* **DatabaseFactories:** Manages database factory definitions.\n* **Tests:** Contains test cases for various layers of the application.\n\nEach layer has defined dependencies, ensuring a clear separation of concerns and facilitating maintainability and scalability.\n\nFor more information check [deptrac.yaml](https://github.com/wayofdev/spiral-starter-tpl/blob/develop/app/deptrac.yaml) located in repository `app` folder.\n\n\u003cbr\u003e\n\n## 🪄 Template\n\nThis project was generated from the [spiral/app](https://github.com/spiral/app) repository using the command: `composer create-project spiral/app spiral-starter-tpl` with the following selected options:\n\n\u003cdetails\u003e\n  \u003csummary\u003eView Setup Options\u003c/summary\u003e\n\n  ```bash\n  Which application preset do you want to install?\n  \u003e [1] Web\n\n  Create a default application structure and demo data?\n  \u003e [1] Yes\n\n  Would you like to use SAPI?\n  \u003e [1] Yes\n\n  Do you need Cycle ORM?\n  \u003e [1] Yes\n\n  Which collections do you want to use with Cycle ORM?\n  \u003e [2] Laravel Collections\n\n  Which validator component do you want to use?\n  \u003e [3] Laravel Validator\n\n  Do you want to use Queue component?\n  \u003e [1] Yes\n\n  Do you want to use Cache component?\n  \u003e [1] Yes\n\n  Do you want to use Mailer component?\n  \u003e [1] Yes\n\n  Do you want to use Storage component?\n  \u003e [1] Yes\n\n  Which template engine do you want to use?\n  \u003e [3] Plain PHP\n\n  Do you need Data Grid?\n  \u003e [1] Yes\n\n  Do you want to use the Event Dispatcher?\n  \u003e [1] Yes\n\n  Do you need a cron jobs scheduler?\n  \u003e [1] Yes\n\n  Do you need Translator?\n  \u003e [0] No\n\n  Do you need the Temporal?\n  \u003e [1] Yes\n\n  Do you need the RoadRunner Metrics?\n  \u003e [1] Yes\n\n  Do you need the Sentry?\n  \u003e [1] Yes\n  ```\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwayofdev%2Fspiral-starter-tpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwayofdev%2Fspiral-starter-tpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwayofdev%2Fspiral-starter-tpl/lists"}