How abrooks/clara-factbase works
Main Components
a) Core Components:
• EAV Engine Layer
• Clara Rules Integration Layer
• Session Management
• Transaction Processing
• DSL (Domain Specific Language) Parser
• Rule/Query System
• Entity Accumulator System
b) External Dependencies:
• Clara Rules Engine
• Clojure/ClojureScript Runtime
┌─────────────────────────────────────────────────┐
• Client Code │
• ┘
• ↓
┌─────────────────────────────────────────────────┐
• ClaraEAV Public API │
• ┤
• Rules DSL │ Query DSL │ Transaction API │
• ┘
• ↓
┌─────────────────────────────────────────────────┐
• Core Processing Layer │
• ┬───────────┬───────────┬────────────┤
• EAV │ Session │ Rule │ Entity │
• Engine │ Manager │ Processor │Accumulator │
• ┴───────────┴───────────┴────────────┘
• ↓
┌─────────────────────────────────────────────────┐
• Clara Rules Engine │
• ┘
Important Relationships
a) Data Flow:
• How EAV triplets flow from client code through the system
• Transformation process from EAV format to Clara Rules format
• Demonstrate how queries and rules interact with the session
b) Component Interactions:
• How the DSL parser interfaces with Clara Rules
• Relationship between the session manager and EAV engine
• How accumulators transform EAV data back into entity maps
Implementation Details to Highlight
• How dsl.clj handles the custom syntax
• How session.cljc manages state
• How rules.cljc integrates with Clara
• Demonstrate how store.cljc handles data persistence
Cross-Platform Support
• Clojure/ClojureScript compatibility
Notes Section
A notes section explaining:
• Session initialization process
• Transaction data handling
• Rule execution flow
• Query processing
Remember to emphasize the relationship with Clara Rules as this is a key architectural feature, showing how ClaraEAV extends and specializes Clara's functionality for EAV operations.