svgen is a web app for generating usable SVG assets with AI.
The goal is not just to forward a prompt to a provider. The app focuses on a more reliable SVG generation flow: structured generation requests, better prompt shaping, validation, and sanitization before showing results to users.
- Generates SVG output from user prompts
- Supports multiple AI providers through a shared app flow
- Applies app-level safeguards so output is safer and more consistent
- Lets users manage provider keys/settings in the app UI
You usually get better SVG generations when your prompt specifies intent across these dimensions:
- Subject: what should be drawn
- Style: visual language (minimal, geometric, illustrative, etc.)
- Composition: layout/focal structure
- Color intent: palette or contrast direction
- Motion: animation behavior, or explicitly static
- Constraints: must-have and must-avoid rules
Suggested template:
Subject: ...
Style: ...
Composition: ...
Color intent: ...
Motion: ...
Constraints: ...
For local prompt-engineering checks, run the harness tests in src/core/services/ai/prompt-quality-harness.test.ts.
src/index.ts: main generation flow bootstrapsrc/core/: domain logic (generation use case, events, utilities, sanitization)src/ui/: web components and UI behaviorsrc/settings/: provider/settings pagesrc/gallery/: generated result browsing page
Generation requests can be slower than model-list requests. You can tune request behavior with Vite env vars:
VITE_AI_FETCH_TIMEOUT_MS: timeout for model-list fetches (default:30000)VITE_AI_GENERATE_TIMEOUT_MS: timeout for SVG generation requests (default:120000)VITE_AI_GENERATE_TIMEOUT_RETRIES: number of timeout-only retries for generation (default:1)VITE_AI_TIMEOUT_RETRY_DELAY_MS: delay before timeout retry (default:600)
Example .env:
VITE_AI_FETCH_TIMEOUT_MS=30000
VITE_AI_GENERATE_TIMEOUT_MS=120000
VITE_AI_GENERATE_TIMEOUT_RETRIES=1
VITE_AI_TIMEOUT_RETRY_DELAY_MS=600This project is licensed under the GNU AGPLv3 to ensure that all improvements to the hub remain open and benefit the community.
Because this is a web-based project, the AGPL prevents modified versions from being run as closed-source services without sharing the source code.
Our goal is to encourage collaboration while protecting the project from proprietary forks.
See the LICENSE file for more details.