Abdulrahman-Tayara/warehousing-and-accounting-management-system
52.3
Adequate · 21 September 2026
9.3k
lines of production code
C#
primary language
4
measurements over time
What this system is
This is a warehouse management and accounting system built on .NET Core, designed to manage inventory, financial transactions, and user access. It provides comprehensive CRUD operations for products, warehouses, accounts, and invoices, while automatically generating accounting journals and notifications for stock levels. The system enforces strict role-based access control and supports multi-currency transactions with a clean, layered architecture.
Features
Add CRUD commands for Unit entity
Users can now create, update, and delete Units through new command handlers. Each operation (Create, Update, Delete) is secured with specific authorization attributes requiring Write, Update, or Delete permissions on the Units resource respectively.
Application/Commands/Units · high confidence
Add DTOs for product, category, and country origin management
Introduces new Data Transfer Objects to support creating, updating, and querying products, categories, and country origins. Product DTOs include CreateProductRequest, UpdateProductRequest, ProductViewModel, ProductJoinedViewModel (which computes a full name from name, unit, and manufacturer), and query parameters for listing, searching by name, and retrieving products in storage. Category and Country Origin DTOs follow the same pattern with Create/Update requests, ViewModels, and query params. The MinLevel field is exposed in both the ProductViewModel and ProductJoinedViewModel.
Presentation/Dto/Products · high confidence
Add IdentityResult extension for error message retrieval
A new extension method, GetErrorsAsString, has been added to the IdentityResult class. This utility allows users to easily retrieve the first error description from an IdentityResult object as a string, simplifying error handling in the application.
Infrastructure/Extensions · high confidence
Add authorization-gated queries for roles and user roles
New query handlers have been introduced to retrieve all roles, a specific role, all user-role mappings, and a specific user's roles. Each query is protected by an \[Authorize\] attribute requiring Read access to the Roles resource, ensuring that only authorized users can access these data retrieval endpoints.
Application/Queries/Authorization · high confidence
Add commands for creating, updating, and deleting storage places
Introduces new commands to manage storage places, including CreateStoragePlaceCommand, UpdateStoragePlaceCommand, and DeleteStoragePlaceCommand. Each command is secured with an \[Authorize\] attribute requiring 'Update' permission on 'Warehouses'. The create and update commands support a new 'Description' field and validate that the associated 'WarehouseId' exists in the system before processing.
Application/Commands/StoragePlaces · high confidence
Add commands for creating, updating, and deleting warehouses
Users can now create, update, and delete warehouses through the application's command layer. Creating a warehouse automatically generates a linked cash drawer account. Each operation is secured with specific authorization requirements for write, update, and delete actions on the Warehouses resource.
Application/Commands/Warehouses · high confidence
Add create, update, and delete commands for Categories and Country Origins
New command handlers are introduced for the Category and CountryOrigin entities, each supporting Create, Update, and Delete operations. These commands are secured with \[Authorize\] attributes requiring Write, Update, or Delete permissions on the respective resources, and they map to their corresponding repositories to manage the lifecycle of these domain objects.
Application/Commands/Categories · high confidence
Add create, update, and delete commands for manufacturers
The application now supports creating, updating, and deleting manufacturers. Each operation is implemented as a dedicated command handler (CreateManufacturerCommand, UpdateManufacturerCommand, DeleteManufacturerCommand) that enforces write-level authorization on the Manufacturers resource.
Application/Commands/Manufacturers · medium confidence
Add create, update, and delete operations for Currencies
Users can now create, update, and delete currencies through the application's command handlers. This adds the ability to manage currency entities with full CRUD operations (Create, Update, Delete) secured by authorization policies requiring Write, Update, and Delete permissions respectively.
Application/Commands/Currencies · high confidence
Add currency query endpoints with pagination and name search
New query handlers for currencies have been introduced, including GetAllCurrenciesQuery for paginated listing and GetCurrencyQuery for single-item retrieval. Both endpoints are secured with \[Authorize\] attributes requiring Read access to the Currencies resource. The list endpoint supports filtering by name via a new Name query parameter, enabling users to search currencies by name while navigating paginated results.
Application/Queries/Currencies · high confidence
Add manufacturer query endpoints with pagination and search
Users can now retrieve a paginated list of all manufacturers and search by name, as well as fetch a single manufacturer by ID. These new query handlers implement the standard read authorization and support the existing pagination and filtering infrastructure.
Application/Queries/Manufacturers · high confidence
Add product retrieval queries with pagination and filtering
Users can now retrieve products via three new read endpoints: a paginated list of all products with optional name filtering, a paginated list of products within a specific storage place (including children), and a single product by ID. All endpoints enforce read authorization and support pagination parameters.
Application/Queries/Products · high confidence
Add storage place queries with filtering and pagination
New queries are introduced to retrieve storage places and their associated inventory data. The GetAllStoragePlacesQuery supports filtering by name, warehouse ID, parent status, and container ID, with results returned in a paginated format. The GetStoragePlaceQuery allows fetching a single storage place by ID. Additionally, the InventoryStoragePlaceQuery enables paginated retrieval of aggregated storage place quantities based on product movement filters. All queries are secured with appropriate authorization attributes.
Application/Queries/StoragePlaces · high confidence
Added CurrencyAmountViewModel for mapping currency amounts
A new view model, CurrencyAmountViewModel, has been introduced in the Presentation/Dto/CurrencyAmounts directory. This class maps the CurrencyAmount domain entity to a DTO containing a Key, an Amount (double), and a Currency object, facilitating the presentation of currency data in the application's user interface or API responses.
Presentation/Dto/CurrencyAmounts · high confidence
Added DTOs for Account CRUD operations
Introduced new data transfer objects in the Presentation layer to support Account management. This includes an AccountViewModel for data display, query parameters supporting name-based search, and request models for creating and updating accounts, enabling the backend to process account creation, updates, and filtered retrieval.
Presentation/Dto/Accounts · high confidence
Added DTOs for manufacturer creation, update, and listing
Introduced new Data Transfer Objects to support manufacturer management: CreateManufacturerRequest and UpdateManufacturerRequest handle input for creating and updating manufacturers, while ManufacturerViewModel defines the structure for returning manufacturer data. Additionally, ManufacturersQueryParams enables filtering the list of manufacturers by name.
Presentation/Dto/Manufacturers · high confidence
Added DTOs for unit management
Introduced new Data Transfer Objects to support the creation, retrieval, and updating of units. This includes CreateUnitRequest and UpdateUnitRequest for handling input data, UnitViewModel for displaying unit details, and UnitsQueryParams to enable filtering units by name.
Presentation/Dto/Units · high confidence
Added account management commands for creating, updating, and deleting accounts
The application now supports full CRUD operations for accounts through new command handlers. Users can create new accounts with details like code, name, phone, and city; update existing account information; and delete accounts. Each operation is secured with specific authorization requirements (Write, Update, or Delete) on the Accounts resource.
Application/Commands/Accounts · high confidence
Added application-level exception classes and status code constants
New exception classes—ForbiddenAccessException, InvalidCredentialException, and NotFoundException—have been added to the Application layer, each inheriting from a shared BaseException. These exceptions map to specific HTTP status codes (403, 404, 402) defined in a new StatusCodes class, enabling the application to handle and report these specific error conditions consistently.
Application/Exceptions · high confidence
Added conversion management commands and queries
Users can now create and retrieve conversion records. A new command allows initiating a conversion by specifying source and destination warehouses, products, places, and quantities, which automatically generates corresponding export and import invoices. A new query endpoint retrieves all conversion records for listing or review.
Application/Commands/Conversions, Application/Queries/Conversions · high confidence
Added conversion request and view model for product transfers
Users can now initiate product conversions (transfers) between warehouses and storage places. This change introduces a new CreateConversionRequest DTO to capture transfer details such as source and destination warehouses, products, and quantities, along with a ConversionViewModel to represent the conversion state in the presentation layer.
Presentation/Dto/Conversions · high confidence
Added payment creation command
Users can now create a new payment for an invoice. This change introduces the CreatePaymentCommand and its handler, which processes payment details (amount, currency, type) and persists the new payment record. Upon successful creation, a notification is published to signal that a payment has been created.
Application/Commands/Payments · high confidence
Added payment retrieval queries with filtering and authorization
Users can now retrieve individual payments by ID or fetch a paginated list of all payments. The list query supports filtering by invoice ID, payment type, and IO type, with all access controlled by an \[Authorize\] attribute requiring Read permission on Invoices.
Application/Queries/Payments · high confidence
Added role management commands for creating, updating, and deleting roles
New command handlers have been introduced for role management, allowing users to create, update, and delete roles with associated permissions. The system now supports creating a new role with a name and permissions, updating an existing role's name and permissions, and deleting a role by ID. Additionally, a new command allows updating the roles assigned to a specific user, enabling the assignment of multiple roles to a user in a single operation.
Application/Commands/Authorization · high confidence
Added user management commands for creation, deletion, and updates
The application now supports creating, deleting, and updating users through new command handlers. The CreateUserCommand allows creating a user with an optional list of role IDs to assign. The DeleteUserCommand removes a user by ID, and the UpdateUserCommand modifies a user's username. All commands are secured with \[Authorize\] attributes requiring appropriate permissions on the Users resource.
Application/Commands/Users · high confidence
Adds default currency seeding for the Syrian Pound
The application now includes a database seeder that automatically creates a default currency entry (Syrian Pound, code SYP) if one does not already exist. This ensures the system has a primary currency configured upon initial database setup, with the default currency ID updated in the application settings.
Infrastructure/Persistence/Database/Seeders/Currencies · high confidence
Adds generic ViewModel extension methods for mapping entities to view models
The Presentation/Dto/Common directory now includes a new IViewModel interface and a ViewModelExtensions class. The extensions provide generic methods (ToViewModel, ToViewModels, and a paginated variant) that use AutoMapper to map entities to view models, including support for pagination metadata such as RowsCount, CurrentPage, PagesCount, and PageSize. This enables consistent conversion of domain entities into view models across the application.
Presentation/Dto/Common · medium confidence
Initial Presentation layer setup with snake\_case JSON serialization and Swagger documentation
The Presentation layer is introduced, configuring the ASP.NET Core application with dependency injection for controllers, a custom JSON serializer that converts property names to snake\_case, and Swagger/OpenAPI documentation with Bearer token security definitions. The application pipeline is configured to use CORS allowing all origins, methods, and headers, and to apply authentication and authorization middleware. Configuration files are added to support in-memory or local database connections and database seeding at startup.
Presentation · high confidence
Initial account seeding for core business operations
The application now automatically creates default accounts for key areas including main sales, purchases, exports, imports, cash drawers, sales and purchases returns, and conversions during database initialization. This ensures that essential accounts are present in the system from the start, supporting the foundational accounting structure.
Infrastructure/Persistence/Database/Seeders/Accounts · high confidence
Initial database schema and core domain models
The database schema is established with the initial migration, creating tables for user and role management (AspNetUsers, AspNetRoles), application settings, and core business entities including Categories, Currencies, Manufacturers, and Products. Subsequent migrations add support for Warehouses, Accounts (with Name, Code, Phone, and City), Storage Places linked to warehouses, a MinLevel threshold for Products, and the foundational tables required for invoicing and accounting operations.
Infrastructure/Migrations · high confidence
Initial database schema and persistence layer setup
The application introduces a new Entity Framework Core persistence layer, defining an \ApplicationDbContext\ that maps to a SQL Server database. This includes DbSets for core domain entities such as Products, Categories, Manufacturers, Warehouses, Accounts, and Invoices. The context is configured with a global query filter to automatically exclude soft-deleted records and integrates with an event publishing service to handle domain events during save operations.
Infrastructure/Persistence/Database · high confidence
Initial project structure and CI/CD setup
The repository was initialized with a .NET Core 6.0 solution organized in a Clean Architecture layout (Domain, Application, Infrastructure, Presentation, Authentication, and Authorization layers). A GitLab CI pipeline was added to build and deploy the application to Heroku, and a Dockerfile was created to containerize the ASP.NET Core application. The change also includes a .gitignore update to exclude local appsettings files and a SQL script for database cleanup.
(repo-wide) · high confidence
Introduce JWT-based authentication and standardized API response models
This change adds a new authentication module that enables JWT-based login, including the \AuthenticationService\ implementation, DTOs for login requests and results, and dependency injection configuration for JWT bearers. Simultaneously, it introduces a standardized response structure in the presentation layer, featuring a generic \BaseResponse\<T\>\ wrapper with metadata, a \NoDataResponse\ for empty payloads, and specific validation error handling via \BadRequestResponse\ and \BadRequestObjectResult\.
Authentication, Presentation/Dto/Common/Responses · high confidence
Introduce automated AutoMapper profile registration
Added a new \IMapFrom\<T\>\ interface and a \MappingProfiles\ class that automatically discovers and registers all types implementing this interface as bidirectional mappings. This allows developers to define mapping configurations directly on their DTOs and entities, simplifying the setup of AutoMapper profiles.
Application/Common/Mappings · high confidence
Introduce currency management data transfer objects
New DTOs are added to support currency operations: CreateCurrencyRequest and UpdateCurrencyRequest define the input structure for creating and updating currencies, CurrencyViewModel exposes the public fields (Id, Name, Symbol, Factor), and CurrenciesQueryParams enables name-based search via a query parameter.
Presentation/Dto/Currencies · high confidence
Introduce extensible query filter system for API search
Added a new query filter framework in the Application layer that allows APIs to apply dynamic, attribute-driven search conditions to entity queries. The change introduces a \FilterConditionAdapter\ that reads \QueryFilterAttribute\ configurations to build LINQ expressions for comparisons (equal, less/greater than, string contains, in-array) and combines them using configurable AND/OR logic. This enables developers to add search capabilities to any API by simply decorating properties with attributes, rather than writing manual query logic.
Application/Common/QueryFilters · high confidence
Introduce policy-based authorization and default admin/temp user seeding
The application now supports policy-based authorization, implemented via a custom \ApplicationAuthorizationPolicyProvider\ and \PoliciesAuthorizationHandler\ that validate user permissions against defined policies. To support this, an \ApiCurrentUserService\ was added to extract the current user's ID from JWT claims. Additionally, a \UsersRolesSeeder\ was introduced to automatically create default 'admin' and 'temp' users and roles with specific permissions during database initialization.
Authorization, Infrastructure/Persistence/Database/Seeders/UsersRoles, Presentation/Services · high confidence
Introduce policy-based authorization framework
Added core components for a new policy-based authorization system, including the \AuthorizeAttribute\ for marking controllers or actions, \Permissions\ and \Policy\ classes to define resource and method-level access rules, and helper classes (\PolicyHelper\, \PolicyAuthorizer\) to parse and evaluate these policies. This establishes the foundational structure for securing application endpoints with granular permission checks.
Application/Common/Security · high confidence
Introduce soft-delete support for database models
Added a new \ISoftDeletable\ interface and a corresponding extension method \FilterSoftDeletedModels\ to the persistence layer. This change enables models to implement soft deletion, allowing the system to filter out deleted records from query results automatically.
Infrastructure/Persistence/Database/Models/Common · high confidence
Introduce storage place data transfer objects and query parameters
Added new DTOs for managing storage places, including request models for creating and updating storage places with fields for name, container ID, and description. A view model was introduced to expose storage place details including warehouse association and container status. Additionally, query parameters were added to support filtering by name, parent status, and container ID, enabling search and filtering capabilities for storage places.
Presentation/Dto/StoragePlaces · high confidence
Introduce user and authentication DTOs
Added new Data Transfer Objects for user management and authentication, including LoginRequest, LoginResponse, CreateUserRequest, UpdateUserRequest, UserViewModel, and UsersQueryParams. These DTOs support creating, updating, and querying users, as well as handling login requests and responses. The UserViewModel excludes the PasswordHash field from serialization, and the UsersQueryParams supports filtering by username.
Presentation/Dto/Users · high confidence
Introduces ApplicationSettings configuration class
A new ApplicationSettings class has been added to the application, defining default account IDs for currency, sales, purchases, cash drawers, exports, imports, conversions, and returns. This provides a centralized configuration for default account mappings used across the application.
Application/Settings · high confidence
Introduces Unit of Work pattern for database transaction management
A new UnitOfWork implementation has been added to the Infrastructure layer, providing a centralized mechanism for managing database transactions across multiple repositories. This change enables the system to group related database operations—such as creating invoices, processing payments, and managing user roles—within a single transactional boundary, ensuring data consistency when committing changes.
Infrastructure/Repositories/UnitOfWork · high confidence
Introduces Unit of Work pattern for domain repositories
A new IUnitOfWork interface has been added to the Application layer, providing a centralized access point for a wide range of domain repositories, including Invoice, Payment, Journal, and Conversion repositories. This change establishes the foundation for managing transactions and coordinating changes across multiple aggregates, supporting new invoicing and payment capabilities.
Application/Repositories/UnitOfWork · high confidence
Introduces a database seeding framework for initial data population
Adds a new database seeding infrastructure that allows the application to populate initial data such as accounts, currencies, and user roles. The change introduces a base \ISeeder\ interface and a \DatabaseSeeder\ orchestrator that manages the execution of specific seeders (e.g., \AccountsSeeder\, \CurrenciesSeeder\, \UsersRolesSeeder\) against the database context.
Infrastructure/Persistence/Database/Seeders · high confidence
Introduces a new notification query with filtering and sorting
A new GetAllNotificationsQuery and its handler are added to the Application layer, enabling retrieval of notifications with optional filtering by object IDs, notification type, and validity status (via a new ValidOnly parameter), and sorting by ID in descending order.
Application/Queries/Notifications · high confidence
Introduces a new view model for storage place quantity data
A new DTO, StoragePlaceQuantityViewModel, has been added to the Presentation layer. This view model aggregates product details, storage place information, and quantity data, enabling the application to return structured responses for storage place inventory queries.
Presentation/Dto/StoragePlaceQuantity · high confidence
Introduces comprehensive database models for the new persistence layer
The infrastructure layer now includes a full set of Entity Framework Core models for the database, including Account, ApplicationIdentityUser, ApplicationRole, ApplicationSetting, Category, Conversion, CountryOrigin, Currency, Invoice, Journal, Manufacturer, Notification, Payment, Product, ProductMovement, StoragePlace, Unit, and Warehouse. These models define the database schema and mappings for the application's core entities, supporting features like multi-currency amounts, inventory conversions, and financial journaling.
Infrastructure/Persistence/Database/Models · high confidence
Introduces core domain entities for accounting, inventory, and invoicing
The system now includes a comprehensive set of domain entities to support financial and inventory operations. This includes the Invoice entity, which tracks sales and purchases with status management (open/closed) and item associations. The model also introduces Currency, CurrencyAmount, and Journal entities to handle multi-currency transactions and double-entry bookkeeping. Additionally, new entities for Product, Manufacturer, Category, Unit, and Storage Place are added, along with supporting types like Conversion and Payment. These changes provide the foundational data structures required for managing stock movements, financial ledgers, and invoice processing.
Domain/Entities · high confidence
Introduces core service interfaces for identity, events, and settings
Added new interfaces for application services: IEventPublisherService for publishing domain events, ICurrentUserService to identify the current user, IIdentityService for password checking, user lookup, and authorization, and IApplicationSettingsProvider for managing application settings. These interfaces establish the foundation for authentication, authorization, and configuration management within the application layer.
Application/Services · high confidence
Introduces domain event infrastructure for product min-level updates
A new domain event, ProductMinLevelUpdated, is introduced to track changes to a product's minimum level, capturing the previous and new values. This event is wrapped in a generic DomainNotification for processing and includes helper methods to determine if the level increased or decreased. The underlying DomainEvent base class and INotification wrapper are also added to support this new capability.
Application/Common/Events, Domain/Events · high confidence
Introduces domain exception types for invoice and product state validation
The Domain/Exceptions directory now contains a new base exception class, BaseException, which includes a numeric Code property. This base is extended by several new domain-specific exceptions: InvoiceClosedException and InvoiceOpenedException to handle invoice state checks, OverPayedException for payment validation, IncompatiblePaymentIoTypeException for IO type mismatches, and ZeroLevelExceededException and ProductMinLevelExceededException for inventory level violations. A StatusCodes class is also added to define the integer codes for each exception type.
Domain/Exceptions · high confidence
Introduces infrastructure for database persistence, identity, and settings
The application now supports configurable database connections (In-Memory or SQL Server) with automatic migration and seeding at startup. It also introduces ASP.NET Core Identity for user authentication and role-based authorization, alongside a new system for managing application settings via the database. A soft-delete mechanism is implemented to mark records as deleted rather than removing them from the database.
Infrastructure · high confidence
Introduces invoicing, journaling, and notification management commands
Users can now create invoices, generate accounting journals, and manage notifications through new application commands. The invoicing feature allows creating invoices with items, currency amounts, and optional stock level warnings, while also triggering related journal entries and notifications. The journaling command handles debit/credit accounting entries between accounts. The notification commands support creating and updating notification records. All commands include authorization checks and validation rules (e.g., preventing empty invoices).
Application/Commands/Invoicing · high confidence
Introduces new DTOs for payment operations
Adds new data transfer objects to support payment workflows: CreatePaymentRequest for submitting new payments, GetAllPaymentsRequest for filtering and paginating payment lists, and PaymentViewModel for displaying payment details including currency and associated amounts.
Presentation/Dto/Payments · high confidence
Introduces repository interfaces for domain entities
The application layer now defines repository interfaces for a wide range of domain entities, including Account, Category, Conversion, CountryOrigin, Currency, Invoice, Journal, Manufacturer, Notification, Payment, Product, Role, StoragePlace, Unit, User, and Warehouse. These interfaces extend a new generic IRepositoryCrud base that provides standard Create, Read, Update, and Delete operations, along with specialized methods for product aggregation and journaling.
Application/Repositories · high confidence
Launches comprehensive API for warehouse management and inventory tracking
This update introduces a full suite of RESTful API endpoints for managing warehouse operations, including CRUD operations for warehouses, storage places, and inventory levels. It also adds endpoints for managing core business entities such as products, categories, manufacturers, currencies, and units. Additionally, the release includes APIs for invoicing, payments, journal entries, and user management, all secured with authorization and supporting pagination and filtering.
Presentation/Controllers/Api · high confidence
New Product Quantity View Model
A new view model for product quantity data has been introduced, containing properties for product details, input quantities, output quantities, and a calculated quantity sum. This supports the addition of a warehouse inventory report by providing a structured data transfer object for product quantity information.
Presentation/Dto/ProductQuantity · high confidence
New accounting queries for account statements and journal entries
Added two new application queries in the Accounting namespace: GetAccountStatementQuery, which retrieves an aggregate account statement including debit/credit totals and currency details, and GetJournalEntriesQuery, which supports paginated retrieval of journal entries filtered by source and destination accounts. Both queries include authorization attributes for Journals and Accounts resources.
Application/Queries/Accounting · medium confidence
New authorization endpoints for policies, roles, and user-role assignments
The API now exposes new controllers and DTOs to manage authorization resources. Users can retrieve a list of all policies (methods and resources), and perform full CRUD operations on roles (create, read, read all, update, delete). Additionally, endpoints are provided to query and update the roles assigned to specific users.
Presentation/Controllers/Api/Authorization, Presentation/Dto/Authorization · high confidence
New data transfer objects for currency, notifications, and product movement filtering
Three new DTOs have been added to the application layer to support new functionality. CurrencyAmountDto provides a structured way to represent monetary values with a currency ID and a double value. NotificationDto encapsulates notification metadata, including an object ID and a notification type. ProductMovementFilters introduces a comprehensive set of query filters for product movements, allowing searches by product IDs, category, account, date range, warehouse, manufacturer, country of origin, and storage place.
Application/Common/Dtos · high confidence
New domain aggregates for account statements, product quantities, storage places, and invoice payments
The domain layer introduces several new aggregation roots to support financial and inventory tracking. AggregateAccountStatement calculates debit/credit sums and a Result field for account statements. AggregateProductQuantity tracks input/output quantities and provides methods to check if stock exceeds zero or minimum levels. AggregateStoragePlaceQuantity links products to specific storage places. InvoicePayments manages the lifecycle of invoice payments, including validation of payment types, overpayment checks, and automatically closing an invoice when payments fully settle it.
Domain/Aggregations · high confidence
New invoicing queries for product quantity checks and invoice retrieval
Added new application queries to support invoicing workflows: a CheckProductQuantityQuery validates product stock levels (throwing exceptions for zero or minimum level breaches), while GetAllInvoicesQuery, GetInvoiceQuery, GetProductMovementsQuery, and two new queries for min-level warnings/warnings provide read access to invoices, movements, and product status. These changes enable the application to verify inventory constraints and retrieve invoice-related data through the MediatR pipeline.
Application/Queries/Invoicing · high confidence
New notification query parameters and view model
Added GetNotificationsQueryParams to support filtering notifications by object IDs, notification type, and a new ValidOnly boolean parameter. Added NotificationViewModel to expose notification details including a linked ProductViewModel, notification type, and validity status.
Presentation/Dto/Notifications · medium confidence
New repositories for invoice payments and user roles
Added new repository implementations for managing invoice payments and user roles. The InvoicePaymentsRepository handles finding and saving invoice payment aggregates, while the UserRolesRepository provides methods to find, update, and list user roles and permissions. These changes enable new capabilities for managing payment records and user role assignments within the system.
Infrastructure/Repositories/Aggregates · medium confidence
New repository implementations for domain entities
The infrastructure layer now provides concrete repository implementations for a wide range of domain entities, including Account, Category, Conversion, CountryOrigin, Currency, Invoice, Journal, Manufacturer, Notification, Payment, Product, ProductMovement, Role, StoragePlace, Unit, User, and Warehouse. Most repositories extend a generic \RepositoryCrud\ base class that supplies standard Create, Read, All, Update, and Delete operations. Specialized logic is included for specific entities: \ProductMovementRepository\ aggregates product quantities by product and storage place; \ProductRepository\ tracks minimum stock level warnings and resolutions; \UserRepository\ and \RoleRepository\ integrate with ASP.NET Core Identity for user and role management; and \JournalRepository\ supports creating paired debit/credit entries.
Infrastructure/Repositories · high confidence
New repository interfaces for invoice payments and user roles
Added new repository interfaces to support domain operations: IInvoicePaymentsRepository provides methods to find invoice payments by ID and save them, while IUserRolesRepository exposes methods to find, update, and retrieve all user roles. These interfaces establish the data access contracts for these aggregates.
Application/Repositories/Aggregates · medium confidence
Product management commands for create, update, and delete operations
Users can now create, update, and delete products through dedicated command handlers. The create and update commands handle product details including name, category, manufacturer, country of origin, unit, barcode, price, currency, and minimum stock level. The update command specifically handles the MinLevel field, which is now a non-nullable integer with a default value of zero. Each command is secured with authorization attributes requiring appropriate write, update, or delete permissions on the Products resource.
Application/Commands/Products · high confidence
Warehouse query endpoints with search, pagination, and inventory reporting
Users can now retrieve all warehouses with optional name-based filtering and paginated results, fetch a specific warehouse by ID, and generate an inventory report aggregating product quantities. All warehouse query endpoints are secured with read authorization, and the inventory report leverages the product movement repository to aggregate data.
Application/Queries/Warehouses · high confidence
Removals
Removed WMS application entry point
The main entry point for the WMS application (Program.cs) has been deleted. This removes the configuration for ASP.NET Core services, including controllers, Swagger/OpenAPI endpoints, and middleware for HTTPS redirection and authorization.
wms · high confidence
Behavioural changes
Add DTOs for warehouse management endpoints
New data transfer objects are introduced to support warehouse operations: CreateWarehouseRequest and UpdateWarehouseRequest define the input structure for creating and updating warehouses, each requiring a name and location; WarehouseViewModel exposes the Id, Name, and Location for display; and WarehousesQueryParams enables filtering by name in list queries.
Presentation/Dto/Warehouses · high confidence
Add account retrieval queries with authorization and search
New MediatR query handlers for retrieving accounts have been introduced. GetAccountQuery fetches a single account by ID, while GetAllAccountsQuery supports paginated retrieval with optional name-based filtering. Both queries are protected by an \[Authorize\] attribute enforcing read access to the Accounts resource, ensuring that only authorized users can access account data.
Application/Queries/Accounts · high confidence
Add paginated and searchable category queries with authorization
Users can now retrieve all categories via a new paginated endpoint that supports filtering by name. Both the list and single-item category queries are protected by read authorization on the Categories resource, ensuring that only authorized users can access this data.
Application/Queries/Categories · medium confidence
Add paginated retrieval and name-based search for units
Users can now retrieve all units via a paginated endpoint that supports filtering by name, as well as fetch individual units by ID. The new GetAllUnitsQuery and GetUnitQuery handlers implement read access controls and pagination, enabling efficient browsing and targeted lookups of unit data.
Application/Queries/Units · medium confidence
Add paginated user listing with search and authorization
Users can now retrieve a paginated list of all users via the GetAllUsersQuery, which supports filtering by username (search) and enforces read authorization on the Users resource. A separate GetUserQuery remains for fetching a single user by ID, though it currently lacks the authorization attribute present on the paginated endpoint.
Application/Queries/Users · medium confidence
Added MediatR pipeline behaviors for request validation and authorization
The application now enforces request validation and authorization checks via MediatR pipeline behaviors. The new ValidationBehaviour automatically validates incoming requests using FluentValidation, throwing a ValidationException if any validator fails. Additionally, the new AuthorizationBehaviour intercepts requests marked with the \[Authorize\] attribute, verifying the user is authenticated and authorized via the IIdentityService before the request handler executes.
Application/Common/Behaviours · high confidence
Added country origin query endpoints with read authorization
Users can now retrieve a paginated list of country origins and fetch a specific country origin by ID. Both queries are protected by an \[Authorize\] attribute requiring Read access to the Countries resource, ensuring that only authorized users can access this data. The list endpoint supports filtering by name, while the single-item endpoint retrieves by ID.
Application/Queries/CountryOrigins · high confidence
Added query parameters for filtering inventory by product
A new query parameter class, InventoryByProductQueryParams, has been introduced to support filtering inventory data. This enables users to filter inventory records by product IDs, category, account, date range (start/end date), warehouse, manufacturer, country of origin, and storage place.
Presentation/Dto/Inventory · medium confidence
Adds authentication and authorization infrastructure
The application now includes core identity and security services. The new ApplicationUserClaimsPrincipalFactory generates user claims and merges role-based permissions into a single claim for authorization checks. The IdentityService provides methods to verify passwords, find users, and perform authorization checks using policies and permission strings. Additionally, an EventPublisherService is introduced to bridge domain events with the MediatR notification system, enabling event-driven communication within the application.
Infrastructure/Services · medium confidence
Application layer dependency injection and validation pipeline configured
The Application layer now registers MediatR and FluentValidation, adding a ValidationBehaviour pipeline to automatically validate requests. It also registers an AuthorizationBehaviour, configures AutoMapper with mapping profiles, and sets up a lazy-loading dependency injection helper.
Application · medium confidence
Automated journaling for invoices and payments, plus min-level notifications
The system now automatically creates accounting journal entries when invoices are created or payments are processed, ensuring that cash drawer, sales, and purchases accounts are updated in real time. Additionally, the application now sends notifications when product stock levels fall below or rise above configured minimum thresholds, allowing users to monitor inventory status proactively.
Application/EventNotifications · high confidence
Centralized exception handling for API errors
A new global exception filter has been introduced to standardize how the application responds to errors. This filter intercepts exceptions and maps them to specific HTTP status codes and error messages for the client. Validation errors are returned as 400 Bad Request, forbidden access attempts as 403 Forbidden, and other known domain exceptions (such as product minimum level exceeded) are handled with their respective codes. Unknown or unhandled exceptions default to a 500 Internal Server Error. This ensures consistent error responses across the API.
Presentation/Filters · high confidence
Introduce generic paginated query handler
A new generic query handler, GetPaginatedQuery, has been added to the Application layer. This component provides a standardized way to retrieve paginated lists of entities, supporting page number and size parameters. It includes a base handler that applies filters and returns a paginated result, allowing existing endpoints to be refactored to use this common pattern for improved consistency and reduced duplication.
Application/Queries/Common · high confidence
Introduce paginated query extension for list endpoints
A new \PaginatedEnumerable\ model and \AsPaginatedQuery\ extension method have been added to the \Application/Common/Models\ namespace. This provides a standardized way to handle pagination for all 'get-all' endpoints, exposing metadata such as \CurrentPage\, \PageSize\, \PagesCount\, and \RowsCount\ to support frontend pagination controls.
Application/Common/Models · high confidence
Introduce pagination support for list endpoints
Added new DTOs to support pagination across all 'get-all' endpoints. The \PageViewModel\<T\>\ model now includes a \RowsCount\ property alongside existing pagination metadata, while \PaginationRequestParams\ provides standard \page\ and \page\_size\ query parameters. A new extension method \AsQuery\ allows these parameters to be easily mapped to internal query objects, enabling consistent paginated responses.
Presentation/Dto/Pagination · medium confidence
Introduces generic command handlers for entity CRUD operations
Added three new generic command handler classes in the Application layer to standardize Create, Update, and Delete operations for entities. The new CreateEntityCommandHandler, UpdateEntityCommandHandler, and DeleteEntityCommandHandler leverage the existing IRepositoryCrud interface and MediatR, allowing specific entity commands to inherit common behavior without duplicating repository calls or save logic.
Application/Commands/Common · high confidence
Introduces new DTOs and query parameters for invoice management
The invoice API surface is expanded with new data transfer objects and query parameters. A CreateInvoiceRequest is added to handle invoice creation with account, warehouse, and currency details. An InvoiceViewModel is introduced to expose invoice details including account, warehouse, and currency information. Query parameters are added to support filtering invoices by type, account type, account ID, and warehouse ID. Additionally, a ProductMovementViewModel is introduced to represent product movements associated with invoices, including product, storage place, quantity, and currency amounts.
Presentation/Dto/Invoices · high confidence
New account statement view models for UI binding
Added AccountStatementViewModel and AccountStatementDetailViewModel classes in the Presentation/Dto/Accounting namespace. These view models expose account statement data, including debit/credit sums, individual line items, and currency information, enabling the presentation layer to bind account statement queries to the UI.
Presentation/Dto/Accounting · medium confidence
New query parameters and view model for journal entries
Added GetAllJournalsQueryParams and GetAllCashDrawerJournalsQueryParams classes to handle pagination and account filtering for general and cash drawer journals, alongside a new JournalViewModel that exposes source account, account, debit, credit, and currency details for each journal entry.
Presentation/Dto/Journals · high confidence
Test coverage
Added unit tests for security policy and permission handling
Added unit tests for the application's security layer, specifically covering the Permissions class, PolicyAuthorizer, and PolicyHelper. The new tests in Application.UnitTests verify that permissions can be correctly parsed from strings (including 'all', 'none', and specific resource/method combinations), that the PolicyAuthorizer correctly validates access based on policies, and that policy strings are accurately converted to and from structured representations.
Application.UnitTests · 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
Score
- CAI 53 → 52 (-0.2)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 84 → 83 (-1.3)
- Architecture 87 → 88 (+0.2)
- Maturity 47 → 47 (+0.0)
- Readiness 46 → 45 (-0.4)
- Security 48 → 49 (+0.4)
- Event-Driven 100 → 100 (+0.0)
Resolved (14)
- Bounded contexts not declared
- Duplicated block (11 lines × 2) (Infrastructure/Repositories/ProductRepository.cs)
- Inconsistent suffixes for DTOs: some use Request (e.g., CreateInvoiceRequest), while others use Params (e.g., CurrenciesQueryParams). This indicates a lack of strict convention for query parameters vs. command requests.
- Low cohesion: ExceptionFilter (LCOM4 4) (Presentation/Filters/ExceptionFilter.cs)
- Medium IaC: CKV_DOCKER_3 (Dockerfile)
- Medium IaC: CKV_DOCKER_3 (Presentation/Dockerfile)
- Medium IaC: CKV_DOCKER_7 (Dockerfile)
- Medium IaC: CKV_DOCKER_7 (Presentation/Dockerfile)
- No exposed public API
- Test runner surfaced no tests
- While 'Id' is a common name, there is a potential confusion between the DTO property 'Id' and the Query object property 'Id' (e.g., in GetInvoiceQuery). More critically, looking at wms.Dto.Invoices.InvoicesQueryParams.Type vs wms.Dto.Invoices.CreateInvoiceRequest.WarehouseId, the query params use Params suffix while requests use Request suffix. This is a minor inconsistency in DTO suffixes.
- dormant codebase — no living knowledge left to concentrate
- redundant comment (Application/EventNotifications/Products/ProductMinLevelUpdated/ProductMinLevelUpdatedHandler.cs)
- redundant comment (Presentation/Program.cs)
New (23)
- Documentation: no installation or build instructions (README.md)
- Documentation: no licence statement (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (11 lines × 2) (Infrastructure/Persistence/Database/Seeders/Accounts/AccountsSeeder.cs)
- Duplicated block (13 lines × 2) (Infrastructure/Persistence/Database/Models/PaymentDb.cs)
- Duplicated block (14 lines × 2) (Domain/Entities/Payment.cs)
- Duplicated block (17 lines × 2) (Application/Commands/Products/CreateProductCommand.cs)
- Duplicated block (17 lines × 2) (Presentation/Dto/Products/CreateProductRequest.cs)
- Duplicated block (24 lines × 2) (Infrastructure/Repositories/ProductRepository.cs)
- Duplicated block (27 lines × 2) (Application/Common/Dtos/ProductMovementFilters.cs)
- Duplicated block (7 lines × 2) (Presentation/Controllers/Api/InventoryController.cs)
- Duplicated block (7–13 lines × 2) (Domain/Entities/Invoice.cs)
- End-of-life runtime: .NET net6.0
- Medium IaC: WD-DOCKER-0003 (Dockerfile)
- Medium IaC: WD-DOCKER-0003 (Dockerfile)
- Medium IaC: WD-DOCKER-0003 (Presentation/Dockerfile)
- Medium IaC: WD-DOCKER-0003 (Presentation/Dockerfile)
- No dependency advisory monitoring
- WriteOnlyPrivateField (Application/Queries/Invoicing/GetProductsWithNewMinLevelWarnings.cs)
- WriteOnlyPrivateField (Authentication/Services/AuthenticationService.cs)
- …and 3 more
API surface
- Unchanged — 41 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
Abdulrahman-Tayara/warehousing-and-accounting-management-system 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 21 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 68fc5005c376d2a7fb622c95028ec5a28b49cc5f — 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.