Connect to Neo4j using environment variables (graph/storage.py:17-39):
self.uri = uri or os.getenv('NEO4J_URI', 'bolt://localhost:7687')self.user = user or os.getenv('NEO4J_USER', 'neo4j')self.password = password or os.getenv('NEO4J_PASSWORD', 'password')self.driver = GraphDatabase.driver(self.uri, auth=(self.user, self.password))
2
LLM Initialization
Initialize the Gemini LLM client (chat/llm.py:17-24):
self.api_key = api_key or os.getenv('GEMINI_API_KEY')if not self.api_key: raise ValueError("GEMINI_API_KEY environment variable is required")self.client = genai.Client(api_key=self.api_key)
3
Data Loading
Load configuration data from YAML files (chat/app.py:90-134):
# View service health statusdocker-compose ps# Output shows health statusNAME SERVICE STATUS PORTSneo4j neo4j Up (healthy) 7474/tcp, 7687/tcpekg-app ekg-app Up 8000/tcp
The system validates environment configuration before starting (main.py:23-37):
main.py:23-37
def check_environment(): """Check that required environment variables are set.""" required_vars = ['GEMINI_API_KEY', 'NEO4J_URI', 'NEO4J_USER', 'NEO4J_PASSWORD'] missing_vars = [] for var in required_vars: if not os.getenv(var): missing_vars.append(var) if missing_vars: logger.error(f"Missing required environment variables: {', '.join(missing_vars)}") logger.error("Please create a .env file based on .env.example") return False return True
The application will exit with error code 1 if required environment variables are missing.
The system includes a comprehensive configuration validator (scripts/validate_config.py) that checks:
Docker Compose service definitions
Team ownership mappings
Service dependencies
Kubernetes deployment configurations
Run validation manually:
python scripts/validate_config.py
Sample output:
============================================================CONFIGURATION VALIDATION RESULTS============================================================⚠️ WARNINGS (2): 1. Service 'api-gateway' has no team ownership defined 2. Team 'Platform' doesn't own any services============================================================✅ Validation PASSED - Only warnings found