| name | anima-reference-architecture |
| description | Implement reference architecture for Anima design-to-code automation.
Use when designing a design system automation pipeline, structuring
a Figma-to-React project, or planning team-scale design handoff.
Trigger: "anima architecture", "design-to-code architecture",
"anima project structure", "figma automation architecture".
|
| allowed-tools | Read, Write, Edit |
| version | 1.4.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","design","figma","anima","architecture"] |
| compatibility | Designed for Claude Code |
Anima Reference Architecture
System Architecture
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Figma Design โโโโโโถโ Figma API โโโโโโถโ Anima SDK โ
โ (Components) โ โ (Webhooks) โ โ (Code Gen) โ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโโผโโโโโโโโโ
โ Post-Processing โ
โ - Token mapping โ
โ - Normalization โ
โ - Lint/format โ
โโโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโโผโโโโโโโโโ
โ Output โ
โ - React/Vue/HTML โ
โ - PR creation โ
โ - Storybook sync โ
โโโโโโโโโโโโโโโโโโโโ
Project Structure
design-to-code/
โโโ src/
โ โโโ anima/
โ โ โโโ client.ts # Singleton SDK client
โ โ โโโ cache.ts # Generation cache
โ โ โโโ retry.ts # Error recovery
โ โ โโโ presets.ts # Framework/styling presets
โ โโโ pipeline/
โ โ โโโ scanner.ts # Figma component discovery
โ โ โโโ generator.ts # Batch code generation
โ โ โโโ change-detector.ts # Figma version tracking
โ โ โโโ runner.ts # Pipeline orchestrator
โ โโโ post-process/
โ โ โโโ normalizer.ts # Output normalization
โ โ โโโ token-mapper.ts # Design token mapping
โ โ โโโ organizer.ts # File organization + barrel exports
โ โโโ webhooks/
โ โ โโโ figma-handler.ts # Figma webhook receiver
โ โโโ server.ts # Express API (optional)
โโโ scripts/
โ โโโ generate-components.ts # CLI generation script
โ โโโ compare-presets.ts # Side-by-side preset comparison
โโโ fixtures/
โ โโโ component-map.json # Figma node ID โ component name mapping
โโโ generated/ # Output directory (gitignored or committed)
โโโ .anima-cache/ # Generation cache (gitignored)
โโโ package.json
Key Design Decisions
| Decision | Choice | Rationale |
|---|
| SDK | @animaapp/anima-sdk | Official, server-side, typed |
| Change detection | Figma Webhooks v2 | Event-driven, no polling waste |