This project is a small example of a API, built on good development practices.
- REST endpoints;
- [Coming soon] GraphQL
- Implements Resources and Transformers with Fractal (REST)
- [Coming soon] Query string language to filter, paginate and sort the returned collections. (REST)
- API Documentation with Swager. (REST)
- Domain Driven Design (DDD)
- Single action Controllers (REST)
- Code coverage by tests with PHPUnit - See the code coverage HTML report
- Docker for dev environment with Ambientum
Use the package manager composer to install it.
# At the root of the project.
composer install
You can run this project easily on your machine with Docker, you will also need the Docker Compose.
# At the root of the project.
./bin up -d # Ready! The API is already available at http://localhost :)
./bin down # Drop containers.
./bin composer update # Use the composer package manager.
./bin artisan # Use the Laravel command line.
./bin phpunit # PHPUnit tests
# OR
./bin ls -l # Run any command inside the container.
All this was very easy thanks to the beautiful work done in this project codecasts/ambientum
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.