Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/0xtheprodev/nestjs-clean-example

Clean Architecture Example using NestJS on Fastify
https://github.com/0xtheprodev/nestjs-clean-example

clean-architecture fastify graphql hexagonal-architecture nestjs openapi openapi3 repository-pattern rest-api swagger-ui typeorm typescript

Last synced: about 2 months ago
JSON representation

Clean Architecture Example using NestJS on Fastify

Awesome Lists containing this project

README

        

# nestjs-clean-example

[![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)](https://typescriptlang.org/)
[![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/)
[![NestJS](https://img.shields.io/badge/nestjs-%23E0234E.svg?style=for-the-badge&logo=nestjs&logoColor=white)](https://nestjs.com/)
[![Fastify](https://img.shields.io/badge/fastify-%23000000.svg?style=for-the-badge&logo=fastify&logoColor=white)](https://www.fastify.io/)
[![OpenAPI](https://img.shields.io/badge/openapi-6BA539?style=for-the-badge&logo=openapi-initiative&logoColor=fff)](https://www.openapis.org/)
[![GraphQL](https://img.shields.io/badge/-GraphQL-E10098?style=for-the-badge&logo=graphql&logoColor=white)](https://graphql.org/)
[![ESLint](https://img.shields.io/badge/ESLint-4B3263?style=for-the-badge&logo=eslint&logoColor=white)](https://eslint.org)
[![Prettier](https://img.shields.io/badge/Prettier-black?style=for-the-badge&logo=prettier&logoColor=white)](https://prettier.io)
[![Open Issues](https://img.shields.io/github/issues-raw/0xTheProDev/nestjs-clean-example?style=for-the-badge)](https://github.com/0xTheProDev/nestjs-clean-example/issues)
[![Closed Issues](https://img.shields.io/github/issues-closed-raw/0xTheProDev/nestjs-clean-example?style=for-the-badge)](https://github.com/0xTheProDev/nestjs-clean-example/issues?q=is%3Aissue+is%3Aclosed)
[![Open Pulls](https://img.shields.io/github/issues-pr-raw/0xTheProDev/nestjs-clean-example?style=for-the-badge)](https://github.com/0xTheProDev/nestjs-clean-example/pulls)
[![Closed Pulls](https://img.shields.io/github/issues-pr-closed-raw/0xTheProDev/nestjs-clean-example?style=for-the-badge)](https://github.com/0xTheProDev/nestjs-clean-example/pulls?q=is%3Apr+is%3Aclosed)
[![Contributors](https://img.shields.io/github/contributors/0xTheProDev/nestjs-clean-example?style=for-the-badge)](https://github.com/0xTheProDev/nestjs-clean-example/graphs/contributors)
[![Activity](https://img.shields.io/github/last-commit/0xTheProDev/nestjs-clean-example?style=for-the-badge&label=most%20recent%20activity)](https://github.com/0xTheProDev/nestjs-clean-example/pulse)

## Description

_Example Application Interface using NestJS framework in TypeScript_

This example showcases Repository Pattern in Hexagonal Architecture _(also known as Clean Architecture)_. Here we have two Entities - Books and Authors, whose relationships have been exploited to create CRUD endpoint in REST under OpenAPI standard.

## Installation

- Install all the project dependency using [Yarn](https://yarnpkg.com):

```sh
$ yarn
```

- Run the application from command prompt:

```sh
$ yarn start
```

## Testing

- Run the following command to initiate Unit test:
```sh
$ yarn test
```
- Run the following command to initiate E2E test:
```sh
$ yarn test:e2e
```

## License

© MIT License