# jbuget/nodejs-clean-architecture-app

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jbuget-nodejs-clean-architecture-app).**

1,540 stars · 259 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/jbuget/nodejs-clean-architecture-app
- Homepage: https://hapijs-v17-app.herokuapp.com/users
- awesome-repositories: https://awesome-repositories.com/repository/jbuget-nodejs-clean-architecture-app.md

## Description

This project provides a structured boilerplate for building Node.js REST APIs, implementing clean architecture principles to isolate business logic from external frameworks and data sources. It serves as a template for organizing complex backend services by enforcing a strict separation of concerns between domain entities, infrastructure, and interface layers.

The architecture distinguishes itself through a modular, plugin-based server design built on the Hapi.js framework. It utilizes a dependency injection container to decouple business logic from concrete implementations, ensuring that services and adapters remain interchangeable and testable. By employing the repository pattern, the system mediates between domain objects and data persistence layers, maintaining independence from specific database technologies.

The framework covers the full lifecycle of request handling, including routing, parameter extraction, and response serialization. It organizes application code into distinct layers that reflect core business concepts, facilitating long-term maintainability and scalability for backend services.

## Tags

### Web Development

- [Hapi.js API Frameworks](https://awesome-repositories.com/f/web-development/hapi-integrations/hapi-js-api-frameworks.md) — Provides a robust boilerplate for building secure web services using the Hapi.js framework.
- [HTTP Request Handling](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-request-handling.md) — Handles the extraction of parameters from incoming HTTP requests and returns formatted responses. ([source](https://github.com/jbuget/nodejs-clean-architecture-app/blob/master/README.md))
- [HTTP Response Handling](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-response-handling.md) — Manages the serialization of data and the return of appropriate HTTP status codes. ([source](https://github.com/jbuget/nodejs-clean-architecture-app#readme))
- [Node.js Server Frameworks](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/node-js-server-frameworks.md) — Provides a modular backend architecture for building scalable RESTful web services.
- [Request Routing](https://awesome-repositories.com/f/web-development/request-routing.md) — Directs incoming network traffic to specific controllers using a modular routing architecture. ([source](https://github.com/jbuget/nodejs-clean-architecture-app#readme))
- [Web Server Hosting](https://awesome-repositories.com/f/web-development/web-infrastructure-deployment/web-infrastructure-servers/web-server-hosting.md) — Hosts the web server and matches incoming traffic to defined application handlers. ([source](https://github.com/jbuget/nodejs-clean-architecture-app/blob/master/README.md))

### Software Engineering & Architecture

- [Dependency Injection Containers](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-containers.md) — Decouples business logic from concrete implementations using a runtime dependency injection container.
- [Clean Architecture Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/clean-architecture-frameworks.md) — Implements clean architecture principles to maintain separation between business logic and infrastructure.
- [Dependency Injection](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection.md) — Injects required adapters and services to ensure modular and testable code. ([source](https://github.com/jbuget/nodejs-clean-architecture-app/blob/master/README.md))
- [Separation of Concerns](https://awesome-repositories.com/f/software-engineering-architecture/separation-of-concerns.md) — Orchestrates requests by separating traffic handling from business logic execution.
- [Domain-Driven Designs](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/abstraction-domain-modeling/domain-driven-designs.md) — Organizes software systems around core business concepts and rules.
- [Layered Architectures](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/layered-architectures.md) — Organizes application code into isolated layers to keep business rules independent of external concerns.
- [Plugin-Based Architectures](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/plugin-module-systems/modular-plugin-architectures/plugin-based-architectures/plugin-based-architectures.md) — Structures the server into modular components that encapsulate routes and security policies.

### Part of an Awesome List

- [Domain Driven Design Samples](https://awesome-repositories.com/f/awesome-lists/devtools/domain-driven-design-samples.md) — Offers a structured project template for organizing application logic into independent layers.

### Data & Databases

- [Repository Patterns](https://awesome-repositories.com/f/data-databases/backend-data-access-layers/repository-patterns.md) — Mediates between domain and data layers using a collection-like interface for persistence.

### Testing & Quality Assurance

- [Business Logic Isolation](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-isolation/logic-isolation-utilities/business-logic-isolation.md) — Provides a structured approach to isolating business logic from external frameworks and data sources. ([source](https://github.com/jbuget/nodejs-clean-architecture-app#readme))
