Skip to content

Commit dfb32bd

Browse files
authored
Update readme file
1 parent b5dc9fe commit dfb32bd

1 file changed

Lines changed: 96 additions & 3 deletions

File tree

README.md

Lines changed: 96 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
```markdown
12
# NotifyLog
23

34
![Build Status](https://img.shields.io/github/workflow/status/your-username/notifylog/CI/main)
@@ -33,7 +34,7 @@
3334
- **Tools**: Prisma, GraphQL Playground, Prettier, ESLint, Docker
3435

3536
## Clean Architecture
36-
**NotifyLog** adheres to **clean architecture** and **SOLID principles**, ensuring modularity, testability, and maintainability. Key layers include:
37+
**NotifyLog** follows **clean architecture** and **SOLID principles**, ensuring modularity, testability, and maintainability. Key layers include:
3738

3839
- **Domain** (`apps/notifylog-api/src/domain/`): Defines interfaces (e.g., `INotificationRepository`, `IWebhookRepository`) for business logic, independent of frameworks (Single Responsibility).
3940
- **Application** (`apps/notifylog-api/src/application/`): Implements business rules via factories (`NotificationFactory`) and strategies (`EmailNotificationStrategy`, `SMSNotificationStrategy`) (Dependency Inversion).
@@ -43,7 +44,7 @@
4344
Shared utilities and logging are abstracted into `libs/` for reusability across apps.
4445

4546
## Project Structure
46-
47+
```
4748
notifylog/
4849
├── apps/ # Monorepo applications
4950
│ ├── notifylog-api/ # NestJS microservice (GraphQL + Notification logic)
@@ -135,4 +136,96 @@ notifylog/
135136
├── README.md
136137
├── CONTRIBUTING.md
137138
├── CODE_OF_CONDUCT.md
138-
└── LICENSE
139+
├── LICENSE
140+
```
141+
142+
## Getting Started (Backend)
143+
### Prerequisites
144+
- Node.js (>=18.x)
145+
- MongoDB (local or Atlas)
146+
- Yarn or npm
147+
- Docker (optional)
148+
149+
### Installation
150+
1. Clone the repository:
151+
```bash
152+
git clone https://github.com/your-username/notifylog.git
153+
cd notifylog
154+
```
155+
2. Install dependencies:
156+
```bash
157+
yarn install
158+
```
159+
3. Set up environment variables:
160+
```bash
161+
cp apps/notifylog-api/.env.example apps/notifylog-api/.env
162+
```
163+
Update `apps/notifylog-api/.env`:
164+
```env
165+
DATABASE_URL=mongodb://localhost:27017/notifylog
166+
```
167+
4. Run Prisma migrations:
168+
```bash
169+
cd apps/notifylog-api
170+
npx prisma migrate dev
171+
```
172+
5. Start the backend:
173+
```bash
174+
yarn workspace notifylog-api start:dev
175+
```
176+
177+
### Docker Setup
178+
Run both backend and frontend with Docker:
179+
```bash
180+
docker-compose up --build
181+
```
182+
183+
## Frontend Setup
184+
### Prerequisites
185+
- Node.js (>=18.x)
186+
- Backend running at `http://localhost:3000`
187+
188+
### Installation
189+
1. Install frontend dependencies:
190+
```bash
191+
cd apps/notifylog-ui
192+
yarn install
193+
```
194+
2. Run the frontend:
195+
```bash
196+
yarn dev
197+
```
198+
3. Access at `http://localhost:3001`.
199+
200+
## API Documentation
201+
Explore the **GraphQL API** via **GraphQL Playground** at [http://localhost:3000/graphql](http://localhost:3000/graphql). Example query:
202+
```graphql
203+
mutation SendNotification {
204+
sendNotification(input: {
205+
type: "EMAIL"
206+
to: "example@domain.com"
207+
subject: "Welcome!"
208+
message: "Hello from NotifyLog!"
209+
}) {
210+
success
211+
messageId
212+
}
213+
}
214+
```
215+
216+
## Testing
217+
Run tests with Jest:
218+
```bash
219+
yarn test
220+
```
221+
Generate coverage:
222+
```bash
223+
yarn test:cov
224+
```
225+
226+
## Contributing
227+
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines and [issues](https://github.com/your-username/notifylog/issues) for tasks (`good first issue`, `hacktoberfest`). Use issue templates in `.github/ISSUE_TEMPLATE`. Join our [Discord](https://discord.gg/your-invite-link).
228+
229+
## License
230+
MIT License. See [LICENSE](LICENSE).
231+
```

0 commit comments

Comments
 (0)