snipertomcat / laravel-api-templates

A Laravel API starter kit collection using different structures. Dockerized with Google App Engine container + swoole.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

laravel-api-templates

A Laravel API starter kit collection using different structures. Dockerized with Google App Engine container + swoole.

Build Status

Screen Shot 2019-05-26 at 18 17 08

Screenshot 2019-05-26 18 07 03

Screen Shot 2019-05-26 at 11 29 40

Screen Shot 2019-05-26 at 11 24 15

Features

  • 2FA
  • ACL
  • Anti Phishing Code on email
  • Audit
  • CORS
  • Device authorization
  • Etag
  • Horizon
  • Laravel 5.8
  • Login
  • Login history
  • Multiple localizations, preconfigured with en_US and pt_BR
  • Password reset
  • Password must not be in one of the 4 million weak passwords
  • PHPCS PSR2, phpinsights and sonarqube analysis
  • Register
  • Swoole
  • Tests
  • Transactional events: Listen to events and send notifications only if the transaction is commited
  • uuid

Soon:

  • Job example
  • Schedule example
  • Websockets example
  • Graphql example

Up and running

The container used is created from Google Cloud Platform official php-docker + swoole and can be found here: https://github.com/ibrunotome/docker-laravel-appengine

  • Set the .env variables, see .env.example that is already configured to point to pgsql and redis services
  • Run the container with docker-compose up
  • Run the migrations with docker-compose run app bash -c "php artisan migrate:fresh"

And it's up and running :)

The container with xdebug installed is in another Dockerfile, the Dockerfile.testing, you can get into this container using: docker-compose -f docker-compose.testing.yml run app-tests bash and then:

  • Run tests with composer test
  • Run "lint" (phpcs) with composer lint
  • Run "lint and fix" (phpcbf) with composer lint:fix
  • Run phpcpd with composer phpcpd
  • Run php static analysis (level 5) with composer static:analysis
  • Run nunomaduro/phpinsights with php artisan insights

To see sonarqube analysis, simple run docker-compose -f docker-compose.sonarqube.yml up, the quality profile used is PSR-2.

Email layout

screenshot 2019-02-07 08 26 51

Database structure

Screen Shot 2019-05-26 at 17 55 32

Routes

Screen Shot 2019-05-26 at 17 56 41

Author


@ibrunotome

Contributors


@crcms

About

A Laravel API starter kit collection using different structures. Dockerized with Google App Engine container + swoole.

License:MIT License


Languages

Language:PHP 94.3%Language:HTML 5.4%Language:Dockerfile 0.2%Language:Shell 0.1%