{
    "installation": {
        "title": "Installation & Setup",
        "subtitle": "Through this guide, you'll learn how to install and configure DeepTrans Studio development environment.",
        "prerequisites": {
            "title": "Prerequisites",
            "description": "Before installing DeepTrans Studio, please ensure the following tools are installed:",
            "items": [
                "Node.js ≥ 18.18 (recommended to use corepack to manage Yarn 1.22.22)",
                "Yarn (enabled via corepack enable)",
                "Docker / Docker Compose (for local dependency services or one-click deployment)",
                "Git and other common tools"
            ]
        },
        "installDeps": {
            "title": "Install Dependencies",
            "description": "Use corepack to manage Yarn, then install project dependencies.",
            "commands": {
                "enableCorepack": "corepack enable",
                "prepareYarn": "corepack prepare yarn@1.22.22 --activate",
                "install": "yarn install"
            }
        },
        "envConfig": {
            "title": "Configure Environment Variables",
            "description": "Copy or create .env.local and fill in according to your actual environment:",
            "note": "💡 For production, use Tencent COS for object storage, PostgreSQL 18 with pgvector/PGroonga for memory search, Valkey for queues, and MinerU online parsing for PDFs.",
            "example": "# Database & Cache\nDATABASE_URL=\"postgresql://postgres:123456@localhost:5432/deeptrans\"\nREDIS_URL=\"redis://valkey:6379\"\n\n# Authentication & Site Config\nAUTH_SECRET=\"Please generate a random string\"\nNEXTAUTH_URL=\"http://localhost:3000\"\nNODE_ENV=development\n\n# LLM / AI Services\nOPENAI_API_KEY=\"sk-xxxx\"\nOPENAI_BASE_URL=\"https://api.openai.com/v1\"\nOPENAI_API_MODEL=\"gpt-4o-mini\"\n\n# Dedicated chat/translation LLM config\n# LLM_API_KEY=\"sk-xxxx\"\n# LLM_BASE_URL=\"https://api.openai.com/v1\"\n# LLM_MODEL=\"gpt-4o-mini\"\n\n# Embedding provider\nOPENAI_EMBED_MODEL=doubao-embedding-text-240715\n# EMBEDDING_API_KEY=\"sk-xxxx\"\n# EMBEDDING_BASE_URL=\"https://api.openai.com/v1\"\n# EMBEDDING_API_PATH=\"/embeddings\"\n# EMBEDDING_MODEL=\"doubao-embedding-text-240715\"\n# EMBEDDING_DIMENSIONS=\n\n# MinerU online PDF parser\nMINERU_API_MODE=agent\nMINERU_AGENT_BASE_URL=https://mineru.net/api/v1/agent\nMINERU_API_BASE_URL=https://mineru.net/api/v4\n# MINERU_API_TOKEN=\"token-for-standard-or-precise-mode\"\nMINERU_MODEL_VERSION=vlm\nMINERU_LANGUAGE=ch\nMINERU_IS_OCR=false\nMINERU_ENABLE_TABLE=true\nMINERU_ENABLE_FORMULA=true\nMINERU_TIMEOUT_MS=300000\nMINERU_POLL_INTERVAL_MS=3000\n# MINERU_PAGE_RANGE=1-20\n# MINERU_DISABLE=false\n\n# Object Storage\n# Development: MinIO\nSTORAGE_TYPE=minio\nSTORAGE_ENDPOINT=localhost\nSTORAGE_PORT=9000\nSTORAGE_USE_SSL=false\nSTORAGE_ACCESS_KEY=minioadmin\nSTORAGE_SECRET_KEY=minioadmin\nSTORAGE_BUCKET=deeptrans\n\n# Production: Tencent COS\n# STORAGE_TYPE=cos\n# COS_SECRET_ID=AKIDxxxxxxxx\n# COS_SECRET_KEY=xxxxxxxx\n# COS_BUCKET=deeptrans-1250000000\n# COS_REGION=ap-guangzhou\n\n# Other Services\nSTUDIO_HOST=localhost        # Used for Traefik/HTTPS deployment\n\n# Optional: SMTP, pgvector access info, etc.\n# EMAIL_SERVER=smtps://deeptrans_studio%40163.com:<your-163-authorization-code>@smtp.163.com:465\n# EMAIL_FROM=\"DeepTrans Studio <deeptrans_studio@163.com>\""
        },
        "initDb": {
            "title": "Initialize Database",
            "description": "Execute database migrations and generate Prisma Client.",
            "commands": {
                "migrate": "yarn prisma migrate deploy      # or yarn db:push to initialize structure",
                "generate": "yarn prisma generate            # Generate Prisma Client",
                "seed": "yarn db:seed                    # Optional: Import sample data"
            }
        },
        "startDev": {
            "title": "Start Local Development Environment",
            "description": "Start dependency services and run the Next.js development server.",
            "step1": {
                "title": "Start Dependency Services",
                "description": "Recommended to use services from Docker Compose:",
                "command": "docker compose up -d db valkey minio\n# Development uses MinIO locally. Production uses Tencent COS and does not start MinIO."
            },
            "step2": {
                "title": "Start Next.js Application",
                "description": "Start the development server (with hot reload):",
                "command": "yarn dev"
            },
            "step3": {
                "title": "Start Worker Service (Optional)",
                "description": "If you want to run Worker in local Node environment, execute:",
                "command": "yarn worker",
                "note": "In Docker Compose, the equivalent service is app_worker."
            },
            "access": {
                "title": "Access Application",
                "description": "Visit http://localhost:3000 to access Studio; Prisma Studio can be started with `yarn db:studio`."
            }
        },
        "dockerCompose": {
            "title": "Run with Docker Compose",
            "description": "Deploy all services with Docker Compose in one command.",
            "step1": {
                "title": "Prepare Environment Variables",
                "description": "Prepare .env / .env.production and ensure STUDIO_HOST points to the external domain."
            },
            "step2": {
                "title": "Build Images",
                "command": "docker compose build app app_worker"
            },
            "step3": {
                "title": "Start Main Services",
                "command": "docker compose up -d traefik app app_worker db valkey",
                "note": "Traefik will map ports 80/443 to Studio. Prisma Studio can be started as needed."
            }
        },
        "nextSteps": {
            "title": "Next Steps",
            "description": "After installation, you can:",
            "links": {
                "gettingStarted": "View Getting Started Guide",
                "concepts": "Learn Core Concepts",
                "workflows": "Learn Workflows"
            }
        }
    }
}
