GithubHelp home page GithubHelp logo

tuanhaviet22 / laravel-api-templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibrunotome/laravel-api-templates

0.0 0.0 0.0 4.71 MB

Laravel API starter kit collection using different structures.

License: MIT License

Shell 0.12% PHP 97.77% Blade 2.00% Dockerfile 0.12%

laravel-api-templates's Introduction


A Laravel API starter kit collection using different structures.

CI Build Status Build Status License

Screen Shot 2020-09-05 at 21 38 49

Screen Shot 2020-09-05 at 22 12 44

Screen Shot 2019-05-26 at 11 29 40

Screen Shot 2019-05-26 at 11 24 15

What is it

This is a starter kit for your next API using Laravel, implemented with more than one structure, all battle-tested with the same features listed below.

Features

  • 2FA
  • ACL
  • Anti Phishing Code on email
  • Audit
  • CORS
  • Device authorization
  • Etag
  • Horizon
  • Laravel 8.x, 7.x, 6.x, 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:

  • Background job example

Up and running

Environment: develop

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

The oficial php image from Google Cloud Platform is updated once in a lifetime so I decided to manage my own php images at http://github.com/ibrunotome/php

  • Set the .env variables, see .env.example that is already configured to point to pgsql and redis services
  • Run the container with docker-compose -f docker-compose.develop.yml up. Alternatively, if you have an older laptop, try running remotely with Blimp.
  • Enter into app container with docker exec -it default-structure-app bash
  • Run the migrations with php artisan migrate:fresh

And it's up and running :)

Environment: testing

The container with xdebug is in the Dockerfile.testing, you can get into this container using: docker-compose -f docker-compose.testing.yml up -d app and then:

  • Get into app container with docker exec -it default-structure-app-testing bash (off course, default-structure-app is for the default-structure)
  • 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.

Environment: production

See the contents of the .k8s folder :)

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
@ibrunotome

Contributors

crcms
@crcms
ejj
@ejj

laravel-api-templates's People

Contributors

ibrunotome avatar dependabot[bot] avatar ejj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.