| name | anima-deploy-integration |
| description | Deploy Anima design-to-code service as a backend API endpoint.
Use when building a design-to-code microservice, deploying Anima SDK
as a serverless function, or creating an internal design tool API.
Trigger: "deploy anima", "anima service deploy", "anima serverless".
|
| allowed-tools | Read, Write, Edit, Bash(vercel:*), Bash(gcloud:*), Bash(docker:*) |
| version | 1.4.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","design","figma","anima","deployment"] |
| compatibility | Designed for Claude Code |
Anima Deploy Integration
Overview
Deploy the Anima SDK as a backend service. The SDK is server-side only, so deploy it behind an API endpoint that accepts Figma file/node references and returns generated code.
Instructions
Step 1: Express API Wrapper
import express from 'express';
import { Anima } from '@animaapp/anima-sdk';
const app = express();
app.use(express.json());
const anima = new Anima({ auth: { token: process.env.ANIMA_TOKEN! } });
app.post('/api/generate', async (req, res) => {
const { fileKey, nodesId, settings } = req.body;
if (!fileKey || !nodesId?.length) {
return res.status(400).json({ error: 'fileKey and nodesId required' });
}
try {
const { files } = await anima.generateCode({
fileKey,
figmaToken: process.env.FIGMA_TOKEN!,
nodesId,
settings: settings || { language: 'typescript', framework: 'react', : },
});
res.({ files, : files. });
} (: ) {
res.().({ : err. });
}
});
app.(, res.({ : }));
app.(, .());