tranvuongduy2003/archived-EventHub
35.0
Weak · 20 September 2026
20.7k
lines of production code
C#
primary language
4
measurements over time
What this system is
EventHub is a .NET 8-based event management platform that facilitates the creation, promotion, and ticketing of events through a Clean Architecture codebase. It supports a full lifecycle of operations including user authentication, event and category management, coupon distribution, and expense tracking, with financial transactions processed via Stripe. The system also provides social features such as user following, invitations, and real-time chat, while leveraging background jobs and outbox patterns for reliable event processing and notifications.
How it got here
2024 — Clean Architecture migration
89 changes.
The project underwent a comprehensive structural refactor to adopt Clean Architecture with .NET 8, replacing legacy layers with distinct Domain, Application, and Infrastructure modules. This transition introduced CQRS via MediatR, standardized domain aggregates with Guid identifiers, and established robust persistence patterns including Unit of Work and cached repositories. Concurrently, the codebase expanded to support full event lifecycle management, user authentication, and payment processing through Stripe integration.
2025 — feature expansion and real-time capabilities
24 changes.
This period focused on expanding the application's core functionality by implementing comprehensive modules for payments, expenses, tickets, and user invitations. It also introduced real-time communication features through chat and notification hubs, alongside automated sentiment analysis for reviews and event recommendation services.
Features
Add category creation and update commands
Users can now create and update event categories, including uploading icon images and setting a name and color. The new commands enforce validation rules such as requiring a name, icon, and valid hex color, and prevent duplicate category names.
source/EventHub.Application/Commands/Category/UpdateCategory · high confidence
Add category deletion capability
Users can now delete categories. This change introduces the command, handler, and validator for the delete operation, which ensures that a category can only be deleted if it is not currently associated with any events, and performs a soft delete while cleaning up associated icon images.
source/EventHub.Application/Commands/Category/DeleteCategory · high confidence
Add coupon creation with cover image and Stripe integration
Users can now create new coupons by providing details such as name, description, quantity, minimum price, discount percentage, and expiry date. The command handler supports uploading a cover image, which is stored via the file service, and automatically generates a corresponding coupon in Stripe using the VND currency. Input validation ensures the coupon name is present and under 100 characters, the description is under 500 characters, quantity and minimum price are non-negative, the discount percentage is between 0 and 100, and the expiry date is in the future.
source/EventHub.Application/Commands/Coupon/CreateCoupon · high confidence
Add coupon update capability with cover image support
Users can now update existing coupons, including modifying details such as name, description, quantity, pricing, and expiry date. The update process also supports uploading a new cover image; if a new image is provided, the previous one is automatically deleted and replaced. Validation ensures that the coupon ID and name are present, quantities and prices are non-negative, the discount percentage is between 0 and 100, and the expiry date is in the future.
source/EventHub.Application/Commands/Coupon/UpdateCoupon · high confidence
Add notification statistics and paginated list queries
New application-layer queries have been added to retrieve notification data for the current user. The \GetNotificationsStatisticQuery\ returns a count of unseen notifications categorized by type (Following, Ordering, Inviting). The \GetPaginatedNotificationsQuery\ retrieves a paginated list of notifications with filtering by type and includes related user and event details, while also attaching the total unseen counts for each category in the response metadata.
source/EventHub.Application/Queries/Notification · high confidence
Add paginated followers query with invitation status
Users can now retrieve a paginated list of their followers, where each follower entry includes an IsInvited flag indicating whether the requesting user has previously invited that follower. This new query handler fetches follower data, maps it to DTOs, and calculates the invitation status by checking the Inviteds collection for each follower.
source/EventHub.Application/Queries/User/GetPaginatedFollowers · high confidence
Add query to retrieve conversations by organizer ID
A new query and handler have been added to support fetching conversations associated with a specific organizer. Users can now request a paginated list of conversations where they are the host, with results including related event, host, user, and message data, and the most recent message automatically identified for each conversation.
source/EventHub.Application/Queries/Conversation/GetConversationsByOrganizerId · high confidence
Add review management commands
The application now supports creating, updating, and deleting event reviews. Users can submit a review with a rating (1-5) and optional content, which automatically updates the event's positive review percentage. Existing reviews can be modified or soft-deleted, with validation ensuring content length limits and valid rating ranges.
source/EventHub.Application/Commands/Review · high confidence
Added application-layer queries for retrieving function hierarchies
New CQRS query handlers have been added to the application layer to support retrieving function data. This includes fetching a single function by ID, retrieving a flat list of all top-level functions, and fetching functions associated with a specific role. The handlers implement logic to map domain entities to DTOs and construct hierarchical structures by linking parent functions with their children, enabling the UI or API consumers to display nested function trees.
source/EventHub.Application/Queries/Function · high confidence
Added assembly reference helpers for application and domain layers
New AssemblyReference classes have been added to both the EventHub.Application and EventHub.Domain projects. These static classes expose a reference to their respective assemblies, providing a convenient way for other parts of the system to access assembly metadata without needing to reference specific types from those layers.
source/EventHub.Application, source/EventHub.Domain · high confidence
Added cached repositories for categories, events, and reviews
New cached repository implementations have been introduced for the Category, Event, and Review domain entities. These classes inherit from a base cached repository and integrate with the existing cache service to manage data persistence and caching. Notably, the Event repository includes specific logic to invalidate cache entries when updating event access status or restoring deleted events, ensuring data consistency between the database and the cache layer.
source/EventHub.Infrastructure.Persistence/CachedRepositories · high confidence
Added claim-based and token-based authorization filters
New authorization attributes and filters have been introduced in the application layer to enforce access control. The \TokenRequirementAttribute\ and its associated filter validate that the provided Bearer token is not expired and establish the user's identity via the \SignInManager\. The \ClaimRequirementAttribute\ and its filter extend this by checking specific function and command permissions from the token's claims, returning a forbidden result if the required permission is missing. These changes enable developers to secure API endpoints by decorating actions with these attributes to enforce token validity and granular claim-based permissions.
source/EventHub.Application/SeedWork/Attributes · high confidence
Added command handlers for creating, updating, and deleting functions
The application now supports managing functions through new command handlers in the application layer. Users can create functions by specifying a name, URL, sort order, and optional parent ID, with validation ensuring required fields are present and lengths are respected. Existing functions can be updated with new details, and functions can be deleted by their unique identifier. All operations include validation and error handling, such as throwing exceptions if a parent function or the function to be updated/deleted does not exist.
source/EventHub.Application/Commands/Function · high confidence
Added commands to delete notifications and mark all as seen
Users can now delete specific notifications by ID and mark all unread notifications as seen, optionally filtering by notification type. This change introduces the DeleteNotification and SeenAll command handlers, which interact with the notification aggregate to perform these actions via the unit of work.
source/EventHub.Application/Commands/Notification · high confidence
Added coupon management and user profile retrieval capabilities
This change introduces the application-layer logic for managing coupons and retrieving user profiles. Users can now delete coupons by ID, retrieve a single coupon by ID, list all coupons with pagination, and list coupons created by the current user. Additionally, the system now supports retrieving the authenticated user's profile details, including their assigned roles, via an access token.
source/EventHub.Application/Commands/Coupon/DeleteCoupon, source/EventHub.Application/Queries/Coupon, source/EventHub.Application/Queries/User/GetUserProfile · high confidence
Added event statistics queries for reviews and totals
New application-layer queries have been introduced to retrieve detailed statistics for a specific event. The \GetEventReviewsByCustomer\ query calculates review metrics, including total count, positive/negative breakdown, and average rating. The \GetEventTotalStatistic\ query aggregates financial and operational data, providing totals for tickets sold, orders placed, revenues, expenses, and net profit.
source/EventHub.Application/Queries/Statistic · high confidence
Added notification data transfer objects
Introduced three new DTOs in the application layer to support notification functionality: \NotificationDto\ for representing notification details and associated entities (invitations, payments, followers), \SendNotificationDto\ for creating new notifications, and \NotificationStatisticDto\ for tracking unseen notification counts by category.
source/EventHub.Application/SeedWork/DTOs/Notification · high confidence
Added notification type enumeration
A new ENotificationType enum has been introduced in the shared domain layer to define specific notification categories. This enum currently supports three distinct types: ORDERING, FOLLOWING, and INVITING, providing a structured way to classify these events within the application.
source/EventHub.Domain.Shared/Enums/Notification · high confidence
Added outbox message processing job
A new scheduled job, ProcessOutboxMessagesJob, has been introduced to handle the reliable delivery of domain events. This job periodically retrieves unprocessed messages from the database in batches of ten, deserializes their content, publishes them via the MediatR pipeline, and marks them as processed. This ensures that events are persisted before being published and provides a mechanism to retry or process events that may have failed during initial handling.
source/EventHub.Infrastructure/Outbox · high confidence
Added paginated event listing with advanced filtering
Introduced a new query and handler for retrieving a paginated list of events, allowing users to filter results by date range, event status (Opening, Upcoming, Closed), minimum rating, and specific categories. The response includes pre-calculated average review ratings and related data such as reviews, categories, coupons, ticket types, and expenses for each event.
source/EventHub.Application/Queries/Event/GetPaginatedEvents · high confidence
Added paginated role retrieval capability
Users can now retrieve a paginated list of system roles. This change introduces a new query and handler that fetches roles from the identity store, applies pagination filters, and maps the results to a RoleDto containing the role's ID, name, description, and creation timestamp.
source/EventHub.Application/Queries/Category/GetPaginatedCategories, source/EventHub.Application/Queries/Role, source/EventHub.Application/SeedWork/DTOs/Role · high confidence
Added paginated user invitation retrieval
Users can now retrieve a paginated list of their invitations. This change introduces a new query and handler that fetches invitations for the currently signed-in user, including details about the inviter, invitee, and associated event, and returns them as DTOs.
source/EventHub.Application/Queries/User/GetPaginatedUserInvitations, source/EventHub.Application/SeedWork/DTOs/Invitation · high confidence
Added paging and ticket code generation helpers
New helper classes have been added to the domain shared library to support core application features. PagingHelper provides static methods to paginate and sort lists or queryables based on search, order, and page filters, enabling consistent data retrieval across the application. TicketCodeGenerator introduces a utility for creating unique, cryptographically secure ticket codes by combining a configurable prefix, a timestamp, and a random string, ensuring distinct identifiers for event tickets.
source/EventHub.Domain.Shared/Helpers · high confidence
Added payment session validation and ticket issuance
Users can now have their Stripe payment sessions validated, which automatically issues tickets, updates inventory counts, and sends notifications upon successful payment completion.
source/EventHub.Application/Commands/Payment/ValidateSession · high confidence
Added queries to retrieve commands associated with or excluded from a function
Users can now retrieve lists of commands linked to a specific function or identify commands that are not yet associated with it. This is enabled by new application-layer queries (GetCommandsInFunction and GetCommandsNotInFunction) and their corresponding handlers, which fetch CommandDto objects from the unit of work and map them via AutoMapper.
source/EventHub.Application/Queries/Command · high confidence
Added queries to retrieve conversations by event or user
New query handlers have been introduced for the Conversation feature, allowing users to fetch paginated conversation lists filtered by either a specific EventId or UserId. These handlers validate that the referenced event or user exists before querying the database, eagerly loading related entities (Event, Host, User, Messages), and mapping the results to ConversationDto objects for the API response.
source/EventHub.Application/Queries/Conversation/GetConversationsByUserId · high confidence
Added query handler to retrieve category details by ID
Users can now retrieve specific category information by providing a unique identifier. This change introduces a new query and its corresponding handler within the application layer, which fetches the category from the data store, validates its existence, and maps the result to a DTO for the consumer.
source/EventHub.Application/Queries/Category/GetCategoryById · high confidence
Added query handler to retrieve event details with user-specific context
Implemented the GetEventByIdQueryHandler to fetch event details by ID, including related data such as email content, categories, coupons, author information, reviews, and ticket types. The handler calculates the average review rating and determines user-specific flags (isFavourite, isFollower, isReviewable) based on the authenticated user's interactions, returning a comprehensive EventDetailDto.
source/EventHub.Application/Queries/Event/GetEventById · high confidence
Added query to retrieve paginated deleted events for a user
Users can now retrieve a paginated list of events they have deleted. This change introduces a new query and handler that fetches deleted events associated with the currently authenticated user, applying pagination filters and including event category details.
source/EventHub.Application/Queries/Event/GetDeletedEventsByUserId · high confidence
Added query to retrieve paginated events created by the current user
A new query and handler have been introduced to fetch a paginated list of events created by the authenticated user. The handler extracts the user ID from the JWT token and applies filtering based on date range, event status (Opening, Upcoming, Closed), minimum rating, category IDs, and visibility (Private/Public). The response includes event details along with associated categories, coupons, expenses, and reviews, with the average review rate calculated and rounded for each event.
source/EventHub.Application/Queries/Event/GetCreatedEventsByUserId · high confidence
Added query to retrieve paginated favorite events for a user
A new query and handler have been introduced to fetch a paginated list of events that a specific user has marked as favorites. The implementation retrieves the user's ID from the current identity, filters events based on the user's favorites, and applies optional pagination filters for status (Opening, Upcoming, Closed), minimum rating, and category IDs. The response includes event details mapped to DTOs, with the average review rate calculated and rounded for each event.
source/EventHub.Application/Queries/Event/GetFavouriteEventsByUserId · high confidence
Added query to retrieve paginated list of followed users
Users can now retrieve a paginated list of the accounts they are following. This new capability introduces a query and handler that fetches followed user profiles based on a specific user ID and pagination parameters, returning the results as mapped DTOs.
source/EventHub.Application/Queries/User/GetPaginatedFollowingUsers · high confidence
Added query to retrieve paginated messages for a conversation
Users can now fetch a paginated list of messages associated with a specific conversation. This new capability includes validation to ensure the conversation exists before retrieval, loads the message author and receiver details, and returns the data as mapped DTOs.
source/EventHub.Application/Queries/Conversation/GetMessagesByConversationId · high confidence
Added query to retrieve user's event creation statistics
Users can now request statistics regarding their created events, including total counts for all events, public events, and private events. This is implemented via a new query and handler that fetches these counts from the database based on the authenticated user's ID.
source/EventHub.Application/Queries/Event/GetCreatedEventsStatistics · high confidence
Added real-time chat and notification hubs
Introduced ChatHub and NotificationHub to enable real-time communication features. ChatHub allows users to join event-specific conversation rooms and send messages (including text, images, audio, and video) to other participants, automatically creating conversation records as needed. NotificationHub supports broadcasting system-wide alerts to all connected clients and sending targeted notifications to specific users, with persistence of notification details such as follow requests, event invitations, and payment updates.
source/EventHub.Application/Hubs · high confidence
Added recommended events query and handler
Introduced a new query and handler for retrieving recommended events. The handler fetches recommended event IDs from an external recommender system API, joins them with local event data (including reviews, categories, coupons, ticket types, and expenses), maps the results to DTOs, and calculates average review ratings for each event.
source/EventHub.Application/Queries/Event/GetRecommendedEvents · high confidence
Added shared domain seed-work classes for pagination, filtering, and error handling
The \EventHub.Domain.Shared/SeedWork\ folder now includes new foundational classes to support consistent data handling across the application. Users can now leverage \HttpResponseException\ for standardized HTTP error responses, \MailContent\ for email composition, and a robust pagination system comprising \Metadata\, \Pagination\<T\>\, and \PaginationFilter\ (including specific filters for Events and Notifications). Additionally, \PriceRange\ and \EventMetadata\ (moved from the domain layer) are now available in this shared space to support filtering and detailed event information.
source/EventHub.Domain.Shared/SeedWork · high confidence
Added ticket retrieval queries
New application-layer queries have been added to retrieve ticket data, supporting retrieval by ID, by event ID, by user ID, and a general paginated list. These queries fetch ticket details along with associated event and ticket type information, returning mapped DTOs to the caller.
source/EventHub.Application/Queries/Ticket · high confidence
Added user follow functionality
Users can now follow other users through a new command handler that validates the request, prevents duplicate follows, updates follower/following counts for both parties, and sends a notification to the followed user.
source/EventHub.Application/Commands/User/Follow · high confidence
Added user retrieval queries with pagination and caching
This change introduces two new application-layer queries for fetching user data. The GetPaginatedUsers query allows retrieving a list of users with pagination support, including their associated roles. The GetUserById query enables fetching a single user's details by their unique identifier, utilizing a cache service to store user data for two minutes to improve performance and reduce database load.
source/EventHub.Application/Queries/User/GetPaginatedUsers · high confidence
Added user unfollow capability
Users can now unfollow other users. This change introduces the UnfollowCommand, its handler, and validator within the application layer. The handler verifies the current user's identity via JWT, ensures the target user exists and is currently being followed, removes the follower relationship from the database, and decrements the follower/following counts for both users.
source/EventHub.Application/Commands/User/Unfollow · high confidence
Automatic sentiment analysis for reviews
The system now automatically calculates the sentiment and positivity percentage for new reviews. When a review is created or updated, a background handler sends the review content to an external sentiment analysis service (configured via the 'SentimentAnalysis' HTTP client). The result is used to update the review's IsPositive flag and SentimentPercentage fields, allowing users to see sentiment metrics without manual intervention.
source/EventHub.Application/DomainEventHandlers · high confidence
Expense and sub-expense management commands
The application now supports creating, updating, and deleting both main expenses and associated sub-expenses. Users can create a main expense with a title and total cost, or add sub-expenses to an existing expense; adding or updating a sub-expense automatically adjusts the parent expense's total. Deleting a main expense cascades to remove all its sub-expenses, while deleting or updating a sub-expense adjusts the parent total accordingly. These changes are handled via new command, handler, and validator classes in the Expense command directory.
source/EventHub.Application/Commands/Expense · high confidence
Expense retrieval now includes sub-expenses
The expense queries in the application layer have been updated to fetch and expose sub-expenses. The \GetExpenseById\ and paginated expense handlers now eagerly load the \SubExpenses\ collection, and a new \GetSubExpensesByExpenseId\ query has been added to retrieve sub-expenses for a specific parent expense. Corresponding DTOs (\ExpenseDto\, \SubExpenseDto\, \CreateSubExpenseDto\, \UpdateSubExpenseDto\) have been introduced to support this nested data structure.
source/EventHub.Application/Queries/Expense, source/EventHub.Application/SeedWork/DTOs/Expense · high confidence
Initial database schema configuration for EventHub domain entities
This change introduces the Entity Framework Core model configurations for the EventHub application's core domain entities. It defines the database relationships and constraints for key aggregates including Event (with sub-images, ticket types, invitations, payments, reviews, tickets, conversations, messages, reasons, and expenses), User (with payments, events, reviews, conversations, messages, and tickets), and supporting entities such as Command, Function, Permission, Role, Payment, Coupon, TicketType, Expense, FavouriteEvent, UserFollower, Conversation, EmailContent, and Invitation. Additionally, it registers the Azure SignalR service configuration.
source/EventHub.Infrastructure.Persistence/Configurations · high confidence
Initial release of EventHub.Presentation API
The EventHub.Presentation layer is introduced as a new ASP.NET Core 8.0 web API, providing the entry point for the application. It integrates Serilog for structured logging, configures infrastructure services, and supports Stripe payments, Hangfire job scheduling (with MongoDB storage), MinIO file storage, and social authentication via Google and Facebook. The service exposes port 80 and is containerized via a multi-stage Dockerfile.
source/EventHub.Presentation · high confidence
Initial release of REST API controllers for EventHub
This change introduces the complete set of presentation-layer controllers for the EventHub application, exposing the core business capabilities via the \api/v1\ route. The new endpoints cover user authentication (signup, signin, external login, token management), event lifecycle management (create, update, delete, favorites, recommendations, and statistics), and administrative resource management for categories, coupons, expenses (including sub-expenses), functions, and commands. It also adds support for real-time communication via conversation and message retrieval, user notifications, file uploads, and invitation handling, all wired to the MediatR pipeline and protected by role-based claim requirements.
source/EventHub.Presentation/Controllers · high confidence
Introduce EventHub Application DTOs for Event Management
This change introduces a comprehensive set of Data Transfer Objects (DTOs) within the \EventHub.Application\ layer to support the full lifecycle of event management. The new files include \CreateEventDto\ and \UpdateEventDto\ for defining event details (such as name, location, images, and email content), \EventDto\ and \EventDetailDto\ for returning event information (including statistics, categories, coupons, and ticket types), and specialized DTOs for managing ticket types (\CreateTicketTypeDto\, \UpdateTicketTypeDto\, \TicketTypeDto\) and email notifications (\CreateEmailContentDto\, \UpdateEmailContentDto\). Additionally, supporting DTOs like \CreateFavouriteEventDto\, \LeanEventDto\, and \CreatedEventsStatisticsDto\ are added to facilitate user interactions and data aggregation. Several DTOs previously located in the Domain layer have been migrated to this Application DTO folder, ensuring a clear separation of concerns and providing the necessary structures for API request/response payloads.
source/EventHub.Application/SeedWork/DTOs/Event · high confidence
Introduced conversation-related DTOs and migrated domain models to application layer
New Data Transfer Objects (DTOs) have been added to the application layer to support conversation features: \ConversationDto\ aggregates event, host, user, and last message details; \ConversationLastMessageDto\ carries message content and sender/receiver info; and \JoinChatRoomDto\ handles room join requests with event, host, and user identifiers. Additionally, \ConversationEventModel\ and \ConversationUserModel\ from the domain layer have been renamed to \ConversationEventDto\ and \ConversationUserDto\ respectively, moved to the application DTOs folder, and augmented with \Id\ properties to better suit data transfer purposes.
source/EventHub.Application/SeedWork/DTOs/Conversation · high confidence
Introduction of Coupon Data Transfer Objects
New DTOs have been added to the application layer to support coupon management operations. This includes \CouponDto\ for general responses, \CreateCouponDto\ and \UpdateCouponDto\ for modifying coupon details (including cover image uploads), \EventCouponDto\ for event-specific views, and \MultipleCouponIdsDto\ for batch operations.
source/EventHub.Application/SeedWork/DTOs/Coupon · high confidence
Introduction of Coupon domain model with image and event associations
The system now includes a Coupon aggregate root that supports storing coupon details such as name, description, quantity, discount percentage, and expiration date, along with required cover image metadata (URL and filename). Coupons are linked to their author (User) and can be associated with multiple events via a new EventCoupon join entity, enabling the tracking of which events a coupon applies to.
source/EventHub.Domain/Aggregates/CouponAggregate · high confidence
Introduction of Notification domain entity
The system now includes a Notification aggregate root, enabling the storage and management of user notifications. This entity supports various notification types (such as invitations, payments, and follower updates) via foreign keys to the User, Invitation, Payment, and UserFollower aggregates, and tracks whether each notification has been seen by the recipient.
source/EventHub.Domain/Aggregates/NotificationAggregate · high confidence
New DTOs for event statistics and reviews
Added two new Data Transfer Objects to the application's seed work layer: EventReviewsByCustomerDto, which exposes total positive/negative reviews, total review count, and average rate, and EventTotalStatisticDto, which exposes totals for tickets, orders, revenues, expenses, and profits. These DTOs provide structured data for reporting event performance and customer feedback metrics.
source/EventHub.Application/SeedWork/DTOs/Statistic · high confidence
New Review API Data Transfer Objects
The application introduces a dedicated set of Data Transfer Objects (DTOs) for the Review feature, consolidating them under \EventHub.Application.SeedWork.DTOs.Review\. This includes \ReviewDto\ for full review details (including sentiment analysis via \IsPositive\ and associated event/author data), \ReviewStatisticsDto\ for aggregated metrics (average rate, total counts, and distribution), \SentimentAnalysisResponseDto\ for sentiment results, \CreateReviewDto\ (moved from Domain and updated to use \Guid\ for \EventId\), and \UpdateReviewDto\ for modifying existing reviews. These DTOs define the structure for creating, updating, retrieving, and analyzing reviews within the system.
source/EventHub.Application/SeedWork/DTOs/Review · high confidence
New application service abstractions introduced
The application layer now exposes a set of new service contracts in the SeedWork.Abstractions namespace, enabling decoupled implementations for core infrastructure concerns. These include ICacheService for data caching, IDateTimeProvider for consistent UTC time access, IEmailService for sending various email types (including registration and password reset), IFileService for uploading, downloading, and deleting files, IHangfireService for managing background jobs (fire-and-forget, delayed, and continuations), INotificationService for sending user and global notifications, IProcessOutboxMessagesJob for handling outbox message processing via Quartz, ISerializeService for object serialization/deserialization, and ITokenService for JWT token generation, validation, and claim extraction.
source/EventHub.Application/SeedWork/Abstractions · high confidence
New application-layer authentication commands and handlers
The application layer now includes a complete set of command handlers for user authentication and account management. Users can sign up, sign in, and sign out, with the system issuing access and refresh tokens. The flow supports external logins (e.g., Google, Facebook) via an initiate command and a callback handler that creates accounts and signs users in. Account recovery is available through forgot-password and reset-password commands that generate tokens and send emails via Hangfire. Token refresh is handled by a dedicated command that validates the existing refresh token and issues new tokens. Additionally, a validate-user command checks for duplicate email, phone number, and username before account creation.
source/EventHub.Application/Commands/Auth · high confidence
New base repository implementations with caching and pagination support
The repository layer now introduces two new base classes: \RepositoryBase\<T\>\ and \CachedRepositoryBase\<T\>\. \RepositoryBase\<T\>\ provides standard CRUD operations, soft-delete support, and pagination capabilities via \PagingHelper\. \CachedRepositoryBase\<T\>\ wraps a base repository instance to add caching for \FindAll\, \FindByCondition\, and \GetByIdAsync\ operations, with a 2-minute cache duration and automatic cache invalidation on create/update. Both classes support eager loading of related entities and filtering by soft-deleted status.
source/EventHub.Infrastructure.Persistence/SeedWork/Repository · high confidence
New checkout command and handler for Stripe payment integration
Added a new checkout command and handler in the application layer to process ticket purchases. The handler validates coupon eligibility, calculates totals, persists payment records, and creates a Stripe Checkout session with line items and optional discounts, returning the session URL to the user.
source/EventHub.Application/Commands/Payment/Checkout · high confidence
New command handlers for managing function-to-role permissions and command enablement
This change introduces a set of new application-layer commands within the \source/EventHub.Application/Commands/Permission\ directory to manage granular permissions. Specifically, it adds the ability to add or remove a function from a role (\AddFunctionToRole\, \RemoveFunctionFromRole\) and to enable or disable specific commands within a function (\EnableCommandInFunction\, \DisableCommandInFunction\). Each command is accompanied by a validator ensuring required IDs are present and a handler that interacts with the \RoleManager\ and \IUnitOfWork\ to persist these permission changes, effectively allowing administrators to fine-tune access rights by mapping functions to roles and controlling command availability.
source/EventHub.Application/Commands/Permission · high confidence
New command to update user roles
A new command and handler have been added to allow updating the roles assigned to a specific user. The \UpdateUserRolesCommand\ accepts a user ID and a list of roles, and the corresponding handler replaces the user's existing roles with the provided list using the ASP.NET Core Identity \UserManager\. If the specified user does not exist, the operation throws a \NotFoundException\.
source/EventHub.Application/Commands/User/UpdateUserRoles · high confidence
New domain event for review positivity calculation
A new domain event, CalculatePositivePercentageOfReviewDomainEvent, has been added to the EventHub.Domain.Events namespace. This event carries a unique identifier and a ReviewId, enabling downstream processes to react to or trigger calculations regarding the positive percentage of reviews.
source/EventHub.Domain/Events · high confidence
New event management commands for creation, updates, and lifecycle
This change introduces a comprehensive set of application-layer commands for managing the full lifecycle of events. Users can now create events with detailed metadata, including cover images, sub-images, ticket types, categories, and optional email content with attachments. Existing events can be updated with similar flexibility. The update also adds commands to manage event visibility (making events public or private), favorite/unfavorite events, and handle deletion (soft delete, permanent delete with associated file cleanup, and restore). Additionally, a new command allows applying coupons to events.
source/EventHub.Application/Commands/Event · high confidence
New infrastructure services and refactored caching logic
This change introduces three new infrastructure services: NotificationService for sending real-time notifications via SignalR and persisting them to the database, TokenService for generating and validating JWT access and refresh tokens with role-based permissions, and SerializeService for JSON serialization using Newtonsoft.Json. Additionally, the existing CacheService has been refactored to use the new SerializeService, updated with structured logging, and moved to the new project structure, while the HangfireService was also relocated to the new Services folder.
source/EventHub.Infrastructure/Services · high confidence
New payment and checkout data transfer objects introduced
This change introduces a new set of Data Transfer Objects (DTOs) within the application layer to support payment processing and checkout workflows. Specifically, it adds \CheckoutDto\ and \CheckoutItemDto\ to capture customer details, event information, and line items for initiating a checkout session, along with \CheckoutResponseDto\ to return session URLs and IDs. It also defines \PaymentDto\ and \PaymentItemDto\ to represent completed payment records, including status, discounts, and associated event/organizer data. Additionally, \ValidateSessionResponseDto\ is added to return detailed session validation results including ticket lists, and \PaymentStatisticsDto\ provides aggregated counts for payment statuses (total, pending, success, failed). The \CheckoutItemDto\ was also migrated from the domain layer to the application seed work DTOs, updating its namespace and changing the \TicketTypeId\ from a string to a Guid.
source/EventHub.Application/SeedWork/DTOs/Payment · high confidence
New payment query handlers for statistics and paginated retrieval
This change introduces a suite of new application-layer query handlers in the Payment module, enabling users to retrieve payment data and statistics. Specifically, it adds handlers for fetching paginated payments (all, by user, by event, or by created events) and for retrieving payment statistics aggregated by user, event, or created events. These handlers utilize AutoMapper for DTO mapping and Entity Framework Core for data access, including necessary entity includes (Event, Author, Coupon, PaymentItems) and validation checks for existing entities.
source/EventHub.Application/Queries/Payment · high confidence
New permission retrieval queries for role-based access control
Added three new application-layer queries to support permission management: GetFullPermissions retrieves a comprehensive list of all system functions and their associated action flags (Create, Update, Delete, View, Approve) via a direct SQL query; GetPermissionsByUser fetches the specific permissions assigned to a particular user by resolving their roles and associated functions; and GetPermissionsCategorizedByRoles returns all permissions grouped by role. These queries enable the application to dynamically determine access rights based on user roles and function definitions.
source/EventHub.Application/Queries/Permission · high confidence
New query to retrieve paginated followers with invitation status
Added a new query and handler for retrieving a paginated list of users who follow a specific user, specifically for the purpose of inviting them to an event. The handler fetches followers, maps them to DTOs, and calculates an \IsInvited\ flag for each follower based on whether they have already been invited to the specified event by the requesting user.
source/EventHub.Application/Queries/User/GetPaginatedFollowersToInvite · high confidence
New review retrieval and statistics queries
Added application-layer queries to retrieve reviews in various contexts: paginated reviews (all, by event, by user, or by created events), individual review details by ID, and review statistics (totals, positive/negative counts, average rate, and rate distribution) for created events. These queries enable users to fetch and analyze review data efficiently.
source/EventHub.Application/Queries/Review · high confidence
New ticket lifecycle commands for activation, cancellation, and check-in
The application now supports managing ticket status through three new commands: ActivateTicket, CancelTicket, and CheckIn. These commands allow users to transition a ticket to an active, inactive (cancelled), or checked-in state respectively. Each command validates that the ticket exists before updating its status in the database.
source/EventHub.Application/Commands/Ticket · high confidence
New user registration and password change capabilities
The application now supports creating new users and allowing existing users to change their passwords. The new user registration flow validates email, phone, name, and password complexity (minimum 6 characters, mixed case, and digits), uploads an avatar image via the file service, assigns default customer and organizer roles, clears the user cache, and enqueues an asynchronous email confirmation job. The password change feature requires the user ID and both old and new passwords, validates that the old password is correct before updating, and enforces the same complexity rules on the new password.
source/EventHub.Application/Commands/User/ChangePassword · high confidence
Persistence layer repository implementations added
The repository implementations in the persistence layer have been added, providing data access for core domain entities including Events, Categories, Coupons, Payments, Tickets, Users, and Notifications. The EventsRepository specifically introduces the ability to retrieve, paginate, and restore soft-deleted events, while the CommandsRepository and FunctionsRepository include specific methods for existence checks and retrieval with optional includes.
source/EventHub.Infrastructure.Persistence/Repositories · high confidence
Unified file storage service with MinIO support
The file system infrastructure now supports MinIO as a storage backend alongside the existing Azure Blob Storage. A new MinioFileService implements the IFileService interface, enabling file upload, download, deletion, and presigned URL generation (with a 7-day expiry) via MinIO. The existing AzureBlobService has been refactored into AzureFileService, renamed to implement the same IFileService interface, and updated to use consistent DTOs (BlobResponseDto, BlobDto) and parameter naming (bucketName/objectName) to align with the new MinIO implementation.
source/EventHub.Infrastructure/FilesSystem · high confidence
User invitation command and handler implementation
Added the command and handler for inviting users to an event. The InviteUsersCommandHandler processes a list of user IDs, creates unique invitations in the database (avoiding duplicates for the same inviter/event/user combination), and triggers an INVITING notification for each new invitation.
source/EventHub.Application/Commands/User/InviteUsers · high confidence
User profile update capability with avatar support
Users can now update their profile information, including email, phone number, date of birth, full name, username, gender, and bio, through a new command handler. The update process includes validation for required fields and length limits, and supports uploading a new avatar image, which automatically replaces any existing avatar file.
source/EventHub.Application/Commands/User/UpdateUser · high confidence
Removals
Removal of legacy infrastructure layer
The \EventHub.Infrastructor\ package has been completely removed from the codebase. This deletion eliminates the previous implementation details, including the generic \RepositoryBase\ and \UnitOfWork\ patterns, the \ApplicationDbContext\ with its entity configurations and seed data, and the associated infrastructure services such as Redis caching, SignalR, and Identity configuration. This change reflects a structural shift away from the prior data-access and service-configuration architecture.
src/EventHub.Infrastructor · high confidence
Architecture
Email templates relocated to presentation layer
The ResetPasswordEmailTemplate.html and SignUpEmailTemplate.html files have been moved from the infrastructure layer (src/EventHub.Infrastructor/Mailler/Templates) to the presentation layer (source/EventHub.Presentation/Templates). This change reorganizes the project structure to better align email templates with the presentation tier, though the content of the templates remains unchanged.
source/EventHub.Presentation/Templates · high confidence
Infrastructure configuration layer reorganized and expanded
The configuration logic previously located in the 'Infrastructor' project has been moved to the 'EventHub.Infrastructure' project and split into dedicated, single-responsibility files (e.g., Database, Caching, Identity, Logging, Storage). This refactoring introduces new capabilities including Redis caching, MinIO object storage, Quartz scheduled jobs for outbox processing, and SignalR support, while also updating the Swagger documentation setup to include API descriptions and annotations.
source/EventHub.Infrastructure/Configurations · high confidence
Introduction of Unit of Work pattern for transaction and caching management
The application now uses a Unit of Work implementation in the persistence layer to coordinate database operations and caching. This change introduces a centralized component that manages transactions across multiple repositories (such as Events, Payments, and Coupons) and integrates with a cache service to optimize performance and reduce database load.
source/EventHub.Infrastructure.Persistence/SeedWork/UnitOfWork · high confidence
Repository restructured into Clean Architecture with .NET 8 and Docker CI/CD
The project has been reorganized from a flat structure into a Clean Architecture solution (Domain, Application, Infrastructure, Presentation) targeting .NET 8, enforced via global SDK constraints and Directory.Build.props. This refactor introduces strict code quality standards through an .editorconfig, SonarQube static analysis, and nullable reference types. Additionally, the repository now includes a Jenkinsfile that automates building the API into a Docker image and deploying it, with success/failure notifications sent to Telegram.
(repo-wide) · high confidence
Behavioural changes
Add application startup and configuration extension methods
The application now uses dedicated extension methods in the Presentation layer to configure the request pipeline and host settings. ApplicationExtensions wires up middleware for Swagger, error handling, HTTPS redirection, CORS, authentication, authorization, Hangfire, and SignalR hubs (Chat and Notification), and handles automatic database migration and seeding at startup. HostExtensions configures the application to load settings from appsettings.json, the environment-specific file, and environment variables.
source/EventHub.Presentation/Extensions · high confidence
Application seed work DTOs and exceptions moved to new namespace
The application layer's shared data transfer objects and exception classes have been reorganized into the \EventHub.Application.SeedWork\ namespace. This includes renaming and relocating command and permission DTOs (such as \CommandDto\, \FullPermissionDto\, and \RolePermissionDto\) from the domain layer, adding Swagger schema annotations to these DTOs, and introducing new specific HTTP exception classes (\BadRequestException\, \NotFoundException\, \UnauthorizedException\) alongside updated token-related exceptions (\ExpiredTokenException\, \InvalidTokenException\) that now inherit from the new base exception types.
source/EventHub.Application/SeedWork/DTOs/Command, source/EventHub.Application/SeedWork/DTOs/Permission, source/EventHub.Application/SeedWork/Exceptions · high confidence
Centralize domain constants and add coupon file container
Shared constants previously located in the domain layer's ValueObjects have been moved to the shared Constants namespace, with classes like CacheKey, SystemConstants, and TokenTypes converted to static classes to improve accessibility. Additionally, a new FileContainer constant has been introduced to define storage paths, including a specific entry for coupons to support cover image uploads.
source/EventHub.Domain.Shared/Constants · high confidence
Centralized application settings in shared domain layer
Configuration models for storage (Minio, Azure Blob), authentication (JWT, OAuth providers), email, background jobs (Hangfire), logging (Seq), and payments (Stripe) have been moved from the domain project to the shared settings assembly. Additionally, new settings classes for Minio storage and outbox processing options have been introduced, providing a unified location for these configuration options.
source/EventHub.Domain.Shared/Settings · high confidence
Conversation aggregate refactored to use Guid identifiers and new Message entity
The Conversation aggregate has been restructured within the domain layer: the Conversation class now inherits from AggregateRoot and uses Guid for its primary key and foreign keys (EventId, HostId, UserId) instead of the previous int/string types, while also introducing a new Message entity to handle conversation content (text, images, videos, audio) and linking back to the Conversation via cascade delete. This change updates the Conversation entity to reference the new Message type for LastMessage and Messages collections, aligning the data model with the new aggregate structure.
source/EventHub.Domain/Aggregates/ConversationAggregate · high confidence
Database schema refactoring and migration updates
The persistence layer has undergone significant database schema changes to support evolving domain requirements. The initial migration establishes the core data model, including tables for users, roles, events, categories, conversations, messages, and payment methods. Subsequent migrations refine this structure: the 'AlterCategory' migration expands the 'IconImageUrl' field in the Categories table to support longer URLs, adds 'AuthorId' columns to several tables (Tickets, LabelInUsers, FavouriteEvents, Conversations) to track ownership, and adjusts primary keys and foreign key relationships for better data integrity. The 'AlterEventTable' migration increases the maximum length of the 'CoverImageUrl' field in the Events table. Finally, the 'AlterEventTable1' migration corrects the table name from 'events' to 'Events' (case-sensitive fix) and re-establishes all associated foreign key constraints, ensuring consistency with the entity framework model.
source/EventHub.Infrastructure.Persistence/Migrations · high confidence
Domain model and infrastructure refactoring
This change restructures the codebase by moving domain enums (such as ticket status, user roles, and command codes) and HTTP response classes (like ApiBadRequestResponse and ApiResponse) from the domain project to the shared project, updating their namespaces accordingly. It also introduces new infrastructure components for reliable event handling, including an OutboxMessage entity and consumer for persisting domain events, alongside a new SqlConnectionFactory for database connectivity.
(repo-wide) · high confidence
Domain model refactoring and seed work consolidation
The domain layer has been restructured to consolidate common infrastructure into the SeedWork module. Entity bases have been refactored: EntityBase now includes soft-delete and date-tracking capabilities, and EntityAuditBase now requires an AuthorId for audit trails. A new Unit of Work interface has been introduced, exposing repositories for core domain entities such as Events, Payments, Coupons, and Expenses, along with cached variants. Additionally, the codebase now supports a CQRS pattern via new Command and Query interfaces integrated with MediatR, and introduces a Domain Event system with an AggregateRoot base class to manage and raise events.
source/EventHub.Domain/SeedWork · high confidence
Domain model refactoring: ID standardization and structural reorganization
This change restructures the domain layer by moving several entity classes (EmailAttachment, EventCategory, FavouriteEvent) into the EventAggregate's ValueObjects folder and introducing a new SubExpense entity. Crucially, it standardizes identifier types across these models: primary keys and foreign keys (such as Id, EmailContentId, CategoryId, EventId, and UserId) are migrated from integer or string types to Guid, and required properties are enforced using C\# 11's required modifier. This ensures consistent identity handling and improves data integrity within the EventHub domain.
source/EventHub.Domain/Aggregates/EventAggregate/ValueObjects · high confidence
Event domain entities migrated to new aggregate structure with schema and type updates
The domain entities within the EventAggregate (including Category, EmailContent, EventSubImage, Reason, Review, TicketType, and the new Expense entity) have been moved from the legacy src/EventHub.Domain.Entities namespace to source/EventHub.Domain.Aggregates.EventAggregate.Entities. This migration updates primary keys from int to Guid, enforces required properties, and refines database schemas: Category now distinguishes between IconImageUrl and IconImageFileName; EventSubImage splits the Image field into ImageUrl and ImageFileName; EmailContent limits Content to 4000 characters; and Review adds IsPositive and SentimentPercentage fields while renaming UserId to AuthorId. Additionally, the Review entity now implements IAuditable, and Category inherits from AggregateRoot instead of EntityBase.
source/EventHub.Domain/Aggregates/EventAggregate/Entities · high confidence
Event enums migrated to shared project and cycle type renamed
Event-related enums (access type, cycle type, payment type, privacy, status, and type) have been moved from the domain project to the shared project, making them available across the application boundary. Additionally, the event cycle type has been updated: the 'SINGLE' option is now named 'ONETIME' to better reflect its meaning.
source/EventHub.Domain.Shared/Enums/Event · high confidence
Event model refactored to Domain-Driven Design with new relationships and behavior
The Event entity has been moved to the EventAggregate and refactored to inherit from AggregateRoot, implementing IAuditable. The primary key changed from int to Guid, and the Uuid property was removed. New properties include CoverImageFileName, AuthorId (with a User relationship), and collections for EventCoupons and Expenses. The EventCycleType default changed from SINGLE to ONETIME. A new method CalculatePositivePercentageOfReview was added to raise a domain event.
source/EventHub.Domain/Aggregates/EventAggregate · high confidence
Function DTOs moved to application layer with Swagger documentation
The data transfer objects for managing functions (CreateFunctionDto, FunctionDto, UpdateFunctionDto) have been relocated from the domain layer to the application layer's SeedWork/DTOs/Function directory. During this move, Swagger annotations were added to the properties to improve API documentation, and the CreateFunctionDto was adjusted to remove the Id field (which is now handled by the new UpdateFunctionDto) and renamed the SortOrder property to align with the new FunctionDto structure.
source/EventHub.Application/SeedWork/DTOs/Auth, source/EventHub.Application/SeedWork/DTOs/Function · high confidence
Infrastructure layer reorganization and email service improvements
The EventHub.Infrastructure project has been reorganized, introducing new components such as a UTC DateTimeProvider, MinIO-based file storage, and an idempotent domain event handler to ensure events are processed only once. The email service was refactored to use asynchronous SMTP operations, improved logging with structured messages, and corrected file path handling for email templates.
source/EventHub.Infrastructure · high confidence
Introduces MediatR pipeline behaviors and AutoMapper mappings for domain entities
The application now includes standardized MediatR pipeline behaviors in the SeedWork layer to handle validation, logging, performance monitoring, and exception handling for all requests. Additionally, a comprehensive set of AutoMapper configuration classes has been added to map domain entities (such as Event, User, Payment, and Notification) to their corresponding DTOs, enabling consistent data transformation across the application.
source/EventHub.Application/SeedWork/Mappings · high confidence
Introduction of Function Code Enum for Domain Permissions
A new enumeration, EFunctionCode, has been added to the EventHub.Domain.Shared module to define specific functional areas and permission scopes. This enum categorizes system capabilities into GENERAL functions (such as categories, events, reviews, expenses, tickets, payments, chat, and coupons) and ADMINISTRATION functions (including user, role, function, command, and permission management), providing a structured basis for feature access control.
source/EventHub.Domain.Shared/Enums/Function · high confidence
Message DTOs refactored to support editing and deletion
The message data transfer objects have been restructured to enable new message management capabilities. A new DeleteMessageDto was added to handle message removal requests, and an EditMessageDto was introduced to allow updating message content and media. The existing SendMessageDto was moved to the application layer and updated to use Guid-based identifiers for sender and receiver, replacing the previous string-based IDs, while also adding file name properties for images, videos, and audio to complement the existing URL fields.
source/EventHub.Application/SeedWork/DTOs/Message · high confidence
Payment aggregate model refactored to use Guid identifiers and new relationships
The Payment and PaymentItem domain models have been restructured to use Guid primary keys instead of integers, with all ID fields (EventId, TicketTypeId, PaymentId, AuthorId) now requiring Guid values. The Payment entity now inherits from AggregateRoot instead of EntityAuditBase, introduces a required AuthorId linking to a User, and adds support for Coupons via a new CouponId foreign key. Several legacy fields have been removed or renamed: the redundant Uuid column is gone, UserPaymentMethod is replaced by a simple PaymentMethod string, PaymentSessionId becomes PaymentIntentId, and a new SessionId field is added. In PaymentItem, the UserId field has been removed, and a new UnitPrice property has been introduced alongside the existing TotalPrice. These changes reflect a shift toward a more robust aggregate root pattern and updated business requirements for authorship and coupon support.
source/EventHub.Domain/Aggregates/PaymentAggregate · high confidence
Payment status enum simplified and moved to shared layer
The payment-related enums have been moved from the domain project to the shared project (EPaymentMethod and EPaymentStatus). The EPaymentStatus enum has been simplified: the PAID status is now named SUCCESS, and the REJECTED and ALL statuses have been removed.
source/EventHub.Domain.Shared/Enums/Payment · high confidence
Persistence layer restructured with EF Core interceptors and expanded data model
The persistence infrastructure has been refactored to introduce EF Core interceptors that automatically handle date tracking (Created/Updated timestamps) for entities and convert domain events into outbox messages for reliable asynchronous processing. The database context now exposes a significantly expanded data model, adding support for sub-expenses, coupons, notifications, and various event-related entities (sub-images, email attachments). Additionally, the dependency injection setup has been streamlined to register new repositories for these aggregates and introduces a cached repository pattern for categories, events, and reviews, while removing obsolete repositories for labels and payment methods.
source/EventHub.Infrastructure.Persistence/Data · high confidence
Refactor UserAggregate value objects to use Guid identifiers and standard EntityBase
The domain value objects CommandInFunction, Invitation, Permission, and UserFollower have been moved from the generic Entities namespace into the UserAggregate.ValueObjects namespace. This change standardizes the data model by replacing string-based composite keys and varchar columns with native Guid identifiers (using \[Key\] and \[DatabaseGenerated\]) and switching the base class from EntityBase to AggregateRoot where appropriate (specifically for Permission). The removal of explicit varchar length constraints and composite primary keys simplifies the schema and aligns these objects with the system's primary key strategy.
source/EventHub.Domain/Aggregates/UserAggregate/ValueObjects · high confidence
Refactored file upload DTOs and added blob response model
File-related Data Transfer Objects have been moved from the Domain layer to the Application layer's SeedWork DTOs folder. The BlobModel was renamed to BlobDto and enriched with Swagger annotations for API documentation, while the UploadFileDto now includes a BucketName property to specify the storage target. A new BlobResponseDto was introduced to standardize file operation responses with status, error, and blob data fields.
source/EventHub.Application/SeedWork/DTOs/File · high confidence
Removal of EventHub.Presentation startup and configuration files
The EventHub.Presentation project has removed its application entry point (Program.cs), environment-specific configuration files (appsettings.Development.json, appsettings.Production.json, appsettings.json), and associated development metadata (launchSettings.json, publish profiles, and .user files). This change eliminates the local API startup logic, hardcoded connection strings, and secret keys previously stored in these files, indicating a shift away from this project serving as the direct web host or requiring external configuration management.
src/EventHub.Presentation · high confidence
Removal of legacy AuthController
The \AuthController\ in the presentation layer has been deleted, removing the previous implementation of authentication endpoints (signup, signin, signout, and external login). This change reflects a structural shift in the API layer, likely as part of the broader clean architecture and CQRS refactoring, where authentication handling is being moved to a different architectural component or pattern.
src/EventHub.Presentation/Controllers · high confidence
Removal of legacy application and host extension methods
The \ApplicationExtensions\ and \HostExtensions\ classes in the Presentation layer have been removed. This eliminates the previous centralized setup for Swagger UI, HTTPS redirection, authentication/authorization middleware, Hangfire dashboard, and JSON configuration loading, indicating a shift in how the application pipeline and configuration are initialized.
src/EventHub.Presentation/Extensions · high confidence
Removal of legacy domain layer components
The \EventHub.Domain\ layer has been stripped of its previous implementation artifacts, including base entity classes (\EntityBase\), audit interfaces, pagination models, repository contracts, DTOs, domain entities, and service interfaces. This cleanup removes the foundational types that supported the old architecture, preparing the domain layer for the new structure.
src/EventHub.Domain, src/EventHub.Presentation/Helpers, src/EventHub.Usecase · high confidence
Repository interfaces migrated to domain aggregates
The repository interface definitions in the domain layer have been reorganized and updated to align with the new aggregate structure. Existing interfaces previously located in the Contracts folder have been moved to the Repositories folder, and their namespace and using statements have been updated to reference specific domain aggregates (such as EventAggregate, UserAggregate, and PaymentAggregate) and the new SeedWork.Persistence base, replacing the older Common.Repository and Entities references. Additionally, new repository interfaces have been introduced for several domain entities, including Categories, Events, Reviews, Commands, Coupons, Email components, Expenses, Favourites, Functions, Invitations, Messages, Notifications, Payment Items, Reasons, SubExpenses, Ticket Types, and User Followers, establishing the data access contracts for these specific domain objects.
source/EventHub.Domain/Repositories · high confidence
Role entity added and RBAC domain entities refactored into UserAggregate
A new Role entity has been introduced to support role-based access control, featuring soft-delete capabilities, date tracking, and a collection of associated permissions. Additionally, the Command and Function domain entities have been moved from the generic Entities folder into the UserAggregate to better align with the application's architecture. During this move, these entities were updated to use C\# 11 required properties for Name, Url, and SortOrder, and their namespace references were updated to reflect their new location within the UserAggregate.
source/EventHub.Domain/Aggregates/UserAggregate/Entities · high confidence
Structured error responses for specific HTTP exceptions
The ErrorWrappingMiddleware has been moved to the Presentation layer and now explicitly handles NotFound, BadRequest, and Unauthorized exceptions. Instead of falling through to the generic 500 error handler, these specific exceptions now return their corresponding HTTP status codes (404, 400, 401) along with structured JSON error responses, providing clearer feedback to API consumers.
source/EventHub.Presentation/Middlewares · high confidence
Ticket DTOs refactored and moved to Application layer
Ticket data transfer objects have been relocated from the Domain layer to the Application layer's SeedWork folder. The \TicketDto\ class has been significantly simplified: it now exposes rich domain objects (\TicketTypeDto\, \LeanEventDto\) instead of raw string IDs, and includes a new \TicketNo\ property. Conversely, the \CreateTicketDto\ remains focused on creation inputs but has been updated to use the shared enum namespace. These changes streamline the API contract for ticket retrieval while maintaining separation of concerns.
source/EventHub.Application/SeedWork/DTOs/Category, source/EventHub.Application/SeedWork/DTOs/Ticket · high confidence
Ticket aggregate model refactored to use Guid identifiers and C\# 11 required members
The Ticket entity has been moved to the TicketAggregate namespace and upgraded to inherit from AggregateRoot, replacing the previous EntityBase base class. All primary and foreign key identifiers (Id, TicketTypeId, EventId, UserId, PaymentId) have been changed from int to Guid, with the legacy Uuid column removed. The UserId property has been renamed to AuthorId to better reflect its semantic role. Additionally, the model now uses C\# 11 required members for all properties, ensuring stricter initialization guarantees.
source/EventHub.Domain/Aggregates/TicketAggregate · high confidence
User DTOs refactored and enriched with Swagger metadata
The user-related Data Transfer Objects in the Application layer have been consolidated into the \SeedWork/DTOs/User\ directory, moving them from the Domain layer. This change includes renaming \UserModel\ to \UserDto\, updating \UserId\ from string to Guid, and adding \IsInvited\ and \NumberOfFollowers\/\NumberOfFolloweds\/\NumberOfFavourites\/\NumberOfCreatedEvents\ fields to \UserDto\. Additionally, all DTOs now include \SwaggerSchema\ attributes for API documentation, and \UpdateUserDto\ now includes an \Id\ field.
source/EventHub.Application/SeedWork/DTOs/User · high confidence
User entity refactored to Domain-Driven Design aggregate with soft-delete and domain events
The User entity has been moved to the UserAggregate and restructured as an AggregateRoot, introducing explicit domain event management (RaiseDomainEvent, GetDomainEvents) and enforcing soft-delete semantics via IsDeleted and DeletedAt fields. The class now inherits from IdentityUser\<Guid\> and includes tracking for CreatedAt and UpdatedAt. Additionally, the Avatar property was renamed to AvatarUrl, and a new AvatarFileName property was added to support file-based avatar storage, while navigation properties were updated to reflect the new aggregate structure.
source/EventHub.Domain/Aggregates/UserAggregate · high confidence
Dependencies
Project structure refactored and dependencies updated
The project has been reorganized into a clean architecture with new \EventHub.Application\, \EventHub.Domain.Shared\, \EventHub.Infrastructure.Persistence\, and \EventHub.Infrastructure.SignalR\ layers, replacing the previous \EventHub.Usecase\ and \EventHub.Infrastructor\ structures. This restructuring introduces several new dependencies including Dapper, MediatR, Stripe.net, Microsoft.ML, Quartz.AspNetCore, and MinIO, while updating others such as Microsoft.Azure.SignalR (1.26.0 to 1.27.0) and Swashbuckle.AspNetCore (6.4.0 to 6.7.2).
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 35 → 35 (+0.1)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 83 → 74 (-9.4)
- Architecture 89 → 89 (+0.0)
- Maturity 59 → 63 (+4.0)
- Readiness 21 → 21 (+0.0)
- Security 51 → 43 (-8.1)
- Domain Modelling 30 → 34 (+4.5)
- Event-Driven 75 → 75 (+0.0)
Resolved (16)
- Bounded contexts not declared
- Concentrated knowledge decay
- Duplicated block (17 lines × 2) (source/EventHub.Application/Commands/Coupon/CreateCoupon/CreateCouponCommandValidator.cs)
- Duplicated block (33 lines × 2) (source/EventHub.Application/Commands/Event/CreateEvent/CreateEventCommandValidator.cs)
- Duplicated block (33 lines × 2) (source/EventHub.Infrastructure/Services/NotificationService.cs)
- Duplicated block (7 lines × 2) (source/EventHub.Application/SeedWork/Attributes/ClaimRequirementFilter.cs)
- Duplicated block (7 lines × 2) (source/EventHub.Infrastructure/FilesSystem/AzureFileService.cs)
- Duplicated block (8 lines × 3) (source/EventHub.Infrastructure.Persistence/SeedWork/Repository/CachedRepositoryBase.cs)
- Largest orphaned file (source/EventHub.Infrastructure.Persistence/Data/ApplicationDbContextSeed.cs)
- Low: security finding (details withheld)
- Low: security finding (details withheld)
- No exposed public API
- Off-boarding risk: anonymized user #1
- Secret: generic-api-key (source/EventHub.Presentation/appsettings.json)
- redundant comment (source/EventHub.Domain.Shared/Helpers/PagingHelper.cs)
- redundant comment (source/EventHub.Infrastructure/Configurations/ApplicationConfiguration.cs)
New (136)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- AnalyzerSeverityNone (.editorconfig)
- …and 116 more
API surface
- Unchanged — 114 HTTP endpoints
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
tranvuongduy2003/archived-EventHub was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 5be8f50b3e59f0ff7a99eb422041b05a99f97661 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.