order_firebase_adapter 1.0.1
order_firebase_adapter: ^1.0.1 copied to clipboard
Firebase implementation for Ordering domain ports.
order_firebase_adapter #
Firebase (Firestore) adapter for the Ordering domain.
This package is part of the Narayan modular system architecture and is responsible only for translating Ordering domain objects and domain events to/from Firestore-compatible representations.
🎯 Purpose #
order_firebase_adapter exists to connect the pure Ordering domain to Firebase, without polluting domain logic with infrastructure concerns.
It follows these rules strictly:
- ❌ No business logic
- ❌ No domain mutations
- ❌ No orchestration
- ✅ Only mapping & persistence
- ✅ Fully replaceable infrastructure
If Firebase disappears tomorrow, the Ordering domain continues to work unchanged.
📦 Responsibilities #
This package handles:
- Domain → DTO → Firestore
- Firestore → DTO → Domain
- Persisting Order data
- Persisting Order-related Domain Events
- Listening to Domain Events (optional adapters)
It does NOT:
- Validate orders
- Calculate pricing
- Change order status
- Contain any business rules