Course recommender system api
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.
- 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
~~ The container used is created from Google Cloud Platform official php-docker + swoole
- 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 :)
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.
See the contents of the .k8s
folder :)
@kamasuPaul |