Skip to content

ahmadmdabit/NotificationSystem

Repository files navigation

NotificationSystem πŸ“’

Ask DeepWiki .NET License

πŸ“‹ Table of Contents

πŸ“– Overview

A modern, scalable notification system built with .NET Core using a microservices architecture. This project demonstrates best practices in software design, including separation of concerns, clean architecture, and API gateway pattern implementation.

The application consists of multiple components:

  • Microservices: UserService and NotificationService for handling business logic
  • API Gateway: Centralized routing using Ocelot
  • Web UI: MVC application with responsive design
  • Shared Libraries: Common, DAL, BLL, and API layers for code reuse

✨ Key Features

  • πŸ“§ Notification Management: Create, send, and track notifications
  • πŸ‘€ User Management: User registration and profile management
  • πŸ”Œ Microservices Architecture: Independent, scalable services
  • πŸšͺ API Gateway: Centralized request routing and management
  • πŸ“š API Documentation: Interactive Swagger UI for all services
  • 🎨 Responsive UI: Modern web interface using Bootstrap and jQuery
  • πŸ—„οΈ Local Database: SQL Server LocalDB with Dapper ORM
  • πŸ”’ CORS Support: Cross-origin resource sharing enabled

πŸ—οΈ Architecture Diagram

Interactive Diagram

The project's diagram

🧰 Tech Stack

Layer Technology
Framework ASP.NET Core 3.1
Architecture Microservices with API Gateway
Languages C#
Database SQL Server LocalDB (Dapper ORM)
API Gateway Ocelot
Frontend ASP.NET Core MVC (Bootstrap, jQuery)
API Documentation Swagger/OpenAPI
HTTP Client RestSharp

πŸš€ Getting Started

Prerequisites

  • .NET Core 3.1 SDK
  • Visual Studio or Visual Studio Code
  • SQL Server LocalDB (included with Visual Studio)

Installation

  1. Clone the repository:

    git clone https://github.com/ahmadmdabit/NotificationSystem.git
    cd NotificationSystem
  2. Build the solution:

    dotnet build

Running the Application

  1. Start the microservices:

    # In separate terminals
    cd UserService && dotnet run
    cd NotificationService && dotnet run
    cd ApiGateway && dotnet run
    cd UI && dotnet run
  2. Or use the watch command for development:

    # In separate terminals
    cd UserService && dotnet watch run
    cd NotificationService && dotnet watch run
    cd ApiGateway && dotnet watch run
    cd UI && dotnet watch run

Service Ports

Service URL
UserService https://localhost:44344
NotificationService https://localhost:44314
ApiGateway https://localhost:44315
UI https://localhost:[port]

πŸ“ Project Structure

β”œβ”€β”€ Common/
β”‚   β”œβ”€β”€ Common Library (.NET Standard 2.0)
β”‚   β”œβ”€β”€ DAL Library (.NET Standard 2.0) - Dapper & SQL Server
β”‚   β”œβ”€β”€ BLL Library (.NET Standard 2.0)
β”‚   └── API Library (.NET Standard 2.0) - Swagger
β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ UserService (ASP.NET Core 3.1 RESTful API)
β”‚   └── NotificationService (ASP.NET Core 3.1 RESTful API)
β”œβ”€β”€ ApiGateway/ (Ocelot API Gateway)
└── UI/ (ASP.NET Core 3.1 MVC - Bootstrap/jQuery)

πŸ“š API Documentation

Each microservice includes interactive Swagger documentation:

  • UserService: https://localhost:44344/swagger
  • NotificationService: https://localhost:44314/swagger

The documentation provides:

  • Complete endpoint list
  • Request/response schemas
  • Interactive testing interface

πŸ› οΈ Development

Architecture Details

This N-Tier architecture promotes maintainability and scalability:

  1. Common Layer: Shared entities, helpers, and interfaces
  2. DAL Layer: Database operations using Dapper ORM
  3. BLL Layer: Business logic implementation
  4. API Layer: Shared controllers and contracts with Swagger
  5. Services: RESTful microservices exposing business functionality
  6. ApiGateway: Centralized routing and request management
  7. UI: Responsive web interface with AJAX communication

Adding New Features

  1. Define entities in Common/Entities
  2. Create repository interfaces in DAL/Repository
  3. Implement repositories in DAL/Repository
  4. Create business interfaces in BLL/Business
  5. Implement business logic in BLL/Business
  6. Add controllers in API/Controller
  7. Register services in the microservice's Startup.cs
  8. Add routing in ApiGateway/ocelot.json
  9. Create UI pages if needed

πŸ“„ License

Licensed under the MIT license.

About

A modern, scalable notification system built with .NET Core using a microservices architecture. This project demonstrates best practices in software design, including separation of concerns, clean architecture, and API gateway pattern implementation.

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors