Skip to content

Api de notificações criada com Nest.JS visando aprendizado da fermenta, conteúdo ministrado por RocketSeat

Notifications You must be signed in to change notification settings

Ndrake337/Basic-Notification-Services

Repository files navigation

BASIC NOTIFICATION SERVICES

A text notification example API, created for the purpose of study Nest.JS

license last-commit repo-top-language repo-language-count

Developed with the software and tools below.

JavaScript Prettier Jest ESLint tsnode TypeScript Prisma JSON


🔗 Quick Links


📍 Overview

An API focused on generating notification messages, created while studying Nest.JS on the RocketSeat Education Plataform


📂 Repository Structure

└── BasicNotificationServices/
    ├── jest.config.ts
    ├── nest-cli.json
    ├── package-lock.json
    ├── package.json
    ├── prisma
    │   ├── dev.db
    │   ├── migrations
    │   │   ├── 20221212234813_create_notifications
    │   │   │   └── migration.sql
    │   │   ├── 20221215010910_add_canceled_at
    │   │   │   └── migration.sql
    │   │   └── migration_lock.toml
    │   └── schema.prisma
    ├── src
    │   ├── app.module.ts
    │   ├── app.service.ts
    │   ├── application
    │   │   ├── entities
    │   │   │   ├── content.spec.ts
    │   │   │   ├── content.ts
    │   │   │   ├── notification.spec.ts
    │   │   │   └── notification.ts
    │   │   ├── repositories
    │   │   │   └── notifications-repository.ts
    │   │   └── use-cases
    │   │       ├── cancel-notification.spec.ts
    │   │       ├── cancel-notification.ts
    │   │       ├── count-recipient-notifications.spec.ts
    │   │       ├── count-recipient-notifications.ts
    │   │       ├── errors
    │   │       │   └── notification-not-found.ts
    │   │       ├── get-recipient-notifications.spec.ts
    │   │       ├── get-recipient-notifications.ts
    │   │       ├── read-notification.spec.ts
    │   │       ├── read-notification.ts
    │   │       ├── send-notification.spec.ts
    │   │       ├── send-notification.ts
    │   │       ├── unread-notification.spec.ts
    │   │       └── unread-notification.ts
    │   ├── helpers
    │   │   ├── Replace.js
    │   │   └── Replace.ts
    │   ├── infra
    │   │   ├── database
    │   │   │   ├── database.module.ts
    │   │   │   └── prisma
    │   │   │       ├── mappers
    │   │   │       ├── prisma.service.ts
    │   │   │       └── repositories
    │   │   └── http
    │   │       ├── controllers
    │   │       │   └── notifications.controller.ts
    │   │       ├── dtos
    │   │       │   └── create-notification-body.ts
    │   │       ├── http.module.ts
    │   │       └── view-models
    │   │           └── notification-view-model.ts
    │   └── main.ts
    ├── test
    │   ├── factories
    │   │   └── notification-factory.ts
    │   ├── jest-e2e.json
    │   └── repositories
    │       └── in-memory-notifications-repository.ts
    ├── tsconfig.build.json
    └── tsconfig.json

🧩 Modules

.
File Summary
tsconfig.build.json ► INSERT-TEXT-HERE
tsconfig.json ► INSERT-TEXT-HERE
jest.config.ts ► INSERT-TEXT-HERE
package.json ► INSERT-TEXT-HERE
nest-cli.json ► INSERT-TEXT-HERE
package-lock.json ► INSERT-TEXT-HERE
test
File Summary
jest-e2e.json ► INSERT-TEXT-HERE
test.factories
File Summary
notification-factory.ts ► INSERT-TEXT-HERE
test.repositories
File Summary
in-memory-notifications-repository.ts ► INSERT-TEXT-HERE
src
File Summary
app.module.ts ► INSERT-TEXT-HERE
main.ts ► INSERT-TEXT-HERE
app.service.ts ► INSERT-TEXT-HERE
src.helpers
File Summary
Replace.js ► INSERT-TEXT-HERE
Replace.ts ► INSERT-TEXT-HERE
src.application.repositories
File Summary
notifications-repository.ts ► INSERT-TEXT-HERE
src.application.entities
File Summary
notification.ts ► INSERT-TEXT-HERE
content.ts ► INSERT-TEXT-HERE
notification.spec.ts ► INSERT-TEXT-HERE
content.spec.ts ► INSERT-TEXT-HERE
src.application.use-cases
File Summary
read-notification.ts ► INSERT-TEXT-HERE
send-notification.spec.ts ► INSERT-TEXT-HERE
get-recipient-notifications.ts ► INSERT-TEXT-HERE
get-recipient-notifications.spec.ts ► INSERT-TEXT-HERE
send-notification.ts ► INSERT-TEXT-HERE
read-notification.spec.ts ► INSERT-TEXT-HERE
unread-notification.ts ► INSERT-TEXT-HERE
count-recipient-notifications.ts ► INSERT-TEXT-HERE
count-recipient-notifications.spec.ts ► INSERT-TEXT-HERE
cancel-notification.spec.ts ► INSERT-TEXT-HERE
cancel-notification.ts ► INSERT-TEXT-HERE
unread-notification.spec.ts ► INSERT-TEXT-HERE
src.application.use-cases.errors
File Summary
notification-not-found.ts ► INSERT-TEXT-HERE
src.infra.http
File Summary
http.module.ts ► INSERT-TEXT-HERE
src.infra.http.view-models
File Summary
notification-view-model.ts ► INSERT-TEXT-HERE
src.infra.http.dtos
File Summary
create-notification-body.ts ► INSERT-TEXT-HERE
src.infra.http.controllers
File Summary
notifications.controller.ts ► INSERT-TEXT-HERE
src.infra.database
File Summary
database.module.ts ► INSERT-TEXT-HERE
src.infra.database.prisma
File Summary
prisma.service.ts ► INSERT-TEXT-HERE
src.infra.database.prisma.repositories
File Summary
prisma-notifications-repository.ts ► INSERT-TEXT-HERE
src.infra.database.prisma.mappers
File Summary
prisma-notification-mapper.ts ► INSERT-TEXT-HERE
prisma
File Summary
schema.prisma ► INSERT-TEXT-HERE
prisma.migrations
File Summary
migration_lock.toml ► INSERT-TEXT-HERE
prisma.migrations.20221212234813_create_notifications
File Summary
migration.sql ► INSERT-TEXT-HERE
prisma.migrations.20221215010910_add_canceled_at
File Summary
migration.sql ► INSERT-TEXT-HERE

🚀 Getting Started

Requirements

Ensure you have the following dependencies installed on your system:

  • TypeScript: version x.y.z

⚙️ Installation

  1. Clone the BasicNotificationServices repository:
git clone https://github.com/Ndrake337/BasicNotificationServices
  1. Change to the project directory:
cd BasicNotificationServices
  1. Install the dependencies:
npm install

🤖 Running BasicNotificationServices

Use the following command to run BasicNotificationServices:

npm run build && node dist/main.js

🧪 Tests

To execute tests, run:

npm test

🤝 Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your GitHub account.
  2. Clone Locally: Clone the forked repository to your local machine using a Git client.
    git clone https://github.com/Ndrake337/BasicNotificationServices
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to GitHub: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.

Once your PR is reviewed and approved, it will be merged into the main branch.


📄 License

This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.


👏 Acknowledgments

  • List any resources, contributors, inspiration, etc. here.

Return


About

Api de notificações criada com Nest.JS visando aprendizado da fermenta, conteúdo ministrado por RocketSeat

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published