Canvix — Free & open-source graphic design tool. A community-built Canva alternative with a drag-and-drop editor, templates, shapes, text, images & one-click export. Works on desktop, tablet & mobile.
TypeScript canva-alternativecanvasdesigndesign-tooldrag-and-dropeditorgraphic-designkonvanextjsopen-sourcereactself-hostedtemplatestypescript
# Canvix — environment variables
#
# ── Database (required) ────────────────────────────────────────
# PostgreSQL connection string. Works with any Postgres server.
#
# RECOMMENDED · Supabase (free tier is plenty):
# 1. Create a project at supabase.com
# 2. Dashboard → Connect → copy the URI (either style below)
# 3. Replace [YOUR-PASSWORD] with your database password
#
# Transaction pooler (best for servers without IPv6):
# postgresql://postgres.abcdefghij:[YOUR-PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:6543/postgres
# Direct connection (needs an IPv6 route on your host):
# postgresql://postgres:[YOUR-PASSWORD]@db.abcdefghij.supabase.co:5432/postgres
#
# You do NOT need to add sslmode or pgbouncer flags by hand — Canvix
# auto-applies them for Supabase (see src/lib/db-url.ts).
#
# Then run: npm run db:setup (migrations + 110 template seed, one command)
#
# Other hosts, same format:
# - Neon (serverless): postgresql://user:[email protected]/canvix
# - local install/Docker: postgresql://user:password@localhost:5432/canvix
# (docker run --name canvix-pg -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=canvix -p 5432:5432 -d postgres:17)
DATABASE_URL=postgresql://postgres.[YOUR-PROJECT-REF]:[YOUR-PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:6543/postgres
# ── AI provider (optional) ─────────────────────────────────────
# Canvix works without any AI provider (local features keep working).
# When these are set, AI features (Magic Layers, Assistant, Magic Write,
# image generation/editing, translate, photo search) activate.
# Credentials are SERVER-SIDE ONLY — never exposed to the browser.
#
# Alternative: place a .z-ai-config JSON file on the server host:
# { "baseUrl": "https://your-provider.example/v1", "apiKey": "your-key" }
# (checked at the working directory, then ~, then /etc)
#
# ZAI_BASE_URL=https://your-provider.example/v1
# ZAI_API_KEY=your-key
# ── Stock video search (optional, v0.15 R6) ────────────────────
# The Videos rail in the editor. Either FREE key activates it;
# with no key the rail stays hidden and everything else works
# (see docs/STOCK-VIDEO.md). Keys are server-side only.
# Pexels: https://www.pexels.com/api/
# Pixabay: https://pixabay.com/api/docs/
# PEXELS_API_KEY=your-free-key
# PIXABAY_API_KEY=your-free-key
# Base overrides (proxies / test rigs — rarely needed):
# PEXELS_API_BASE=https://api.pexels.com
# PIXABAY_API_BASE=https://pixabay.com/api
# ── Stock sound search (optional, Sound wave) ────────────────
# The Audio rail's Freesound search. One FREE key; results are
# Creative Commons 0 by default. With no key the offline 16-sound
# pack, voiceover recording and uploads keep working (see
# docs/SOUND.md). Keys are server-side only.
# https://freesound.org/apiv2/apply/
# FREESOUND_API_KEY=your-free-key
# FREESOUND_API_BASE=https://freesound.org/apiv2
# ── AI agents / MCP server (optional, v0.6) ───────────────────
# Model Context Protocol endpoint: POST /api/mcp
# Lets AI assistants (Claude Desktop, Cursor, ChatGPT, any MCP client)
# create & edit real Canvix designs on this server. Disabled until
# you set a token; requests must send "Authorization: Bearer <token>".
# Generate one with: openssl rand -hex 24
# CANVIX_MCP_TOKEN=change-me-to-a-long-random-secret
# ── Rate limiting (optional, v0.12.3) ─────────────────────────
# Per-IP caps on designs CRUD, collab events/presence, comments and
# media init + a 6-connections-per-IP cap on the SSE stream. Set to
# "off" only when something in front of the app already throttles.
# CANVIX_RATE_LIMITS=off
# CANVIX_SSE_MAX_PER_IP=6
# ── Observability (optional, v0.12.5) ─────────────────────────
# All off by default — a design tool's server logs are the
# self-hoster's to read (privacy first).
#
# CANVIX_LOG=requests → one JSON line per API request on stdout:
# method, path (no query strings), status,
# duration. Values: requests | 1 | true
# CANVIX_ERROR_WEBHOOK_URL=https://… → POST a JSON error report
# (message, path, method, app version) for
# every unhandled request error. Any endpoint
# that accepts JSON works (Slack webhooks via
# a relay, Discord, your own collector).
# Health: GET /api/health?v=2 returns aggregate counts + a DB
# latency probe (no env needed, counts only — never ids).
# CANVIX_LOG=requests
# CANVIX_ERROR_WEBHOOK_URL=
# ── Plugins (optional, v0.13) ─────────────────────────────────
# The plugin system is OFF unless you opt in. Third-party plugin
# code runs inside a sandboxed iframe and only ever touches data
# through the permission-checked RPC broker — but it is still
# third-party code, so the choice stays yours.
#
# CANVIX_PLUGINS=1 → enable /api/plugins (install/list/
# uninstall) and plugin elements. Values:
# 1 | true | on. Default: off.
# CANVIX_PLUGINS=1
# ── v0.28.1: OpenAI-compatible gateway model pins (self-hosters) ──
# Point ZAI_BASE_URL at any OpenAI-compatible endpoint (NVIDIA NIM,
# OpenRouter, vLLM, Ollama…) and pin per-slot model ids. DB config
# still wins when present. Example (NVIDIA NIM, measured 2026-11):
# ZAI_BASE_URL=https://integrate.api.nvidia.com/v1
# ZAI_API_KEY=nvapi-…
# ZAI_TEXT_MODEL=nvidia/nemotron-3-ultra-550b-a55b
# ZAI_VISION_MODEL=nvidia/nemotron-3.5-super-vl-120b-a12b
ZAI_TEXT_MODEL=
ZAI_VISION_MODEL=
ZAI_IMAGE_MODEL=
# ── v0.29: JSON-mode + vision-fallback pins ──
# ZAI_JSON_MODE=auto (default) — response_format json_object on agent
# turns; auto-drops it if the gateway rejects the param. 'on' = fail
# loudly, 'off' = never send it.
# ZAI_VISION_FALLBACK_MODEL — second chance for vision calls when NIM's
# media screening transiently 422s a data URL (e.g. the omni model:
# nvidia/nemotron-3-nano-omni-30b-a3b-reasoning, verified data-URL).
ZAI_JSON_MODE=auto
ZAI_VISION_FALLBACK_MODEL=