Skip to content

🔌 Crafting — Adapters

📦 Folder Overview

Crafting integrates with other RevFramewrok systems through adapter implementations.

Adapters implement the Crafting abstraction interfaces and translate Crafting operations into the APIs of external systems (for example Inventory or Currency).

Concrete adapter implementations live in the Integrations folder because they depend on optional systems.


🧩 What Lives Here

  • Adapter implementations for optional systems
  • Bridges from Crafting abstractions to concrete backends

Examples:

  • Inventory integration → Integrations/Crafting/InventoryIntegration
  • Currency integration → Integrations/Crafting/CurrencyIntegration

These adapters are compiled only when the corresponding system is present (for example REV_INVENTORY_PRESENT, REV_CURRENCY_PRESENT).


🎯 Purpose

Adapters provide a controlled way to:

  • connect Crafting to external systems
  • translate Crafting operations into backend-specific calls
  • keep Crafting Core independent from concrete implementations

🧠 Usage Guidance

Projects can integrate their own systems by implementing the relevant abstraction interfaces.

Crafting interacts with external systems only through these interfaces:

  • ICraftingInventoryAdapter
  • ICraftingInventoryReservationAdapter
  • ICraftingCurrencyAdapter
  • ICraftingCurrencyHoldAdapter
  • ICraftingAuthority

Implementations should map backend behaviour to these contracts.


⚠️ Important Notes

  • Adapters depend on optional systems and may not be present in all builds
  • Behaviour depends on the adapter implementation provided by the project
  • Crafting does not require any specific backend to function

  • Crafting Abstractions (integration contracts)
  • Integrations (module-specific adapter implementations)