How opsmill/infrahub works
Main Components Architecture
a) Frontend Layer:
• React-based web application (in /frontend/app)
• Component library (/frontend/packages/ui)
• GraphQL client interface
• Plugin system (/frontend/packages/plugins)
b) Backend Layer:
• FastAPI-based API server (/backend/infrahub/api)
• GraphQL server (/backend/infrahub/graphql)
• Core business logic (/backend/infrahub/core)
• Authentication system (/backend/infrahub/auth)
c) Data Storage:
• Graph database (supports Neo4j and Memgraph)
• Object storage for artifacts
• Git integration for version control
Key Subsystems
a) Schema Management:
• Schema validation
• Migration handling
• Version control integration
b) Version Control:
• Branch management
• Diff calculation
• Merge operations
• Conflict resolution
c) Resource Management:
• IPAM (IP Address Management)
• Resource pools
• Allocation tracking
Integration Points
External integration points:
• Git repositories
• Message queues (NATS/RabbitMQ)
• Object storage systems
• Authentication providers (OIDC/OAuth2)
Data Flow
Main data flows:
a) User Operations:
• UI → GraphQL API → Core Logic → Database
• Version Control Operations → Git Integration → Core Logic
• Resource Allocation Requests → Resource Manager → Database
b) Background Operations:
• Schema Validation
• Diff Calculation
• Merge Operations
• Task Processing
Deployment View
A deployment perspective showing:
• API Server containers
• Worker nodes
• Database instances
• Message queue services
• Git agent services
Cross-Cutting Concerns
Shared services:
• Authentication & Authorization
• Event handling
• Task scheduling
• Logging & Monitoring
• Message bus
Layer organization
• Present in clear horizontal layers
• Cross-cutting concerns vertically
• Related components together
Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that matter most for understanding the system's structure and behavior.