GithubHelp home page GithubHelp logo

melzar / onion-architecture-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
285.0 7.0 44.0 2.59 MB

Node.js / Express Onion Architecture boilerplate with Typescript - OOP Variant

TypeScript 99.28% JavaScript 0.65% Shell 0.07%
onion express typescript nodejs typeorm architecture solid boilerplate stryker swagger

onion-architecture-boilerplate's People

Contributors

melzar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

onion-architecture-boilerplate's Issues

Propably Wrong Method Signature in EquipmentRepository

Hi @Melzar, first: Your boilerplate is helping me a lot since it's my first deep dive in all those great architectural techniques.

I'm reading hgraca's article while reading your code

I was going down trough the stack and found this method:

async createEquipment({
name,
userId,
}: CreateEquipmentRequest): Promise<Equipment> {
return this.equipmentRepository.addEquipment(
new AddEquipmentRequest(name, userId)
);
}
}

It is creating an AddEquipmentRequest to pass as parameter, but in the method definition:

async addEquipment({
name,
userId,
}: CreateEquipmentRequest): Promise<Equipment> {

It is expecting CreateEquipmentRequest.

I know that both classes have the same signature:

export class CreateEquipmentRequest {
constructor(public readonly name: string, public readonly userId: string) {}
}

export class AddEquipmentRequest {
constructor(public readonly name: string, public readonly userId: string) {}
}

So, is EquipmentRepository class defining the wrong signature for addEquipment method or am i missing something?

Thank you!

Transactions across repositories.

Hello.

I quite like your repo. Suppose, in a given Service function, you wanted to make changes to multiple repositories within a transaction. How would you handle that while still abstracting away TypeORM?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.