Skip to content

Api Rest with Nest + Hexagonal Architecture + DDD & CQRS.

Notifications You must be signed in to change notification settings

mapeveri/typescript-ddd-cqrs

Repository files navigation

Typescript-ddd-cqrs backend

Api Rest with Nest + Hexagonal Architecture + DDD & CQRS.

Development

Configuration for development.

Configuration

  1. Copy .env.example to .env and configure it.

  2. Execute docker compose:

    docker compose up
  1. Run migrations:
    docker compose run app npm run mikroorm migration:up
  1. Create user with google (check oauth2 section). It's to get a token from google and it allow you to use the endpoint /api/v1/auth/login to log in to the application.

Running

After running docker compose up the application will be available at https://localhost:4000.

Migrations

MikroOrm

To generate migrations run the next command:

  docker compose run app npm run mikroorm migration:create

To execute migrations run the next command:

  docker compose run app npm run mikroorm migration:up

Oauth2:

To get a token for testing you should go to https://developers.google.com/oauthplayground and configure it as "Use your own OAuth credentials" after that you should use Google OAuth2 API v2.

Consume async domain events:

To consume async domain events you need to run the next command:

  make run-consume-domain-events

Deployment with Kubernetes

Follow the readme in .k8s/README.md

About

Api Rest with Nest + Hexagonal Architecture + DDD & CQRS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages