Initial commit: Clean DSS implementation

Migrated from design-system-swarm with fresh git history.
Old project history preserved in /home/overbits/apps/design-system-swarm

Core components:
- MCP Server (Python FastAPI with mcp 1.23.1)
- Claude Plugin (agents, commands, skills, strategies, hooks, core)
- DSS Backend (dss-mvp1 - token translation, Figma sync)
- Admin UI (Node.js/React)
- Server (Node.js/Express)
- Storybook integration (dss-mvp1/.storybook)

Self-contained configuration:
- All paths relative or use DSS_BASE_PATH=/home/overbits/dss
- PYTHONPATH configured for dss-mvp1 and dss-claude-plugin
- .env file with all configuration
- Claude plugin uses ${CLAUDE_PLUGIN_ROOT} for portability

Migration completed: $(date)
🤖 Clean migration with full functionality preserved
This commit is contained in:
Digital Production Factory
2025-12-09 18:45:48 -03:00
commit 276ed71f31
884 changed files with 373737 additions and 0 deletions

98
tests/conftest.py Normal file
View File

@@ -0,0 +1,98 @@
"""
Pytest configuration and shared fixtures.
"""
import pytest
import tempfile
import shutil
from pathlib import Path
from tools.ingest.base import DesignToken, TokenCollection, TokenType
@pytest.fixture
def temp_dir():
"""Create a temporary directory for tests."""
temp_path = tempfile.mkdtemp()
yield Path(temp_path)
shutil.rmtree(temp_path, ignore_errors=True)
@pytest.fixture
def sample_css():
"""Sample CSS custom properties."""
return """
:root {
--color-primary: #3B82F6;
--color-secondary: #10B981;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--font-size-base: 16px;
}
"""
@pytest.fixture
def sample_scss():
"""Sample SCSS variables."""
return """
$primary-color: #3B82F6;
$secondary-color: #10B981;
$font-family-sans: 'Inter', sans-serif;
$font-size-base: 16px;
$spacing-md: 16px;
"""
@pytest.fixture
def sample_json_tokens():
"""Sample JSON design tokens (W3C format)."""
return {
"color": {
"primary": {
"500": {"value": "#3B82F6", "type": "color"},
"600": {"value": "#2563EB", "type": "color"}
},
"secondary": {
"500": {"value": "#10B981", "type": "color"}
}
},
"spacing": {
"sm": {"value": "8px", "type": "dimension"},
"md": {"value": "16px", "type": "dimension"},
"lg": {"value": "24px", "type": "dimension"}
}
}
@pytest.fixture
def sample_token_collection():
"""Create a sample token collection."""
tokens = [
DesignToken(name="color.primary", value="#3B82F6", type=TokenType.COLOR),
DesignToken(name="color.secondary", value="#10B981", type=TokenType.COLOR),
DesignToken(name="spacing.md", value="16px", type=TokenType.SPACING),
]
return TokenCollection(tokens=tokens, name="Sample Collection")
@pytest.fixture
def tailwind_config_path(temp_dir):
"""Create a temporary Tailwind config file."""
config_content = """
module.exports = {
theme: {
colors: {
blue: '#0000FF',
red: '#FF0000'
},
spacing: {
'1': '4px',
'2': '8px'
}
}
}
"""
config_file = temp_dir / "tailwind.config.js"
config_file.write_text(config_content)
return config_file