Skip to content

Commit 91d5ea2

Browse files
authored
Update README.md
1 parent 3d986f4 commit 91d5ea2

1 file changed

Lines changed: 22 additions & 71 deletions

File tree

README.md

Lines changed: 22 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,45 @@
11
# NotifyLog
22

3-
![Build Status](https://img.shields.io/github/workflow/status/your-username/NotifyLog/CI/main)
4-
![License](https://img.shields.io/github/license/your-username/NotifyLog)
5-
![GitHub Stars](https://img.shields.io/github/stars/your-username/NotifyLog)
3+
![Build Status](https://img.shields.io/github/workflow/status/your-username/notifylog/CI/main)
4+
![License](https://img.shields.io/github/license/your-username/notifylog)
5+
![GitHub Stars](https://img.shields.io/github/stars/your-username/notifylog)
66

7-
**NotifyLog** is a full-stack Node.js/NestJS microservice built with clean architecture and SOLID principles, designed for sending email/SMS notifications, logging messages/errors, and managing webhooks. It’s portable, modular, and paired with a Next.js/React frontend to visualize notification and error log history. Features an interactive **Swagger UI** for API exploration.
7+
**NotifyLog** is a full-stack Node.js/NestJS microservice built with **clean architecture** and **SOLID principles**, designed for sending email/SMS notifications, logging messages/errors, and managing webhooks. It’s portable, modular, and paired with a Next.js/React frontend dashboard for visualizing notification and error log history. Features a **GraphQL API** for flexible querying.
88

99
## Table of Contents
1010
- [Features](#features)
1111
- [Tech Stack](#tech-stack)
12+
- [Clean Architecture](#clean-architecture)
13+
- [Project Structure](#project-structure)
1214
- [Getting Started](#getting-started)
1315
- [Frontend Setup](#frontend-setup)
1416
- [API Documentation](#api-documentation)
17+
- [Testing](#testing)
1518
- [Contributing](#contributing)
1619
- [License](#license)
1720

1821
## Features
1922
- Send notifications (email/SMS) with a strategy pattern.
20-
- Dual logging: Winston for info logs, MongoDB for error logs.
23+
- Centralized logging with Winston and MongoDB transport.
2124
- Webhook subscriptions for real-time event notifications.
22-
- Advanced log filtering and retrieval.
23-
- Next.js/React frontend for notification and error log history.
24-
- **Swagger UI** for interactive API documentation.
25+
- Advanced log filtering and retrieval via GraphQL.
26+
- Next.js/React frontend dashboard for notification and error log history.
27+
- **GraphQL API** for flexible, type-safe queries.
28+
- Extensible and portable for integration into any project.
2529

2630
## Tech Stack
27-
- **Backend**: Node.js, NestJS, MongoDB, Mongoose, Winston, TypeScript
31+
- **Backend**: Node.js, NestJS, GraphQL, Prisma, MongoDB, Winston, TypeScript
2832
- **Frontend**: Next.js, React, Tailwind CSS, React Query
29-
- **Tools**: Swagger UI, Prettier, ESLint
33+
- **Tools**: Prisma, GraphQL Playground, Prettier, ESLint, Docker
3034

31-
## Getting Started (Backend)
32-
### Prerequisites
33-
- Node.js (>=18.x)
34-
- MongoDB (local or Atlas)
35-
- Git
35+
## Clean Architecture
36+
**NotifyLog** adheres to **clean architecture** and **SOLID principles**, ensuring modularity, testability, and maintainability. Key layers include:
3637

37-
### Installation
38-
1. Clone the repository:
39-
```bash
40-
git clone https://github.com/your-username/NotifyLog.git
41-
cd NotifyLog
38+
- **Domain** (`apps/notifylog-api/src/domain/`): Defines interfaces (e.g., `INotificationRepository`, `IWebhookRepository`) for business logic, independent of frameworks (Single Responsibility).
39+
- **Application** (`apps/notifylog-api/src/application/`): Implements business rules via factories (`NotificationFactory`) and strategies (`EmailNotificationStrategy`, `SMSNotificationStrategy`) (Dependency Inversion).
40+
- **Infrastructure** (`apps/notifylog-api/src/infrastructure/`): Handles persistence (`prisma/schema.prisma`) and repositories (`NotificationRepository`, `WebhookRepository`) (Open/Closed).
41+
- **Presentation** (`apps/notifylog-api/src/presentation/`): Exposes GraphQL APIs through resolvers (`NotificationResolver`, `WebhookResolver`, `LogResolver`) (Interface Segregation).
4242

43+
Shared utilities and logging are abstracted into `libs/` for reusability across apps.
4344

44-
Install dependencies:npm install
45-
46-
47-
Create .env:MONGO_URI=mongodb://localhost:27017/notifylog
48-
49-
50-
Start MongoDB:mongod
51-
52-
53-
Run the backend:npm run start
54-
55-
56-
57-
Testing
58-
59-
Access Swagger UI: http://localhost:3000/api
60-
Send notification:curl -X POST http://localhost:3000/api/notifications \
61-
-H 'Content-Type: application/json' \
62-
-d '{"recipient":"test@example.com","subject":"Test","body":"Message ID: MSG123.","mediaType":"EMAIL","notificationType":"message-id"}'
63-
64-
65-
Get logs:curl http://localhost:3000/api/logs?level=error&context=NotificationController
66-
67-
68-
69-
Frontend Setup
70-
Prerequisites
71-
72-
Node.js (>=18.x)
73-
Backend running at http://localhost:3000
74-
75-
Installation
76-
77-
Clone the frontend (or navigate to directory):git clone https://github.com/your-username/notifylog-frontend.git
78-
cd notifylog-frontend
79-
80-
81-
Install dependencies:npm install
82-
83-
84-
Run the frontend:npm run dev
85-
86-
87-
Access at http://localhost:3001.
88-
89-
API Documentation
90-
Explore APIs interactively via Swagger UI at http://localhost:3000/api. Test endpoints like /api/notifications, /api/webhooks, and /api/logs with a user-friendly interface.
91-
Contributing
92-
Contributions are welcome! Check CONTRIBUTING.md for guidelines and issues for tasks (good first issue, hacktoberfest). Join our Discord.
93-
License
94-
MIT License. See LICENSE.```
45+
## Project Structure

0 commit comments

Comments
 (0)