Description
Stone customer api
๐งฐ Installation
Prerequisites
Install yarn packages before continue
$ yarn
Ask other developers to share .env
. For security reasons this file is not versioned.
Whenever a new environment variable is added, it must be also added to the .example.env
file to keep everything up to date.
Setting up Docker
- This is will make a new Redis running in the standard port
6379
. - This is will make a new redis-commander running in port
8081
.
make compose-local
โจ Development
โ Running the app
# development
yarn start:dev
Observation: Api will run on the port set in $APP_PORT
in .env
.
๐ฎ Playground
http://localhost:$APP_PORT/swagger
to access swagger playground.
๐งช Running tests
# unit tests
yarn test
# unit tests with coverage
yarn test:cov
# e2e tests
yarn test:e2e
After executing yarn test:cov
, the coverage
folder will be generated with coverage details.
๐ Lint
Linting codebase
# issues are automatically fixed
yarn lint
๐ฆ Building
Before building application to production, make sure environment variables are applied correctly.
Building for production
make compose
โ TODO
[ ] Add CI
[ ] Improve docker for production
[ ] Add integration tests to redis
[ ] Add integration tests to keycloak
[ ] Add redis transactions
[ ] Standardize error messages
[ ] Add SUT to avoid some redundant stuffs in tests
[ ] Add pt-BR README
[ ] Add application logs
[ ] Add stress tests
[ ] Add husky pre-push
[ ] Disable swagger on production