Skip to content

Commit 758a315

Browse files
committed
2 parents 614bf04 + 541fda6 commit 758a315

2 files changed

Lines changed: 288 additions & 70 deletions

File tree

.github/workflows/deno.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# This workflow will install Deno then run `deno lint` and `deno test`.
7+
# For more information see: https://github.com/denoland/setup-deno
8+
9+
name: Deno
10+
11+
on:
12+
push:
13+
branches: ["main"]
14+
pull_request:
15+
branches: ["main"]
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
test:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Setup repo
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Deno
29+
# uses: denoland/setup-deno@v1
30+
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2
31+
with:
32+
deno-version: v1.x
33+
34+
# Uncomment this step to verify the use of 'deno fmt' on each commit.
35+
# - name: Verify formatting
36+
# run: deno fmt --check
37+
38+
- name: Run linter
39+
run: deno lint
40+
41+
- name: Run tests
42+
run: deno test -A

README.md

Lines changed: 246 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,274 @@
1-
<p align="center">
2-
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
3-
</p>
4-
5-
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
6-
[circleci-url]: https://circleci.com/gh/nestjs/nest
7-
8-
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
9-
<p align="center">
10-
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
11-
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
12-
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
13-
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
14-
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
15-
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
16-
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
17-
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
18-
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
19-
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
20-
</p>
21-
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
22-
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
23-
24-
## Description
25-
26-
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
27-
28-
## Project setup
1+
# 📬 NotifyLog
292

30-
```bash
31-
$ npm install
32-
```
3+
> A microservice-based Notification Logger built with NestJS and Next.js to send, track, and analyze Email, SMS, and Webhook messages.
4+
5+
![CI](https://img.shields.io/github/actions/workflow/status/yourusername/notifylog/ci.yml?branch=main)
6+
![License](https://img.shields.io/github/license/yourusername/notifylog)
7+
![Node.js](https://img.shields.io/badge/node-%3E=18.x-green)
8+
![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)
9+
10+
---
11+
12+
## 🌟 Highlights
13+
14+
- 🚀 Microservice architecture using **NestJS**
15+
- 🌐 Clean and powerful **GraphQL API**
16+
- ✉️ Supports Email, SMS, and Webhook notifications
17+
- 📦 Centralized logging using **Winston** + **MongoDB**
18+
- 🎯 Extensible via plug-and-play notification providers
19+
- 🧪 Tested with **Jest** and designed for scalability
20+
- 💻 Lightweight **Next.js** frontend dashboard
21+
22+
---
23+
24+
## 📖 Overview
25+
26+
**NotifyLog** is a robust, plug-and-play Node.js-based notification microservice designed to handle multi-channel communication like Email, SMS, and Webhooks, all with centralized logging and GraphQL API support. Built using **NestJS** and **Next.js**, it follows clean architecture principles and is deployable in a distributed, containerized environment.
27+
28+
Use NotifyLog as:
29+
- A backend service for sending and tracking messages
30+
- A standalone logger for notification events
31+
- An integration-ready module in any SaaS or enterprise app
32+
33+
---
34+
Sure! Here's a clean and properly formatted `README.md` file that includes all the content you provided:
3335

34-
## Compile and run the project
36+
---
37+
38+
```markdown
39+
# NotifyLog 🚨
40+
41+
A notification management system with logging, monitoring, and multi-channel delivery support.
42+
43+
---
44+
45+
## ⚙️ Setup & Installation
46+
47+
### 🔧 Prerequisites
48+
49+
- **Node.js** ≥ 18.x
50+
- **Yarn** or **npm**
51+
- **MongoDB** or **MongoDB Atlas**
52+
- **Docker** (optional)
53+
54+
---
55+
56+
## 🚀 Run Locally
3557

3658
```bash
37-
# development
38-
$ npm run start
59+
# Clone repo
60+
git clone https://github.com/yourusername/notifylog.git && cd notifylog
61+
62+
# Install dependencies
63+
yarn install
3964

40-
# watch mode
41-
$ npm run start:dev
65+
# Setup environment variables
66+
cp .env.example .env
67+
# Fill in your email/SMS API keys, Mongo URI, etc.
4268

43-
# production mode
44-
$ npm run start:prod
69+
# Start backend
70+
yarn start:dev:api
71+
72+
# Start frontend
73+
yarn start:dev:ui
4574
```
4675

47-
## Run tests
76+
---
77+
78+
## 🐳 Run with Docker
4879

4980
```bash
50-
# unit tests
51-
$ npm run test
81+
docker-compose up --build
82+
```
5283

53-
# e2e tests
54-
$ npm run test:e2e
84+
---
5585

56-
# test coverage
57-
$ npm run test:cov
58-
```
86+
## 📌 Features
87+
88+
✅ GraphQL API to manage notifications, logs, and subscriptions
89+
📧 Email Module (send emails using SendGrid/Mailgun)
90+
📲 SMS Module (Twilio integration)
91+
🔔 Webhook Support (event-based triggers to external services)
92+
📝 MongoDB Logging with Winston (request/response/errors)
93+
🧩 Extensible Providers (add your own integrations easily)
94+
💻 Next.js UI for monitoring and manual message dispatch
5995

60-
## Deployment
96+
---
97+
98+
## 🔬 Example GraphQL Query
99+
100+
```graphql
101+
mutation SendEmail {
102+
sendNotification(input: {
103+
type: "EMAIL",
104+
to: "example@domain.com",
105+
subject: "Welcome!",
106+
message: "Hello from NotifyLog!"
107+
}) {
108+
success
109+
messageId
110+
}
111+
}
112+
```
61113

62-
When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.
114+
---
63115

64-
If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
116+
## 🧪 Testing
65117

66118
```bash
67-
$ npm install -g @nestjs/mau
68-
$ mau deploy
119+
# Run all tests
120+
yarn test
121+
122+
# Run coverage
123+
yarn test:cov
69124
```
70125

71-
With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
126+
---
127+
128+
## 📈 Roadmap
129+
130+
- WebSocket-based real-time logs
131+
- Retry strategy for failed webhook calls
132+
- Admin dashboard analytics
133+
- SMTP transport fallback
134+
- Mobile-friendly UI
135+
136+
---
137+
138+
## 🤝 Contributing
72139

73-
## Resources
140+
We welcome contributions of all kinds!
74141

75-
Check out a few resources that may come in handy when working with NestJS:
142+
1. Fork the repo
143+
2. Create your feature branch: `git checkout -b feat/amazing-feature`
144+
3. Commit your changes: `git commit -am 'Add amazing feature'`
145+
4. Push to the branch: `git push origin feat/amazing-feature`
146+
5. Open a pull request
76147

77-
- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
78-
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
79-
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
80-
- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
81-
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
82-
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
83-
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
84-
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).
148+
For more info, see [CONTRIBUTING.md](CONTRIBUTING.md)
85149

86-
## Support
150+
---
87151

88-
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
152+
## 🐛 Issue Templates
89153

90-
## Stay in touch
154+
Need to report a bug or request a feature? Use the templates in `.github/ISSUE_TEMPLATE`:
91155

92-
- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
93-
- Website - [https://nestjs.com](https://nestjs.com/)
94-
- Twitter - [@nestframework](https://twitter.com/nestframework)
156+
- 🐞 Bug Report
157+
- ✨ Feature Request
158+
- 📚 Documentation Update
159+
- 🆕 Good First Issue
95160

96-
## License
161+
---
97162

98-
Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
163+
## 🛡 License
164+
165+
This project is licensed under the MIT License.
166+
167+
---
168+
169+
## 📣 Contact & Credits
170+
171+
Maintained by **Your Name** – feel free to connect on [LinkedIn] or [Twitter].
172+
173+
Special thanks to all contributors 💖
174+
```
175+
176+
---
177+
178+
Let me know if you'd like this customized with your actual GitHub username, social links, or any branding tweaks!
179+
180+
## 📂 Project Structure
181+
182+
```bash
183+
notifylog/
184+
├── apps/
185+
│ ├── notifylog-api/
186+
│ │ ├── src/
187+
│ │ │ ├── application/
188+
│ │ │ │ ├── factories/
189+
│ │ │ │ │ └── notification.factory.ts
190+
│ │ │ │ └── strategies/
191+
│ │ │ │ ├── email-notification.strategy.ts
192+
│ │ │ │ └── sms-notification.strategy.ts
193+
│ │ │ ├── domain/
194+
│ │ │ │ └── interfaces/
195+
│ │ │ │ ├── notification-repository.interface.ts
196+
│ │ │ │ └── webhook-repository.interface.ts
197+
│ │ │ ├── infrastructure/
198+
│ │ │ │ └── repositories/
199+
│ │ │ │ ├── notification.repository.ts
200+
│ │ │ │ └── webhook.repository.ts
201+
│ │ │ ├── presentation/
202+
│ │ │ │ └── resolvers/
203+
│ │ │ │ ├── notification.resolver.ts
204+
│ │ │ │ ├── webhook.resolver.ts
205+
│ │ │ │ └── log.resolver.ts
206+
│ │ │ ├── dto/
207+
│ │ │ │ └── notification.dto.ts
208+
│ │ │ ├── services/
209+
│ │ │ │ └── log.service.ts
210+
│ │ │ ├── app.module.ts
211+
│ │ │ └── main.ts
212+
│ │ ├── package.json
213+
│ │ ├── tsconfig.json
214+
│ │ └── .env.example
215+
│ └── notifylog-ui/
216+
│ ├── src/
217+
│ │ ├── app/
218+
│ │ │ ├── page.tsx
219+
│ │ │ ├── notifications/
220+
│ │ │ │ └── page.tsx
221+
│ │ │ ├── errors/
222+
│ │ │ │ └── page.tsx
223+
│ │ │ ├── layout.tsx
224+
│ │ │ └── globals.css
225+
│ │ ├── components/
226+
│ │ │ ├── Header.tsx
227+
│ │ │ ├── NotificationTable.tsx
228+
│ │ │ └── ErrorTable.tsx
229+
│ │ └── lib/
230+
│ │ ├── api.ts
231+
│ │ └── types.ts
232+
│ ├── public/
233+
│ ├── package.json
234+
│ └── next.config.js
235+
├── libs/
236+
│ ├── logger/
237+
│ │ ├── src/
238+
│ │ │ ├── interfaces/
239+
│ │ │ │ └── log-repository.interface.ts
240+
│ │ │ ├── persistence/
241+
│ │ │ │ └── logger.schema.ts
242+
│ │ │ ├── repositories/
243+
│ │ │ │ └── log.repository.ts
244+
│ │ │ └── services/
245+
│ │ │ ├── logger.service.file.ts
246+
│ │ │ └── logger.service.db.ts
247+
│ │ ├── package.json
248+
│ │ └── tsconfig.json
249+
│ └── utils/
250+
│ ├── src/
251+
│ │ ├── helpers/
252+
│ │ │ ├── string.utils.ts
253+
│ │ │ └── validation.utils.ts
254+
│ │ ├── interceptors/
255+
│ │ │ └── logging.interceptor.ts
256+
│ │ └── constants/
257+
│ │ └── app.constants.ts
258+
│ ├── package.json
259+
│ └── tsconfig.json
260+
├── prisma/
261+
│ ├── schema.prisma
262+
│ └── migrations/
263+
├── docker/
264+
│ ├── Dockerfile.api
265+
│ ├── Dockerfile.ui
266+
│ └── docker-compose.yml
267+
├── .github/
268+
│ ├── ISSUE\_TEMPLATE/
269+
│ └── workflows/
270+
│ └── ci.yml
271+
├── README.md
272+
├── CONTRIBUTING.md
273+
├── CODE\_OF\_CONDUCT.md
274+
├── LICENSE

0 commit comments

Comments
 (0)