Skip to content

TaskHub-Server/TaskHub.Shared

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TaskHub.Shared

GitHub stars Sponsor

TaskHub.Shared is a set of small, independent modules that act as the shared foundation for microservices. It provides shared primitives, abstractions, contracts, and infrastructure adapters designed around Domain-Driven Design (DDD) and Clean Architecture principles.

Overview

TaskHub.Shared contains the fundamental components and patterns used across all bounded contexts in TaskHub.

Modules

  • TaskHub.Shared.ValueObjects — Common value objects (e.g., Email, PhoneNumber, Address, Coordinates) used across services.
  • TaskHub.Shared.Domain — Base entities, aggregates, domain events, and helpers for implementing rich domain models.
  • TaskHub.Shared.Response — Unified result system (Result, ValueResult<T>, ResultFactory) for consistent success/error handling.
  • TaskHub.Shared.Services.Abstractions — Common service interfaces for dependency inversion.
  • TaskHub.Shared.Events.Abstractions — Domain event abstractions for cross-service communication and eventual consistency patterns.

Persistence

  • TaskHub.Shared.Persistence.Abstractions — Interfaces for read/write repositories, unit of work, and persistence contracts.
  • TaskHub.Shared.Persistence.EntityFramework — EntityFramework Core helpers, base configurations, and interceptors for database integration.
  • TaskHub.Shared.Persistence.Outbox - Outbox pattern abstractions.
  • TaskHub.Shared.Redis — Integration with Redis for caching and distributed state management.

Authorization

  • TaskHub.Shared.Authorization.Abstractions — Authorization contracts, roles/permissions abstractions, and policies shared across services.
  • TaskHub.Shared.Authorization.Identity — Identity-related models and helpers used by TaskHub services (users, claims, roles).

Tools

  • TaskHub.Shared.Versioning — Shared conventions and helpers for API versioning across TaskHub microservices.
  • TaskHub.Shared.RateLimiter — Reusable rate-limiting primitives and policies for protecting APIs and internal pipelines.

Pipeline

  • TaskHub.Shared.Commands.Abstractions — Abstractions for the command pipeline (interfaces for command handlers, behaviors, buses).
  • TaskHub.Shared.Commands.Bus — Default in-process command bus implementation with behavior orchestration (behaviors pipeline, cross-cutting concerns).

Geocoding

  • TaskHub.Shared.GeoCoding.Abstractions — Abstractions for geocoding providers.
  • TaskHub.Shared.GeoCoding.Nominatim — Implementation of the geocoding service using the Nominatim API.

Observability

Metrics

  • TaskHub.Observability.Metrics.Abstractions — Abstractions and options for metrics collection (meters, counters, histograms) used across services.
  • TaskHub.Observability.Metrics.Implementation — Metrics implementation built on top of prometheus-net.

Tracing

  • TaskHub.Observability.Traces — Tracing and implementation built on top of ActivitySource.

Logging

  • TaskHub.Observability.Logger — Logging implementation built on top of Serilog.

OpenTelemetry

  • TaskHub.Observability.OpenTelemetry — Preconfigured OpenTelemetry setup (resource, exporters, processors) for metrics, traces, and logs (Tempo, Prometheus, Loki).

Refactoring

  • TaskHub.Shared.Refactoring.Abstractions — Abstractions for service refactoring.
  • TaskHub.Shared.Refactoring.Implementation — Implementations for service refactoring and dynamic dependency resolution.

Swagger / OpenAPI

  • TaskHub.Shared.Swagger — Common Swagger / OpenAPI configuration for ASP.NET Core services (conventions, filters, defaults).

Bootstrapping

  • TaskHub.Shared.Bootstraper.Basic — Basic service bootstrapping (dependency injection, configuration, logging).
  • TaskHub.Shared.Bootstraper.Full — Comprehensive service bootstrapping (all features, advanced configuration, etc.).

Design Principles

  • DDD & Clean Architecture — Clear separation between abstractions and implementations.
  • Lightweight by Design — Each project compiles into a minimal, focused package.
  • Composability — Services import only the shared modules they actually depend on.
  • Cross-Service Consistency — Unified patterns for results, commands, events, authorization, and observability (metrics, traces, logs).