How fathym-deno/eac-runtime works
Main Architectural Components
a) Core Runtime Layer
• Configuration system (EaCRuntimeConfig)
• Handler pipeline system
b) Distributed File System (DFS) Layer
• Different DFS handlers (Local, KV, Remote, Worker)
• File resolution system
c) Module System Layer
• Various middleware modules:
• Authentication (JWT, OAuth)
• Performance (Cache, Keep-Alive)
• Content Processing (Markdown, Tailwind)
• Integration (Stripe)
• Monitoring (Tracing)
d) Processing Layer
• Different processors:
• API Processor
• Preact App Processor
• Proxy Processor
• Response Processor
• Tailwind Processor
Component Relationships
a) Request Flow:
• Entry point (server) → Runtime → Handler Pipeline
• How requests flow through middleware
• How processors are selected and executed
b) File System Integration:
• How DFS connects with different storage backends
• File resolution process
c) Plugin System:
• Demonstrate how plugins integrate with the core runtime
• Plugin configuration flow
Specific Implementation Details
Key architectural patterns:
a) Middleware Chain:
• Sequential processing of middleware
• How middleware can be composed
b) Island Architecture:
• Demonstrate the island-based component system
• Client/server boundary
c) Plugin System:
• How plugins extend core functionality
• Plugin registration and initialization
┌─────────────────────────────────────────────┐
• HTTP Server │
• ┘
• ↓
┌─────────────────────────────────────────────┐
• EaC Runtime Core │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ │
• Config │ │Handler │ │Plugin │ │
• System │ │Pipeline │ │System │ │
• ┘ └─────────┘ └─────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────┐
• Module System │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ │
• Auth │ │Cache │ │Content │ │
• Modules │ │Modules │ │Modules │ │
• ┘ └─────────┘ └─────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────┐
• Distributed File System │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ │
• Local │ │KV Store │ │Remote │ │
• Storage │ │ │ │Storage │ │
• ┘ └─────────┘ └─────────┘ │
• ┘