Summary
Extract text content and information architecture from Figma designs and apply directly to existing project templates/components.
Use Case
User has an existing project with a design system. They want to:
- Extract content (text, labels, copy) from Figma mockups
- Extract IA (page structure, navigation hierarchy)
- Apply that content to their existing React/Vue/etc components
Usage
# Extract content from Figma and apply to existing project
ralph-starter run --from figma:<file-url> --figma-mode content
# Specify which components to update
ralph-starter run --from figma:<file-url> --figma-mode content --figma-target "src/pages"
Implementation
Task 1: Content Extraction
Task 2: IA Extraction
Task 3: Template Matching
Task 4: Content Application
Task 5: CLI Options
Task 6: Documentation
Content Structure Example
{
"pages": {
"home": {
"hero": {
"heading": "Welcome to Our App",
"subheading": "The best solution for...",
"cta": "Get Started"
},
"features": [
{ "title": "Feature 1", "description": "..." },
{ "title": "Feature 2", "description": "..." }
]
}
},
"navigation": {
"primary": ["Home", "Features", "Pricing", "Contact"],
"footer": ["Privacy", "Terms", "Support"]
}
}
Files to Create/Modify
src/integrations/figma/content-extractor.ts (new)
src/integrations/figma/template-matcher.ts (new)
src/integrations/figma/content-applier.ts (new)
src/integrations/figma/index.ts (add content mode)
src/cli.ts (add --figma-target option)
README.md (add content mode docs)
docs/figma-content-mode.md (new - Docusaurus)
Considerations
- Handle component libraries (Chakra, MUI, etc.)
- Support multiple frameworks (React, Vue, Svelte)
- Preserve JSX structure when updating
- Handle edge cases (images with alt text, aria-labels)
Summary
Extract text content and information architecture from Figma designs and apply directly to existing project templates/components.
Use Case
User has an existing project with a design system. They want to:
Usage
Implementation
Task 1: Content Extraction
Task 2: IA Extraction
Task 3: Template Matching
Task 4: Content Application
Task 5: CLI Options
--figma-mode contentoption--figma-target <path>for target directory--figma-previewto show changes without applying--figma-mapping <file>for custom content mappingTask 6: Documentation
docs/figma-content-mode.mdfor DocusaurusContent Structure Example
{ "pages": { "home": { "hero": { "heading": "Welcome to Our App", "subheading": "The best solution for...", "cta": "Get Started" }, "features": [ { "title": "Feature 1", "description": "..." }, { "title": "Feature 2", "description": "..." } ] } }, "navigation": { "primary": ["Home", "Features", "Pricing", "Contact"], "footer": ["Privacy", "Terms", "Support"] } }Files to Create/Modify
src/integrations/figma/content-extractor.ts(new)src/integrations/figma/template-matcher.ts(new)src/integrations/figma/content-applier.ts(new)src/integrations/figma/index.ts(add content mode)src/cli.ts(add --figma-target option)README.md(add content mode docs)docs/figma-content-mode.md(new - Docusaurus)Considerations