https://github.com/alejandro945/ttt-auth-microservice
An architectural style that structures an application as a collection of services that are Highly maintainable and testable and Loosely coupled
https://github.com/alejandro945/ttt-auth-microservice
authentication endpoint microservices nestts
Last synced: 3 months ago
JSON representation
An architectural style that structures an application as a collection of services that are Highly maintainable and testable and Loosely coupled
- Host: GitHub
- URL: https://github.com/alejandro945/ttt-auth-microservice
- Owner: alejandro945
- Created: 2022-05-02T20:57:29.000Z (about 3 years ago)
- Default Branch: TA-10-CREATE-AUTH-MICROSERVICE
- Last Pushed: 2022-05-03T03:49:51.000Z (about 3 years ago)
- Last Synced: 2024-12-27T02:14:04.503Z (5 months ago)
- Topics: authentication, endpoint, microservices, nestts
- Language: TypeScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
![]()
# Auth Microservice ☄️
**The Microservice architecture**: Is an architectural style that structures an application as a collection of services that are:
- Highly maintainable and testable
- Loosely coupled
- Independently deployable
- Organized around business capabilitiesMicroservices approach is all about handling a complex system, but in order to do so, the approach introduces its own set of complexities and implementation challenges. which we will learn in the next part of this series!
# 🗺 Roadmap
| Resources | Description |
| ------------- | - |
| 🧶 **[Framework]** | New using Nest? Here's everything you need to know! |
| 🧅 **[Clean Architecture]** | Minimize the human resources required to build and maintain the required system. |
| 🎉 **[Functional Guide]** | Build production ML pipelines with simple functions. |[Framework]: https://docs.nestjs.com/
[Clean Architecture]: https://www.freecodecamp.org/news/a-quick-introduction-to-clean-architecture-990c014448d2/
[Functional Guide]: https://github.com/alejandro945## Nest as Backend Framework 🐱
### ¿Why Nest?
Nest natively supports the microservice architectural style of development. In Nest, a microservice is fundamentally an application that uses a different transport layer than HTTP. But this does not only stay here Nest supports several built-in **transport layer** implementations, called transporters, which are responsible for transmitting messages between different microservice instances.
### Configuration ⚡️
**1-Package Installation**
```bash
npm i --save @nestjs/microservices
```**2-Instantiate a Microservice**
```ts
import { NestFactory } from '@nestjs/core';
import { Transport, MicroserviceOptions } from '@nestjs/microservices';
import { AppModule } from './app.module';async function bootstrap() {
const app = await NestFactory.createMicroservice(
AppModule,
{
transport: Transport.TCP,
},
);
app.listen();
}
bootstrap();
```### Clean Architecture 🧼

This diagram is taken from the official article by Robert C. Martin.Each circle represents different areas of the software. The outermost layer is the lowest level of the software and as we move in deeper, the level will be higher. In general, as we move in deeper, the layer is less prone to change.
## Folder Structure
```bash
ttt-auth-microservice
|- node_modules
|- src
|- application
|- config
|- environment.ts
|- app.ts
|- domain
|- models
|- use-cases
|- impl
|- infrastructure
|- driven-adapters
|- adapters
|- providers
|- entry-points
|- api
|- index.ts
|- tests
|- domain
|- infrastructure
.env
package.json
READMED.md
```