A text notification example API, created for the purpose of study Nest.JS
Developed with the software and tools below.
An API focused on generating notification messages, created while studying Nest.JS on the RocketSeat Education Plataform
└── 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
.
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 |
Requirements
Ensure you have the following dependencies installed on your system:
- TypeScript:
version x.y.z
- Clone the BasicNotificationServices repository:
git clone https://github.com/Ndrake337/BasicNotificationServices
- Change to the project directory:
cd BasicNotificationServices
- Install the dependencies:
npm install
Use the following command to run BasicNotificationServices:
npm run build && node dist/main.js
To execute tests, run:
npm test
Contributions are welcome! Here are several ways you can contribute:
- Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
- Report Issues: Submit bugs found or log feature requests for Basicnotificationservices.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your GitHub account.
- Clone Locally: Clone the forked repository to your local machine using a Git client.
git clone https://github.com/Ndrake337/BasicNotificationServices
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to GitHub: Push the changes to your forked repository.
git push origin new-feature-x
- 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.
This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.
- List any resources, contributors, inspiration, etc. here.