{"id":13796293,"url":"https://github.com/neiluJ/api-vue-boilerplate","last_synced_at":"2025-05-13T00:30:45.810Z","repository":{"id":39563539,"uuid":"150341337","full_name":"neiluJ/api-vue-boilerplate","owner":"neiluJ","description":"[WiP] Ready-to-dev Symfony4 + API-Platform + VueJS client Application boilerplate","archived":false,"fork":false,"pushed_at":"2022-12-08T14:37:23.000Z","size":3082,"stargazers_count":4,"open_issues_count":23,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-10T04:25:52.691Z","etag":null,"topics":["api-platform","boilerplate-application","docker","ready-to-use","symfony","vuejs","webpack"],"latest_commit_sha":null,"homepage":"","language":"Vue","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/neiluJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-25T23:31:56.000Z","updated_at":"2021-02-12T13:41:07.000Z","dependencies_parsed_at":"2023-01-25T13:46:18.208Z","dependency_job_id":null,"html_url":"https://github.com/neiluJ/api-vue-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiluJ%2Fapi-vue-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiluJ%2Fapi-vue-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiluJ%2Fapi-vue-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiluJ%2Fapi-vue-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neiluJ","download_url":"https://codeload.github.com/neiluJ/api-vue-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225159852,"owners_count":17430192,"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":["api-platform","boilerplate-application","docker","ready-to-use","symfony","vuejs","webpack"],"created_at":"2024-08-03T23:01:08.553Z","updated_at":"2024-11-18T10:31:10.365Z","avatar_url":"https://github.com/neiluJ.png","language":"Vue","funding_links":[],"categories":["Table of Contents"],"sub_categories":["awesome-api-platform-bundles"],"readme":"# My API App Boilerplate\n\nReady-to-use Dockerized API app structure powered by:\n\n* Symfony 4.4\n* API Platform 2 (+ swagger for API documentation)\n* VueJS + Vuex client structure \n* Frontend toolkit (Webpack ready: SCSS, Icons/SVG sprites)\n* Full docker dev stack with PHP 7.2 fpm + xdebug + nginx, node, varnish\n* JWT-Ready with login implementation\n\nClone, Build, Enjoy.\n\n## Usage\n\n```bash\n$ . aliases.sh\n[api] $ stack up -d\n```\n\n## Install\n\nCreate and EDIT an ```.env``` file:\n```bash\n$ cp .env.dist .env\n```\n\n```bash\n$ . aliases.sh\n[api] $ stack up -d\n[api] $ composer install -o\n[api] $ npm install \u0026\u0026 npm run dev\n```\n\n### Configure JWT\n\n(find/configure passphrase in .env file)\n```bash\n[api] $ cli\nsite@php $ openssl genpkey -out config/jwt/private.pem -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096\nsite@php $ openssl pkey -in config/jwt/private.pem -out config/jwt/public.pem -pubout\n```\n\nLogin (users are stored in `config/packages/security.yaml`):\n```bash\ncurl -X POST -H \"Content-Type: application/json\" http://localhost/api/login_check -d '{\"username\":\"admin\",\"password\":\"apiplatform\"}'\n```\n\nEncode a user password:\n```bash\nphp bin/console security:encode-password\n```\n\n\u003e Read more about LexitJWTBundle: https://github.com/lexik/LexikJWTAuthenticationBundle/blob/master/Resources/doc/index.md \n\n\u003e Read more about Symfony Security: https://symfony.com/doc/current/security.html\n\n### Upcoming/TODO features\n\n* [ ] JWT-ready (with login form demo)\n* [ ] Better http component (ie: understand api-platform responses)\n* [x] Form validation component (sync with validation from api-platform)\n* [x] CLI aliases \n* [ ] Demo component with Greeting model\n\n## How to use/customize\n\n#### Suggested browser extensions\n\n* VueJS DevTools - [Chrome](https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd) / [Firefox](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)\n* Postman - [Chrome](https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop)\n* JSON Viewer - [Chrome](https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh)\n\n#### PHPStorm Plugins\n\n* Symfony\n* .env files support\n* VueJS\n\n#### Command Line Aliases\n\nYou have to source the ```aliases.sh``` file before using these aliases (on your host computer).\n\n* *stack*: shortcut to docker-compose (ex: ```stack up -d```)\n* *php*: runs php in the container (ex: ```php -i```)\n* *npm*: runs npm in the container (ex: ```npm --version```)\n* *console*: runs the symfony console in the container (ex: ```console ca:cl```)\n* *cli*: enters the PHP CLI\n* *composer*: runs composer in the container (ex: ```composer install -o```)\n* *errorlog*: tails the httpd (nginx) error log\n* *accesslog*: tails the httpd (nginx) access log\n* *phplog*: tails the PHP-FPM error log\n\n#### API Endpoint\n\n* Swagger/OpenAPI documentation is available at the API root: http://localhost/api\n* You can change the API root url by changing the ```prefix``` in ```config/routes/api_platform.yaml```\n\n#### translations\n\n* Translation files are shared with Symfony4\n* Translations are stored in ```assets/translations``` in JSON format\n* Add a new locale in ```assets/vue/main.js```:\n\n```js \nimport messagesEN from '../translations/messages.en.json'\n\n// ...\n\nconst i18n = new VueI18n({\n  locale: locale,\n  fallbackLocale: 'fr',\n  messages: {\n    fr: messagesFR,\n    en: messagesEN\n  }\n});\n```\n\nuse in vue components:\n```vue\n\u003ctemplate\u003e\n    \u003ch1\u003e{{ $t('app.welcome_msg') }}\u003c/h1\u003e\n\u003c/template\u003e\n```\n\nuse in twig/symfony:\n```django\n\u003ch1\u003e{{ 'app.welcome_msg'|trans }}\u003c/h1\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FneiluJ%2Fapi-vue-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FneiluJ%2Fapi-vue-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FneiluJ%2Fapi-vue-boilerplate/lists"}