REST API for the input of calories
- Run
cp docker-compose.dist.yml docker-compose.yml
- Run
docker-compose up
and enjoy (by default app will run on localhost:8080), (optionally edit filedocker-compose.yml
for your needs)
There are several ways how to customize application configuration.
- Environment variables
- Config file
config/config.local.neon
It is possible to use .env
file to set environment variables (look at .env.dist
as example). You can as well use environment variables in docker-compose.yml
.
These environment variables are supported:
DATABASE_USER
(required)DATABASE_PASSWORD
(required)DATABASE_HOST
(required)DATABASE_NAME
(required)JWT_SECRET
(required)NUTRITIONIX_APP_ID
(required)NUTRITIONIX_API_KEY
(required)
You can create this file and change anything. This is extremely useful for local development, etc disable logging.
- PhpStan static analysis:
vendor/bin/phpstan analyse src packages --level=max
- PhpUnit Tests:
vendor/bin/phpunit tests
- Coding Standard:
vendor/bin/ecs check src packages
- HTTP (functional) tests for API with fixtures
- CI config for Gitlab CI
- Architecture: DTOs for requests, instead of working with stdClass
- Architecture: decouple logic from actions - CommandBus (SimpleBus)
- Console command for creating user and caloric entry (Symfony/Console)