Integrate design-system-api into studio-ui Package
Objective
Merge design-system-api service into studio-ui to unify design system code and UI components.
Tasks
Move Services to studio-ui
-
Move `design-system-api/src/services/` → `studio-ui/src/api/services/design-system/` -
Move `design-system-api/src/routes/` → `studio-ui/src/api/routes/design-system/` -
Move `design-system-api/src/data/` → `studio-ui/src/data/design-tokens/` -
Move `design-system-api/src/schemas/` → `studio-ui/src/schemas/design-system/`
Integrate with studio-ui
-
Extend existing `api:dev`, `api:build`, `api:test` scripts -
Add Express router mount point for design system API -
Serve at `/api/v1/design/*` (matches OpenAPI spec) -
Update studio-ui OpenAPI spec with design endpoints
API Endpoints
- `GET /v1/tokens` - All design tokens
- `GET /v1/tokens/colors` - Color tokens
- `GET /v1/tokens/typography` - Typography tokens
- `GET /v1/components` - Component library
- `POST /v1/components/:id/render` - Render components
Testing
-
Unit tests for token services -
Integration tests for API endpoints -
Contract tests against OpenAPI spec
Related
Rationale
Design system data and UI components belong together. Studio-ui is the canonical UI library.
Files to Move
``` design-system-api/ ├── src/services/ → studio-ui/src/api/services/design-system/ ├── src/routes/ → studio-ui/src/api/routes/design-system/ ├── src/data/ → studio-ui/src/data/design-tokens/ └── openapi/ → studio-ui/openapi/design-system.yaml ```