Onion Architecture Boilerplate

screenshot of Onion Architecture Boilerplate
express
solid

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

Overview:

The Onion Architecture Boilerplate is a real-life example of Onion Architecture implemented using Node.js, Express, and TypeScript. This project serves as a simulator for a warehouse and the management of storage space. It consists of two separate perspectives, a client-facing app and an admin-facing app. The technology stack used includes TypeScript, Inversify.js, TypeORM, Express.js, Apollo Server, and GraphQL.

Features:

  • Onion Data Flow Diagram: Provides a visual representation of the data flow within the architecture, ensuring a clear understanding of how data moves through each layer.
  • Architecture layers access restrictions: Enforces strict access restrictions between different layers of the architecture to maintain modularity and separation of concerns.
  • Bounded Contexts: Groups domains into bounded contexts to define protocols of communication and ensure separation between different functionalities.
  • Detailed Diagrams per Layer: Provides detailed diagrams for each layer of the architecture to understand how they work together and the applied design patterns.

Summary:

The Onion Architecture Boilerplate is a practical example of implementing the Onion Architecture using Node.js, Express, and TypeScript. It provides a clear separation of concerns and follows best practices in terms of data flow, access restrictions between layers, and modularization. The architecture can evolve and grow with the project, allowing for the introduction of bounded contexts and modularization as needed. The detailed diagrams provided for each layer help in understanding the architecture and the applied design patterns.

express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.

solid
Solid

SolidJS is a declarative JavaScript library for building user interfaces, offering a reactive programming model for efficient updates. It stands out for its reactivity system that minimizes unnecessary re-renders and its small bundle size, making it a performant choice for developing lightweight and reactive web applications.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

graphql
Graphql

A website that uses GraphQL as a query language to manage data fetching and state management. This includes features such as a strongly typed schema, client-side caching, and declarative data fetching to streamline data management and optimize website performance.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.