Add to Claude Code
0 addsInstall this CLAUDE.md template.
Name: Canva Integration Template
Save to: ./CLAUDE.md in the current project
---
# Canva Integration Project
## Overview
This project integrates with Canva's Connect API for design automation.
## Architecture
- `/lib/canva.ts` — Canva API client (auth, rate limiting, error handling)
- `/lib/templates.ts` — Template mapping and variable substitution logic
- `/lib/exports.ts` — Design export pipeline (format, size, quality)
- `/types/canva.ts` — Canva API response types
## Canva API Conventions
- Always use Brand Kit colors and fonts when available
- Template variables use double-brace syntax: `{{headline}}`, `{{body}}`
- Rate limits: 100 requests/minute for most endpoints
- Design exports are async — poll the export job status endpoint
- Asset uploads support PNG, JPG, SVG, MP4 (max 25MB for images, 1GB for video)
## Design Dimensions
| Platform | Format | Width | Height |
|-------------|--------|-------|--------|
| Instagram | Feed | 1080 | 1080 |
| Instagram | Story | 1080 | 1920 |
| Twitter/X | Post | 1200 | 675 |
| LinkedIn | Post | 1200 | 627 |
| Facebook | Post | 1200 | 630 |
| YouTube | Thumb | 1280 | 720 |
| Presentation| Slide | 1920 | 1080 |
## Error Handling
- Retry on 429 (rate limit) with exponential backoff
- Template not found → fall back to blank canvas with brand colors
- Export timeout → retry once, then alert user
## Testing
- Use Canva's sandbox environment for development
- Mock API responses in unit tests (no live API calls in CI)
- Visual regression tests for exported designs (compare against baseline PNGs)
Paste into Claude Code to add this template. Back up any existing CLAUDE.md first.
How to add
Full guide →Click Add, then paste into Claude Code. Claude will save it as your project's CLAUDE.md.
Target: CLAUDE.md