Index: flexoentity/__init__.py
===================================================================
--- flexoentity/__init__.py	(revision df459f718c057333d059679915ea06d65dead882)
+++ flexoentity/__init__.py	(revision 918474db90c90fe2d895d37cd593e4b02c111be8)
@@ -17,4 +17,5 @@
 from .domain_manager import DomainManager, DuplicateDomainError
 from .flexo_signature import FlexoSignature, CertificateReference
+from .entity_registry import EntityRegistry
 from .signing_backends import get_signing_backend
 
@@ -30,4 +31,5 @@
     "FlexoCollection",
     "FlexoSignature",
+    "EntityRegistry",
     "CertificateReference",
     "get_signing_backend",
Index: flexoentity/domain_manager.py
===================================================================
--- flexoentity/domain_manager.py	(revision df459f718c057333d059679915ea06d65dead882)
+++ flexoentity/domain_manager.py	(revision 918474db90c90fe2d895d37cd593e4b02c111be8)
@@ -32,11 +32,8 @@
     """
 
-    def __init__(self, domains: Iterable[Domain] | None = None):
+    def __init__(self, registry):
         # store is a general-purpose collection
         self._store = FlexoCollection()
-
-        if domains:
-            for dom in domains:
-                self.add(dom)
+        self._registry = registry
 
     # ---------------------------------------------------------------
@@ -65,11 +62,15 @@
         return result
 
-    def has(self, domain_id: str) -> bool:
-        """Check if a domain exists."""
-        return self._store.has(domain_id)
+    def can_delete(self, domain_id):
+        return not any(self._registry.entities_by_domain(domain_id))
+
+    def delete(self, domain_id):
+        if not self.can_delete(domain_id):
+            raise ValueError(f"Domain {domain_id} is still referenced.")
+        self.remove(domain_id)
 
     def remove(self, domain_id: str) -> None:
         """Remove a domain (rarely used, mostly for tests)."""
-        if not self._store.has(domain_id):
+        if domain_id not in self._store:
             raise DomainNotFoundError(domain_id)
         self._store.remove(domain_id)
@@ -77,5 +78,8 @@
     def all(self) -> list[Domain]:
         """List of all domains."""
-        return list(self._store.values())
+        return self._store.entities()
+
+    def all_domain_ids(self):
+        return self._store.ids() 
 
     def clear(self):
@@ -108,5 +112,5 @@
 
     def __contains__(self, domain_id: str) -> bool:
-        return self.has(domain_id)
+        return domain_id in self._store
 
     def __repr__(self) -> str:
Index: flexoentity/entity_registry.py
===================================================================
--- flexoentity/entity_registry.py	(revision 918474db90c90fe2d895d37cd593e4b02c111be8)
+++ flexoentity/entity_registry.py	(revision 918474db90c90fe2d895d37cd593e4b02c111be8)
@@ -0,0 +1,26 @@
+class EntityRegistry:
+    """
+    Central authority for accessing all FlexoEntities.
+    Works with in-memory managers today,
+    and can be extended to SQLite later.
+    """
+
+    def __init__(self):
+        self._sources = []  # list of callables
+
+    def register_source(self, func):
+        """Register a callable that returns a list or iterable of entities."""
+        if not callable(func):
+            raise TypeError("Source must be callable")
+        self._sources.append(func)
+
+    def all_entities(self):
+        """Iterate over all known entities."""
+        for src in self._sources:
+            for e in src():
+                yield e
+
+    def entities_by_domain(self, domain_id):
+        for e in self.all_entities():
+            if e.flexo_id.domain_id == domain_id:
+                yield e
Index: flexoentity/flexo_collection.py
===================================================================
--- flexoentity/flexo_collection.py	(revision df459f718c057333d059679915ea06d65dead882)
+++ flexoentity/flexo_collection.py	(revision 918474db90c90fe2d895d37cd593e4b02c111be8)
@@ -82,5 +82,4 @@
     # Additional public helpers (unchanged)
     # ------------------------------------------------------------------
-
     def entities(self):
         """Return all entities as a list."""
Index: tests/conftest.py
===================================================================
--- tests/conftest.py	(revision df459f718c057333d059679915ea06d65dead882)
+++ tests/conftest.py	(revision 918474db90c90fe2d895d37cd593e4b02c111be8)
@@ -3,5 +3,5 @@
 from pathlib import Path
 from datetime import datetime
-from flexoentity import Domain, FlexoSignature, DomainManager
+from flexoentity import Domain, FlexoSignature, DomainManager, EntityRegistry
 from flexoentity import get_signing_backend, CertificateReference
 
@@ -30,5 +30,5 @@
 @pytest.fixture
 def sample_domain_manager():
-    return DomainManager()
+    return DomainManager(EntityRegistry())
 
 # ─────────────────────────────────────────────────────────────
