Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Explains microservices design patterns: service boundaries, event-driven communication, saga, service mesh, and API gateway design.
73% 86%+14 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 16 of 22 without it.
3 of 3 safety checks passed
Not used yet
Define services around business capabilities, not technical layers. Each service owns its data store and exposes a clear API contract.
order-service/ -> owns orders table, publishes OrderCreated events
inventory-service/ -> owns inventory table, subscribes to OrderCreated
payment-service/ -> owns payments table, handles payment processing
notification-service -> stateless, subscribes to events, sends emails/SMS
interface DomainEvent {
eventId: string;
eventType: string;
aggregateId: string;
timestamp: string;
version: number;
payload: Record<string, unknown>;
}
const orderCreatedEvent: DomainEvent = {
eventId: crypto.randomUUID(),
eventType: "order.created",
aggregateId: orderId,
timestamp: new Date().toISOString(),
version: 1,
payload: { customerId, items, totalAmount },
};
await broker.publish("orders", orderCreatedEvent);
async function handleOrderCreated(event: DomainEvent) {
const { items } = event.payload as OrderPayload;
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.