74 lines
2.3 KiB
Python
74 lines
2.3 KiB
Python
from abc import ABC, abstractmethod
|
|
from typing import Dict, Any
|
|
from utils.claude_client import ClaudeClient
|
|
|
|
class BaseDesigner(ABC):
|
|
"""Abstract base class for all technology designers"""
|
|
|
|
def __init__(self):
|
|
self.claude_client = ClaudeClient()
|
|
|
|
@abstractmethod
|
|
async def design_architecture(self, context: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Design architecture for specific technology"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get_technology_name(self) -> str:
|
|
"""Get the technology this designer specializes in"""
|
|
pass
|
|
|
|
class BaseFrontendDesigner(BaseDesigner):
|
|
"""Base class for frontend technology designers"""
|
|
|
|
@abstractmethod
|
|
async def design_components(self, context: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Design frontend components"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def design_routing(self, context: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Design routing structure"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def design_state_management(self, context: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Design state management"""
|
|
pass
|
|
|
|
class BaseBackendDesigner(BaseDesigner):
|
|
"""Base class for backend technology designers"""
|
|
|
|
@abstractmethod
|
|
async def design_api_endpoints(self, context: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Design API endpoints"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def design_middleware(self, context: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Design middleware chain"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def design_services(self, context: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Design service layer"""
|
|
pass
|
|
|
|
class BaseDatabaseDesigner(BaseDesigner):
|
|
"""Base class for database technology designers"""
|
|
|
|
@abstractmethod
|
|
async def design_schema(self, context: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Design database schema"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def design_indexes(self, context: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Design database indexes"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def design_relationships(self, context: Dict[str, Any]) -> Dict[str, Any]:
|
|
"""Design table relationships"""
|
|
pass
|