Event Design & Schema 📦
This document explains how events are designed, structured, and used in ShopVerse.
Events represent business facts, not actions.
🎯 What Is an Event?
An event is something that already happened in the system.
Examples:
- Order was placed
- Payment was successful
- User registered
Events are:
- Immutable
- Append-only
- Asynchronous
🧠 Event Design Principles
ShopVerse events follow:
- Domain-driven naming
- Immutable payloads
- Standard structure
- Loose coupling
- Consumer independence
📦 Standard Event Schema
All services publish events using a common schema.
{
"eventType": "ORDER_PLACED",
"service": "ORDER_SERVICE",
"userEmail": "user@example.com",
"entityId": "ORD123",
"amount": 5497,
"timestamp": "2026-01-21T12:30:00",
"metadata": {
"paymentMode": "UPI"
}
}