Skip to content

carbonteq/hexapp

Repository files navigation

Hexagonal Architecture boilerplate

Installation

pnpm i @carbonteq/hexapp
npm i @carbonteq/hexapp
yarn add @carbonteq/hexapp

Usage

Entity Declaration

import { BaseEntity } from "@carbonteq/hexapp/domain/base.entity.js";

class User extends BaseEntity {
  constructor(readonly name: string) {
    super();
  }

  serialize() {
    return {
      ...super._serialize(),
      name: this.name,
    };
  }
}