com um clique
dotnet-microservices
dotnet-microservices contém 13 skills coletadas de DotNetLabX, com cobertura ocupacional por repositório e páginas de detalhe dentro do site.
Skills neste repositório
Propagate a business event across .NET microservice boundaries via MassTransit. Adds the contract record plus flat DTOs in Articles.IntegrationEvents.Contracts, a PublishIntegrationEventOn{Event} handler that re-fetches the aggregate and publishes, and auto-discovered consumers in the receiving services. Variant-aware for MediatR (INotificationHandler) and FastEndpoints (IEventHandler) publishers. Use when a domain event must cross a service boundary; not for an in-process reaction (that is a domain event handler) or a synchronous cross-service read (that is gRPC).
Add data-driven article stage-transition validation to a service — the ArticleStageTransition seed table, the IArticleStateMachine plus Stateless wrapper, the ArticleStateMachineFactory DI registration, and the ValidateStageTransition guard in the aggregate. Use when a service must gate ArticleStage changes by legal action, or when adding a new stage, action, or transition to a service that already has the machine.
Two-layer authorization for the article lifecycle — the closed UserRoleType role vocabulary, endpoint role+resource gates, per-service resource access checks, framework-specific identity stamping, and JWT validation. Use when gating an endpoint by role, adding a resource access check, stamping the acting user onto a command, configuring JWT authentication, or adding a new role.
Write MassTransit integration-event consumers in this repo — the consumer-class shape and primary-constructor dependencies, the three idempotency variants and when each fits, local reference-data hydration, and the split between a read-model projection and a write-side domain mutation. Use when adding or editing an IConsumer for a cross-service integration event (an Article... or Journal... event under Articles.IntegrationEvents.Contracts).
Create a DDD aggregate with this repo's exact shape — state/behavior partial split, value objects, domain events, and either an EF Core configuration or Redis.OM attributes. Use when adding a new aggregate (or a rich entity that owns invariants) to a service's Domain layer, or when asked to model a new domain concept the write side must protect. Two variants — EF-backed AggregateRoot and Redis Entity — with a decision rule below.
Adds a complete vertical-slice feature to a service in this repo — feature folder, command or query record, co-located validator, handler (or in-endpoint logic), route, and a declarative authorization gate. Three variants selected by the service's declared endpoint framework: FastEndpoints without MediatR (handler in the endpoint), Carter + MediatR, and Minimal APIs + MediatR. Use when adding a new feature to Submission, Review, Journals, Production, Auth, or ArticleHub — read the service's CLAUDE.md for its framework first.
Scaffold a new microservice skeleton under src/Services/ — folder tree, csproj references, GlobalUsings, per-layer DependencyInjection, Program.cs, and port/launchSettings — with correct Clean Architecture layering and BuildingBlocks composition. Use when standing up a brand-new service, before writing any aggregate, feature, or endpoint. Not for adding a feature to an existing service.
Write, create, or add a domain-event handler in this .NET repo, and wire the in-process domain-event dispatch a service needs to run it. THIS is the skill for authoring a domain-event handler here - the {Effect}On{Event}Handler that reacts to an aggregate event, MediatR (INotificationHandler) or FastEndpoints (IEventHandler). Use when creating or writing such a handler, adding a domain event to a service, or choosing a new service's publisher/interceptor. NOT for propagating an event across services (that is the add-integration-event skill) or a synchronous cross-service read (that is grpc-communication).
Exception hierarchy, guards, and error flow for this codebase — which exception to throw where, and the one place errors turn into HTTP responses. Use when throwing an error, adding a new exception type, choosing between a domain and an HTTP exception, writing a null/not-found check, or considering a try/catch.
Compose the pluggable FileService file-storage module inside a service — choose a provider (Mongo GridFS / Azure Blob / MinIO), add a second store via a generic options-marker subclass, wire singleton-default plus scoped-per-extra registration, write uploads with a compensating TryDeleteAsync, and migrate asset bytes across stages in consumers. Use when a service uploads, downloads, or deletes article assets, needs a second file store (its own plus a foreign stage's), registers an IFileService, or when a stage-change consumer must copy files from the previous stage's store.
When and how to use synchronous code-first gRPC between services in this repo. Use when a write-path handler needs foreign data (Journal, Person) that may be missing locally, or a business/authorization gate must be authoritative at the instant of a state transition — and, just as important, when to rely on event-replicated local data or the event payload instead of calling gRPC at all. Covers the contract, server, client-registration, and handler-usage phases with lifted template code.
EF Core persistence for this repo — DbContext setup, the two-level entity-configuration ladder (audited aggregates, opt-in RowVersion), the repository-as-unit-of-work base, JSON seeding, and the type-keyed reference-data cache. Use when adding or changing a DbContext, an entity configuration, a repository, seed data, or caching in a service's `.Persistence` project, and to pick the storage engine (SQL Server / PostgreSQL / Redis.OM) for a service's role.
Cross-cutting infrastructure wiring and repo-wide conventions for the Articles services. Use when wiring a service's ambient request context, options binding, MediatR pipeline order, HTTP JSON casing, or validators, and when applying repo conventions (central package versions, per-project GlobalUsings, private-field naming). Covers the segregated claims/route providers, the scoped RequestContext and correlation-id chain, fail-fast options, default-interface derivations, and the framework-split validation vocabulary.