Skip to content

RomainFallet/kata-hexagonal-architecture

Repository files navigation

Kata Hexagonal Architecture

Prerequisites

Follow these instructions to set up your environment.

Installation

Back to top ↑

Clone this repository and install its dependencies with:

npm ci

Then, create a ./.env file containing:

HEXAGONAL_ARCHITECTURE_PORT=3000
HEXAGONAL_ARCHITECTURE_DB_HOSTNAME=localhost
HEXAGONAL_ARCHITECTURE_DB_USER=hexagonal_architecture_user
HEXAGONAL_ARCHITECTURE_DB_PASSWORD=hexagonal_architecture_password
HEXAGONAL_ARCHITECTURE_DB_NAME=hexagonal_architecture_db

Finally, execute database migrations:

npm run db-migrate:up

E2E tests

Back to top ↑

To execute end to end tests, create a ./.env.e2e file containing:

ADMIN_DB_HOSTNAME=localhost
ADMIN_DB_USER=postgres
ADMIN_DB_PASSWORD=postgres
ADMIN_DB_NAME=postgres

Then run:

npm run test:e2e

Usage

Back to top ↑

Build project:

npm run build

Lint files:

npm run lint

Start application:

npm start

Execute unit tests:

npm test

Getting started

Back to top ↑

This application is strongly coupled: presentation, business logic and storage layers all live in the same file without any separation of concerns.

Mission 1

Your first mission is to extract a domain layer in ./domains/users-management using the principles of hexagonal architecture.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published