A comprehensive system for defining, analyzing, and managing enterprise architecture through declarative markup language with automated dependency resolution and change propagation.
EAaC enables you to:
- Define complete enterprise architecture in YAML with explicit dependencies
- Analyze impact of changes across all tiers and domains
- Generate automated update plans with rollback procedures
- Validate architecture consistency and dependencies
- Propagate updates automatically through dependent systems
The system supports six core architecture domains:
- Infrastructure - Compute, networking, storage, orchestration
- Application - Microservices, APIs, frontends, business logic
- Data - Databases, caches, message queues, data lakes
- Security - Identity providers, authentication, authorization
- Observability - Monitoring, logging, tracing, alerting
- Workflow - CI/CD pipelines, automation, orchestration
The system explicitly models the 3-tier application pattern:
βββββββββββββββββββββββββββββββββββββββββββ
β TIER 1: Presentation Layer β
β (Frontend - React, React Native) β
βββββββββββββββββββββββββββββββββββββββββββ
β HTTP/REST calls β
βββββββββββββββββββββββββββββββββββββββββββ
β TIER 1.5: API Gateway Layer β
β (Kong - Routing, Auth, Rate Limiting) β
βββββββββββββββββββββββββββββββββββββββββββ
β Routes to services β
βββββββββββββββββββββββββββββββββββββββββββ
β TIER 2: Application/Business Logic β
β (Spring Boot, FastAPI, Go, Node.js) β
βββββββββββββββββββββββββββββββββββββββββββ
β Uses ORM/Connection Pool β
βββββββββββββββββββββββββββββββββββββββββββ
β TIER 3: Data Access Layer β
β (Hibernate, HikariCP) β
βββββββββββββββββββββββββββββββββββββββββββ
β Database queries β
βββββββββββββββββββββββββββββββββββββββββββ
β Infrastructure: Databases & Caches β
β (PostgreSQL, Redis, Kafka) β
βββββββββββββββββββββββββββββββββββββββββββ
# Clone repository
git clone <repository-url>
cd eac
# Install dependencies
pip install -r requirements.txt
# Verify installation
python -m src.cli examples/enterprise-platform.yaml validatepython -m src.cli examples/enterprise-platform.yaml validatepython -m src.cli examples/enterprise-platform.yaml summary# List all application tier components
python -m src.cli examples/enterprise-platform.yaml list --tier application
# List all infrastructure domain components
python -m src.cli examples/enterprise-platform.yaml list --domain infrastructurepython -m src.cli examples/enterprise-platform.yaml show svc-business-logic# Analyze what's affected if PostgreSQL changes
python -m src.cli examples/enterprise-platform.yaml impact db-primary-postgres --version 16.1# Generate plan to update Spring Boot version
python -m src.cli examples/enterprise-platform.yaml update svc-business-logic 3.2.1python -m src.cli examples/enterprise-platform.yaml deps svc-business-logicThe demo script shows three comprehensive scenarios:
python demo.pyScenario 1: Java Runtime Update
- Updates Java from 17 to 21 in business logic service
- Shows impact on Data Access Layer and application tier
- Demonstrates zero-downtime rolling update
Scenario 2: PostgreSQL Major Version Upgrade
- Upgrades PostgreSQL from 15.2 to 16.1
- Shows cascade through all database-dependent services
- Demonstrates phased deployment with standby replica
Scenario 3: Spring Boot Framework Upgrade
- Updates Spring Boot from 3.1.5 to 3.2.1
- Shows cross-tier impact analysis
- Demonstrates API compatibility checking
architecture:
version: "1.0.0"
name: "My Architecture"
metadata:
organization: "my-org"
environment: "production"
created: "2025-01-15"
modified: "2025-01-15"
domains:
application:
components:
- id: "my-service"
name: "My Service"
type: "microservice"
framework: "spring-boot"
version: "3.1.5"
runtime: "java"
runtime_version: "21"
configuration:
replicas: 3
dependencies:
- id: "my-database"
type: "hard"
constraint: ">=15.0"
metadata:
tier: "application"
critical: trueInfrastructure:
compute,container-orchestration,networking,storage,load-balancer
Application:
microservice,api-gateway,frontend-application,mobile-application,data-access-service
Data:
relational-database,nosql-database,cache,message-queue,data-warehouse
Security:
identity-provider,api-security,secrets-manager
Observability:
metrics-collector,log-aggregator,distributed-tracing,apm
hard- Required dependency (component cannot function without it)soft- Optional dependency (reduced functionality)deployment- Deployment target (e.g., Kubernetes cluster)monitoring- Observability dependencybackend-routing- API Gateway routing to backend servicesauthentication- Authentication providercaching- Cache dependencyevent-streaming- Message queue/streaming
# Exact version
constraint: "=3.1.5"
# Range
constraint: ">=3.1.0,<4.0.0"
# Compatible (same major)
constraint: "^3.1.5" # Allows 3.x.x
# Approximately equivalent (same minor)
constraint: "~3.1.5" # Allows 3.1.xThe system builds a complete dependency graph and:
- Identifies direct and transitive dependencies
- Detects circular dependencies
- Calculates topological ordering
- Finds critical paths
Semantic versioning with:
- Range constraints (
>=1.0.0, <2.0.0) - Compatibility constraints (
^1.2.3) - Breaking change detection
- Upgrade path suggestions
When a component changes:
- Identifies all affected components
- Shows domain-level impacts
- Detects breaking changes
- Verifies version compatibility
Automatically generates:
- Step-by-step update sequence
- Testing requirements
- Rollback procedures
- Downtime estimates
- Warnings for critical components
Updates cascade correctly through tiers:
- Tier 3 (Data Access) β Tier 2 (Application)
- Tier 2 (Application) β Tier 1.5 (API Gateway)
- Tier 1.5 (API Gateway) β Tier 1 (Presentation)
# Analyze impact
python -m src.cli examples/enterprise-platform.yaml impact db-primary-postgres --version 16.1
# Generate update plan
python -m src.cli examples/enterprise-platform.yaml update db-primary-postgres 16.1Result: Shows all services affected, required JDBC driver updates, migration steps
# Update Spring Boot in business logic service
python -m src.cli examples/enterprise-platform.yaml update svc-business-logic 3.2.1Result: Identifies Data Access Layer compatibility, API contract checks, testing requirements
# Show what depends on Kubernetes cluster
python -m src.cli examples/enterprise-platform.yaml show compute-k8s-prodResult: Lists all services deployed to the cluster
When you generate an update plan, you get:
π Generating update plan...
Component: Business Logic Service
Current version: 3.1.5
Target version: 3.2.1
β οΈ Warnings:
β οΈ CRITICAL COMPONENT - Extra caution required
π¦ Affected components (3):
β’ Data Access Layer (Hibernate 6.3.1)
β’ API Gateway Service (Kong 3.2.1)
β’ Web Frontend Application (React 18.2.0)
β
Zero-downtime deployment possible
π Update Sequence:
=== PHASE 1: PREPARATION ===
1. Review change log: spring-boot 3.1.5 -> 3.2.1
2. Backup current configuration for Business Logic Service
3. Verify java 21 compatibility
4. Verify compatibility with 8 dependencies
=== PHASE 2: UPDATE TARGET COMPONENT ===
1. Update Business Logic Service configuration
Tier: application
2. Update build configuration (maven)
3. Update dependencies in package manifest
4. Run build and unit tests
5. Deploy using rolling update strategy (3 replicas)
6. Verify Business Logic Service starts successfully
7. Run smoke tests
=== PHASE 3: UPDATE AFFECTED COMPONENTS ===
1. Update Data Access Layer (svc-data-access-layer)
- Verify compatibility with Business Logic Service 3.2.1
- Rebuild/redeploy if necessary
- Run integration tests
π§ͺ Testing Requirements:
β’ Unit Tests: Business Logic Service
β’ Integration Tests: 3 affected components
β’ Business logic tests
β’ API contract tests
β’ Service mesh tests
β’ Load/stress testing (CRITICAL COMPONENT)
π Rollback Procedure:
1. Revert Business Logic Service to version 3.1.5
2. Perform rolling rollback (3 replicas)
3. Verify Business Logic Service functionality
...
# Tier 1: Frontend
frontend-app β api-gateway
# Tier 1.5: API Gateway
api-gateway β [business-logic, data-processing, user-service]
# Tier 2: Application Services
business-logic β data-access-layer
data-processing β data-access-layer
user-service β data-access-layer
# Tier 3: Data Access
data-access-layer β [postgresql, redis]notification-service:
dependencies:
- id: kafka-broker
type: event-streaming
data-processing:
dependencies:
- id: kafka-broker
type: event-streamingbusiness-logic:
dependencies:
- id: prometheus
type: monitoring
- id: jaeger
type: tracing
- id: logstash
type: loggingpython -m src.cli examples/enterprise-platform.yaml validateDetects and reports any circular dependencies in the architecture.
python -m src.cli examples/enterprise-platform.yaml deps svc-business-logicShows complete dependency tree including transitive dependencies.
The system identifies critical components based on:
- Number of dependents
- Critical flag in metadata
- Position in dependency graph
When multiple components need updating, the system:
- Calculates optimal order (dependencies first)
- Identifies components that can be updated in parallel
- Minimizes overall downtime
from src import (
ArchitectureParser,
DependencyGraph,
UpdateEngine,
ArchitectureValidator
)
# Load architecture
architecture = ArchitectureParser.parse_yaml_file("my-arch.yaml")
# Validate
errors = ArchitectureValidator.validate(architecture)
# Build dependency graph
graph = DependencyGraph(architecture)
# Analyze impact
impact = graph.analyze_impact("my-component", "2.0.0")
# Generate update plan
engine = UpdateEngine(architecture)
plan = engine.generate_update_plan("my-component", "2.0.0")
# Access plan details
print(f"Affected: {len(plan.affected_components)}")
print(f"Downtime: {plan.estimated_downtime_minutes} min")
for step in plan.update_sequence:
print(step)Edit src/models.py:
class ComponentType(Enum):
# Add your type
MY_NEW_TYPE = "my-new-type"class DependencyType(Enum):
# Add your type
MY_DEPENDENCY = "my-dependency"Edit src/parser.py:
def _validate_component_rules(architecture):
# Add custom validation
pass- Use Explicit Dependencies: Always specify dependencies, even if they seem obvious
- Version Constraints: Use appropriate constraints (^ for compatible, >= for minimum)
- Mark Critical Components: Set
critical: truefor production-critical services - Tier Metadata: Always specify tier for application components
- Replicas: Specify replica counts for accurate downtime estimation
- Testing First: Run impact analysis before generating update plans
- Validate Often: Run validation after architecture changes
# Check for specific errors
python -m src.cli examples/enterprise-platform.yaml validateCommon issues:
- Missing component IDs in dependencies
- Circular dependencies
- Invalid version constraints
If detected:
- Review dependency chain shown in error
- Consider breaking cycle with event-driven pattern
- Use soft dependencies where appropriate
MIT License
Contributions welcome! Areas for enhancement:
- Additional component types
- More sophisticated version resolution
- Visualization generation
- Integration with infrastructure-as-code tools
- Real-time architecture monitoring
For issues and questions:
- Create an issue in the repository
- Review demo.py for usage examples
- Check examples/ directory for architecture templates