Spaces:
Sleeping
Sleeping
Sync export fidelity fixes + more AI providers
Browse files- .env.example +67 -0
.env.example
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copy to editor/.env and fill in. editor/.env is gitignored β never commit real keys.
|
| 2 |
+
|
| 3 |
+
# --- Auth: Clerk (optional). With BOTH keys set, the app shows a login gate and every project/asset/
|
| 4 |
+
# export is scoped to the signed-in user. Without them, local dev runs as a single "dev_user" (no login).
|
| 5 |
+
# Create a free app at https://clerk.com β API keys, then set ALL THREE below:
|
| 6 |
+
# - VITE_CLERK_PUBLISHABLE_KEY β the publishable key, VITE_-prefixed for the browser (the login UI)
|
| 7 |
+
# - CLERK_PUBLISHABLE_KEY β the SAME publishable key, un-prefixed for the backend middleware
|
| 8 |
+
# - CLERK_SECRET_KEY β the secret key (server-only; verifies sessions)
|
| 9 |
+
# VITE_CLERK_PUBLISHABLE_KEY=pk_test_xxx
|
| 10 |
+
# CLERK_PUBLISHABLE_KEY=pk_test_xxx
|
| 11 |
+
# CLERK_SECRET_KEY=sk_test_xxx
|
| 12 |
+
|
| 13 |
+
# --- Primary LLM: Kimi (Moonshot). Powers the AI agent, scene generation and script writing. ---
|
| 14 |
+
KIMI_API_KEY=sk-xxx
|
| 15 |
+
KIMI_BASE_URL=https://api.moonshot.ai/v1
|
| 16 |
+
|
| 17 |
+
# --- Cheapest LLM option: DeepInfra (serverless open models β Llama/Qwen, pay-per-token, no token cap). ---
|
| 18 |
+
# Optional. Set this to make the open models appear in the model switcher (and you can drop Groq entirely,
|
| 19 |
+
# since DeepInfra also serves Whisper STT). Get a key at https://deepinfra.com.
|
| 20 |
+
# DEEPINFRA_API_KEY=di-xxx
|
| 21 |
+
|
| 22 |
+
# --- Database (optional): Postgres for project storage. With DATABASE_URL set, project manifests are
|
| 23 |
+
# stored in a `projects` table (jsonb) scoped by Clerk user id instead of JSON files on disk. Without
|
| 24 |
+
# it, projects are JSON files under public/projects/ (fine for local dev / small beta). Media files
|
| 25 |
+
# (assets/audio) still live on disk for now either way. Use a free Neon (neon.tech) or Supabase db. ---
|
| 26 |
+
# DATABASE_URL=postgresql://user:password@host:5432/dbname?sslmode=require
|
| 27 |
+
|
| 28 |
+
# --- Object storage (optional): S3-compatible bucket for project media (assets/audio). With these set,
|
| 29 |
+
# uploads go to the bucket and media is served via short-lived signed URLs (private). Without them,
|
| 30 |
+
# media stays on local disk and is served by the authenticated /media route. Works with Cloudflare R2
|
| 31 |
+
# (recommended β zero egress), AWS S3, or MinIO. For R2: S3_REGION=auto, endpoint = your R2 S3 API URL. ---
|
| 32 |
+
# S3_ENDPOINT=https://<accountid>.r2.cloudflarestorage.com
|
| 33 |
+
# S3_BUCKET=motion-graphics-media
|
| 34 |
+
# S3_ACCESS_KEY_ID=xxx
|
| 35 |
+
# S3_SECRET_ACCESS_KEY=xxx
|
| 36 |
+
# S3_REGION=auto
|
| 37 |
+
|
| 38 |
+
# --- Credits & billing ---
|
| 39 |
+
# Every signed-in user has a CREDIT BALANCE (stored in Clerk metadata). New users start with FREE_CREDITS;
|
| 40 |
+
# every AI action + export debits credits; at 0 they must buy more. The cap is enforced whenever Clerk
|
| 41 |
+
# auth is ON (above) β independent of Stripe β so your API tokens are protected even before payments.
|
| 42 |
+
# Stripe is only needed to SELL top-ups (one-time Checkout). No Stripe products needed β packs use an
|
| 43 |
+
# inline price; just set the secret + webhook (point it at POST /api/billing/webhook).
|
| 44 |
+
# FREE_CREDITS=100 # credits each new user gets (default 100)
|
| 45 |
+
# STRIPE_SECRET_KEY=sk_test_xxx # enables buying credit packs
|
| 46 |
+
# STRIPE_WEBHOOK_SECRET=whsec_xxx # verifies the payment webhook
|
| 47 |
+
# APP_URL=https://your-domain.com # public origin for Stripe return URLs + the phone-upload QR
|
| 48 |
+
# UNLIMITED_CREDITS=1 # local dev / disable the cap entirely (omit in production)
|
| 49 |
+
# ADMIN_USER_IDS=user_xxx,user_yyy # exempt specific accounts from the cap (e.g. YOUR own id)
|
| 50 |
+
|
| 51 |
+
# --- Groq: kept for Whisper speech-to-text + TTS only (audio-priced, not token-capped). ---
|
| 52 |
+
# Its LLMs were removed (free-tier daily token cap). Keep this key for transcription, OR remove it
|
| 53 |
+
# and set DEEPINFRA_API_KEY to route STT through DeepInfra Whisper instead.
|
| 54 |
+
GROQ_API_KEY=gsk_xxx
|
| 55 |
+
GROQ_BASE_URL=https://api.groq.com/openai/v1
|
| 56 |
+
|
| 57 |
+
# --- Abuse prevention, rate limits & ops (all optional) ---
|
| 58 |
+
# Device/account free-quota linking needs Postgres (DATABASE_URL above). It hashes signals with this
|
| 59 |
+
# secret β set a long random value in production (changing it invalidates existing hashes).
|
| 60 |
+
# SIGNALS_SECRET=<a long random string>
|
| 61 |
+
# LINK_BY_IP=1 # also link accounts by network IP (more catches, more false positives on shared Wi-Fi). Off by default.
|
| 62 |
+
# API_RATE_LIMIT=300 # max API requests per IP per minute (default 300)
|
| 63 |
+
# AI_RATE_LIMIT=40 # max AI/render requests per user per minute (default 40)
|
| 64 |
+
# DAILY_SPEND_ALERT_USD=20 # warn in logs when the day's estimated AI spend crosses this
|
| 65 |
+
# SENTRY_DSN=https://... # error tracking (also run: npm i @sentry/node)
|
| 66 |
+
# ENABLE_CSP=1 # send a Content-Security-Policy (test first β can break embeds)
|
| 67 |
+
# VITE_SUPPORT_EMAIL=support@yourdomain.com # shown on the "wrongly blocked? contact support" link (build-time)
|