{"id":18929656,"url":"https://github.com/thecodingmachine/symfony-boilerplate","last_synced_at":"2025-07-27T15:14:54.579Z","repository":{"id":37839217,"uuid":"309957933","full_name":"thecodingmachine/symfony-boilerplate","owner":"thecodingmachine","description":"An example of an application built with Symfony 5, GraphQL and Nuxt.js","archived":false,"fork":false,"pushed_at":"2024-07-08T13:47:04.000Z","size":10205,"stargazers_count":106,"open_issues_count":59,"forks_count":38,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-07-17T21:19:08.641Z","etag":null,"topics":["clean-architecture","docker","docker-compose","graphql","minio","mysql","nuxtjs","pest","redis","s3","ssr","symfony","vagrant","vuejs"],"latest_commit_sha":null,"homepage":"https://thecodingmachine.github.io/symfony-boilerplate","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/thecodingmachine.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}},"created_at":"2020-11-04T09:38:40.000Z","updated_at":"2025-06-30T20:29:45.000Z","dependencies_parsed_at":"2023-02-04T23:46:06.076Z","dependency_job_id":"3cc8a5ef-8992-48b5-959b-5cc9360b6698","html_url":"https://github.com/thecodingmachine/symfony-boilerplate","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/thecodingmachine/symfony-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fsymfony-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fsymfony-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fsymfony-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fsymfony-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/symfony-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fsymfony-boilerplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267376423,"owners_count":24077316,"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-07-27T02:00:11.917Z","response_time":82,"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":["clean-architecture","docker","docker-compose","graphql","minio","mysql","nuxtjs","pest","redis","s3","ssr","symfony","vagrant","vuejs"],"created_at":"2024-11-08T11:34:12.765Z","updated_at":"2025-07-27T15:14:54.537Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://thecodingmachine.github.io/symfony-boilerplate/img/logo.svg\" alt=\"Symfony Boilerplate\" width=\"250\" height=\"250\" /\u003e\n\u003c/p\u003e\n\u003ch3 align=\"center\"\u003eSymfony Boilerplate\u003c/h3\u003e\n\u003cp align=\"center\"\u003e\u003ca href=\"https://thecodingmachine.github.io/symfony-boilerplate\"\u003eDocumentation\u003c/a\u003e\u003c/p\u003e\n\n---\n\nThis is a template of a *README*. Adapt it according to the comments and your needs.\n\n---\n\n# Symfony Boilerplate\n\n\u003e Replace this title and the following description with your project name and description.\n\nA web application built with Nuxt.js 2, Symfony 5.4 (LTS), and GraphQL 5.\n\n## Setup\n\n### Prerequisites\n\n#### Linux\n\nInstall the latest version of [Docker](https://docs.docker.com/install/) and \n[Docker Compose](https://docs.docker.com/compose/install/).\n\n#### macOS\n\nConsider installing [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/).\n\nIndeed, Docker currently has substantial performance issues on macOS, and using Vagrant allows us to have an almost \nLinux-like experience regarding performances.\n\n#### Windows\n\nConsider using a Linux-like terminal to run the [Makefile](Makefile) commands. \nVagrant might also be a solution regarding performances.\n\nIf not possible, you may also directly run the commands specified in the [Makefile](Makefile). \nFor instance, instead of running `make up`, run `docker-compose up -d`.\n\n### Hosts\n\nUpdate your `hosts` file with the following entries:\n\n```\n127.0.0.1   traefik.symfony-boilerplate.localhost\n127.0.0.1   symfony-boilerplate.localhost\n127.0.0.1   api.symfony-boilerplate.localhost\n127.0.0.1   phpmyadmin.symfony-boilerplate.localhost\n127.0.0.1   minio.symfony-boilerplate.localhost\n127.0.0.1   mailhog.symfony-boilerplate.localhost\n```\n\n\u003e Update the domain with the one used in your project.\n\nOn Linux and macOS, run `sudo nano /etc/hosts` to edit it.\n\nOn Windows, edit the file `C:\\Windows\\System32\\drivers\\etc\\hosts` with administrative privileges.\n\n### First start\n\nCopy the file [.env.dist](.env.dist) to a file named `.env`. For instance:\n\n```\ncp .env.dist .env\n```\n\n\u003e Edit the [.env.dist](.env.dist) by updating the default values of `DOMAIN`, `MYSQL_DATABASE` and `APP_SECRET`\n\u003e environment variables.\n\n---\n\n#### Vagrant user\n\n\"Comment\" the `STARTUP_COMMAND_3` and `STARTUP_COMMAND_4` environment variables from the `api` service \nin the [docker-compose.yml](docker-compose.yml) file.\n\nNext, run:\n\n```\ndocker-compose up webapp api\n```\n\n📣\u0026nbsp;\u0026nbsp;This command start the `webapp` and `api` service. While booting, these services install the JavaScript\nand PHP dependencies. We cannot do that directly in the Vagrant VM as `yarn` and `composer install` fail miserably the\nfirst time.\n\nOnce the services have installed the dependencies, you may stop them with:\n\n```\nCTRL+C\ndocker-compose down\n```\n\nDon't forget to uncomment the previous environments variables from the `api` service \nin the [docker-compose.yml](docker-compose.yml) file.\n\nNext, check there is no application running on port 80 (like Apache or another virtual machine).\n\nIf OK, run `make vagrant`, then `vagrant up`, and finally `vagrant ssh` to connect to the virtual machine. \nFrom here, you'll be able to run all the next commands like Linux users!\n\n\u003e Update the variable `VAGRANT_PROJECT_NAME` from the [.env](.env) and [.env.dist](.env.dist) files with \n\u003e your project name. Only use alphanumeric characters (no spaces, distinguish words with `_` or `-`).\n\n---\n\nNext, make sure there is no application running on port 80 (Vagrant users can skip this check).\n\nGood? You may now start all the Docker containers with the following commands:\n\n```\nmake up\n```\n\nIt may take some time as each container will also set up itself, such as installing dependencies (PHP, JavaScript, etc.), \ncompiling sources (JavaScript), or running migrations to set up the database structure.\n\n**📣\u0026nbsp;\u0026nbsp;In some cases, the `api` service will try to run the migrations before the `mysql` service is ready. \nIf so, restart the `api` service with `docker-compose up -d api`.**\n\nThe containers will be ready faster next time you run this command as the first run is doing most of the setup.\n\nOnce everything is ready, the following endpoints should be available:\n\n* http://traefik.symfony-boilerplate.localhost (Reverse proxy, the entry point of all the HTTP requests)\n* http://symfony-boilerplate.localhost (Web application)\n* http://api.symfony-boilerplate.localhost (API)\n* http://phpmyadmin.symfony-boilerplate.localhost (phpMyAdmin, a web interface for your MySQL database)\n* http://minio.symfony-boilerplate.localhost (S3 compatible storage)\n* http://mailhog.symfony-boilerplate.localhost (Emails catcher)\n\n\u003e Update the domain with the one used in your project.\n\nYou may now enter the `api` service and load the development data:\n\n```\nmake api\nphp bin/console app:fixtures:dev\nexit\n```\n\n**Last but not least, start the message consumer with:**\n \n```\nmake consume\n```\n\n## Cypress\n\nWe have added cypress for front-end testing, for now it is in webapp directory.\nIt is recommended to remove it went deploy in production for security reasons:\n\n### Open cypress for testing\nIn the main directory\n```\ncd src/webapp\n./node_modules/.bin/cypress open\n```\n\n## What's next?\n\n### Configuring Git\n\nGit should ignore globally some folders like those generated by your IDE and Vagrant.\n\nIf not already done, you should tell Git where to find your global `.gitignore` file.\n\nFor instance, on Linux/macOS/Windows git bash:\n\n```\ngit config --global core.excludesfile '~/.gitignore'\n```\n\nWindows cmd:\n\n```\ngit config --global core.excludesfile \"%USERPROFILE%\\.gitignore\"\n```\n\nWindows PowerShell:\n\n```\ngit config --global core.excludesfile \"$Env:USERPROFILE\\.gitignore\"\n```\n\nThen create the global `.gitignore` file according to the location specified previously.\n\nYou may now edit it, according to your environment, with:\n\n```\n# IDE\n.idea\n.vscode\n# MacOS\n.DS_Store\n# Vagrant\n.vagrant\n```\n\n### Documentations\n\nMake sure you have read the following documentations:\n\n**Day-to-day guidelines**\n\n* [Web application guidelines](src/webapp/README.md)\n* [API guidelines](src/api/README.md)\n\n**In-depth explanations**\n\n* See [docs](docs) folder.\n\n### How to stop the stack?\n\nAs simple as the `make up` command, run `make down` to stop the entire Docker Compose stack.\n\nIf you're a Vagrant user, you may also stop the virtual machine with `vagrant halt`.\n\nIf you're not going to work on the project for a while, you may also destroy \nthe virtual machine using `vagrant destroy`.\n\n### How to view the logs of the Docker containers?\n\nAll aggregated logs:\n\n```\ndocker-compose logs -f\n```\n\nLogs of one service:\n\n```\ndocker-compose logs -f SERVICE_NAME\n```\n\nFor instance, if you want the logs of the `api` service:\n\n```\ndocker-compose logs -f api\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fsymfony-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Fsymfony-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fsymfony-boilerplate/lists"}