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

https://github.com/iwatanikenji/notifications-service

Notification-based microservice that includes unit testing and clean project architecture
https://github.com/iwatanikenji/notifications-service

factory-pattern microservice nestjs prisma repository-pattern

Last synced: 23 days ago
JSON representation

Notification-based microservice that includes unit testing and clean project architecture

Awesome Lists containing this project

README

        

NOTIFICATIONS SERVICE

Summary


📙 About
📖 How to Start
💡 Features
💻 Technologies


✔️ Notifications Service finished ✔️

📙 About

Notifications Service is a simple microservice application developed for reinforcement of some concepts such as repository pattern, in memory database and prisma basics. It includes unit testing for most of the content created.

On this project development, the intention was to provide a very organized and well structured app architecture despite of its simplicity.

Originally created on Ignite Lab from Rocketseat and made by Kenji Iwatani

---

📖 How to Start

```bash
# Clone this repository
$ git clone https://github.com/iwataniKenji/notifications-service

# Access the project directory
$ cd notifications-service

# Install dependencies
$ npm install

# Rename '.env.example' to '.env' and set your env variable
$ ren ".env.example" ".env"

# With a PostgreSQL running, run the migrations
$ npx prisma migrate dev

# Start the server
$ npm run dev
```

---

💡 Concepts

- [x] Microservice system
- [x] Dependency injection
- [x] Dependency inversion
- [x] Unit testing
- [x] Value object (split object attribute into separate class for validation and formatting purposes)
- [x] Repository pattern (between application and persistence layer)
- [x] In memory database (useful for unit testing without requiring database connection)
- [x] Factory pattern (abstracts creation of objects)
- [x] Mappers

---

💻 Technologies

- [x] NestJS
- [x] Typescript
- [x] Prisma