/nest_gql

Primary LanguageTypeScript

Simple GraphQL with Nest

This project is a showcase of my expertise in back-end development using NestJS. It demonstrates a GraphQL architecture with features like CI/CD, Automated testing, Authentication and Authorization using Auth0, ORM, and containerization.

It highlights my ability to build scalable and secure applications, utilizing modern technologies and best practices.

Dependencies

Note:

  • open graphiql for testing Queries and Mutation
  • to sign-up / sign-in, open link on browser -> $AUTH0_DOMAIN/authorize?audience=$AUTH0_AUDIENCE&scope=offline_access%20openid%20email%20name&response_type=code&client_id=$AUTH_CLIENTID&redirect_uri=$AUTH_CALLBACK&state=STATE

Execution

yarn install
docker-compose up database -d
yarn dev
yarn test

Migrations with MikroORM

yarn generate_migration
yarn revert_db
yarn migrate_db

Dockerize

docker build --file ./dockerfile --tag [image_name]:[version] . --no-cache --progress=plain

# Publish image to registry
# login using specific user docker login docker.io -u username -p password
docker login docker.io
docker push [username]/[image_name]:[version]
docker logout

TODO

  • add refresh token mechanism
  • integrate Auth0 logout API