* Harden API routes with rate limits, upload cap, and edit dedupe. Protect expensive endpoints from abuse, reject oversized mood uploads, dedupe concurrent edit-images calls, and surface Kakao search failures instead of silent mock fallback. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: switch to adapter-node for Railway deploy --------- Co-authored-by: Cursor <cursoragent@cursor.com>
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
# Gemini
|
|
GEMINI_API_KEY=
|
|
GEMINI_TEXT_MODEL=gemini-2.5-flash-lite
|
|
|
|
# Image generation
|
|
# IMAGE_PROVIDER: openai | gemini | mock
|
|
# mock = instant placeholder images, zero API calls (develop without burning quota)
|
|
IMAGE_PROVIDER=openai
|
|
OPENAI_API_KEY=your_openai_api_key_here
|
|
OPENAI_IMAGE_MODEL=gpt-image-1
|
|
# Bouquet preview (generating flow)
|
|
OPENAI_IMAGE_SIZE=1024x1536
|
|
# Flower catalog batch (scripts/generate-flower-catalog.js) — portrait cards
|
|
OPENAI_IMAGE_CATALOG_SIZE=1024x1536
|
|
OPENAI_IMAGE_CATALOG_QUALITY=low
|
|
GEMINI_IMAGE_MODEL=gemini-3.1-flash-image
|
|
|
|
# Kakao REST API (shop search for /map)
|
|
KAKAO_REST_API_KEY=
|
|
|
|
# Kakao Maps JavaScript key (map display on /map — public, client-side)
|
|
PUBLIC_KAKAO_MAP_KEY=
|
|
|
|
# Supabase (server-side only)
|
|
SUPABASE_URL=
|
|
SUPABASE_SERVICE_ROLE_KEY=
|
|
SUPABASE_STORAGE_BUCKET=flower-bouquets
|
|
|
|
# adapter-node (Railway / any Node host)
|
|
# Default body limit is 512K — mood-analysis allows up to 10 MB.
|
|
BODY_SIZE_LIMIT=10M
|
|
# Public URL after deploy (required for CSRF / form actions).
|
|
# ORIGIN=https://your-app.up.railway.app
|
|
# Real client IP behind Railway's proxy (for rate limiting).
|
|
# ADDRESS_HEADER=x-forwarded-for
|
|
# XFF_DEPTH=1
|
|
|
|
# Dev seed button: shown only when `npm run dev` (production build hides it).
|
|
# To mute during local dev, set DEV_SEED_MUTED = true in DevSeedButton.svelte.
|
|
# Replace static/dev/bouquet-{s,m,l}.jpg with real photos for richer UI previews.
|
|
|
|
# Flower catalog (result cards) — one-time batch, not per user request:
|
|
# npm run generate:flowers -- --dry-run
|
|
# npm run generate:flowers -- --missing-only
|
|
# npm run generate:flowers -- --ids 7,14
|
|
# Output: static/flowers/{flowerDB.id}.png
|