A beautiful canvas-based image editor with AI-powered creation, built with Linear design aesthetics.
Live Demo: http://8.217.227.70:3000
- Infinite Canvas — Draw, write text, add shapes with tldraw engine
- Paste Images — Cmd+V / Ctrl+V to paste screenshots or clipboard images
- AI Image Generation — Text-to-image and image-to-image powered by ZhipuAI CogView-4
- 8 Style Presets — Watercolor, oil painting, Chinese ink, anime, pixel art, and more
- Smart Prompt Enhancement — GLM-4 automatically optimizes your descriptions
- One-Click Brush Cleanup — Remove all brush strokes before AI generation or export
- Flexible Export — Custom aspect ratios (1:1, 4:3, 16:9, free) in PNG/SVG/JSON
- Linear Design System — Dark canvas, lavender-blue accent, glassmorphism panels
- Framework: Next.js + TypeScript
- Canvas: tldraw v2
- Styling: Tailwind CSS + shadcn/ui
- AI: ZhipuAI CogView-4 (image) + GLM-4-Flash (prompt enhancement)
- Animation: Framer Motion
- Deploy: Docker
git clone https://github.com/ShayLiu/artflow.git
cd artflownpm installGet your API key from ZhipuAI Open Platform:
cp .env.local.example .env.localEdit .env.local:
ZHIPU_API_KEY=your_api_key_here
You need a CogView resource package for image generation. Sign up at open.bigmodel.cn and purchase CogView tokens (~¥0.1/image).
npm run devdocker build -t artflow .
docker run -d -p 3000:3000 \
-e ZHIPU_API_KEY=your_api_key_here \
--restart unless-stopped \
artflow- Draw — Use tldraw's built-in tools (pen, shapes, text, arrows)
- Paste — Cmd+V to paste images from clipboard
- AI Create — Click "AI 创作" in toolbar, choose style & size, describe what you want
- Enhance Prompt — Click the ✨ button to auto-optimize your description
- Clean Up — Click "清除画笔" to remove brush strokes
- Export — Click "导出", choose ratio & format, download
MIT