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
39 lines
1.5 KiB
Python
39 lines
1.5 KiB
Python
"""Project models"""
|
|
|
|
from datetime import datetime
|
|
from typing import Dict, List, Optional
|
|
from uuid import uuid4
|
|
from pydantic import BaseModel, Field, ConfigDict
|
|
from .theme import Theme
|
|
from .component import Component
|
|
|
|
|
|
class ProjectMetadata(BaseModel):
|
|
"""Project metadata"""
|
|
created_at: datetime = Field(default_factory=datetime.utcnow)
|
|
updated_at: datetime = Field(default_factory=datetime.utcnow)
|
|
author: Optional[str] = None
|
|
team: Optional[str] = None
|
|
tags: List[str] = Field(default_factory=list)
|
|
|
|
|
|
class Project(BaseModel):
|
|
"""A design system project"""
|
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
|
|
id: str = Field(..., description="Unique project ID")
|
|
uuid: str = Field(default_factory=lambda: str(uuid4()), description="UUID for export/import")
|
|
name: str = Field(..., description="Project name")
|
|
version: str = Field(default="1.0.0", description="Project version")
|
|
description: Optional[str] = Field(None, description="Project description")
|
|
theme: Theme = Field(..., description="Project theme configuration")
|
|
components: List[Component] = Field(default_factory=list, description="Project components")
|
|
metadata: ProjectMetadata = Field(default_factory=ProjectMetadata)
|
|
|
|
def get_component(self, name: str) -> Optional[Component]:
|
|
"""Get component by name"""
|
|
for component in self.components:
|
|
if component.name == name:
|
|
return component
|
|
return None
|