{
  "manifest_version": "1.0.0",
  "template": {
    "id": "df856075-a245-4518-9610-0625a129f5d5",
    "slug": "deeptutor-v1-personal-ai-tutor",
    "name": "DeepTutor v1 Personal AI Tutor",
    "description": "Personalized AI tutoring over your own documents, with quizzes and notes.",
    "url": "https://railway.com/deploy/deeptutor-v1-personal-ai-tutor",
    "upstream": {
      "repo_url": "https://github.com/baranberkay96/deeptutor-railway"
    }
  },
  "services": [
    {
      "name": "DeepTutor",
      "source": {
        "repo": "https://github.com/baranberkay96/deeptutor-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "DeepTutor",
      "description": "Time zone for the backend and frontend (e.g. Europe/Istanbul).",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PORT",
      "service": "DeepTutor",
      "description": "Port of the Next.js web app (0.0.0.0). Railway routes the public domain and the /api/auth/status healthcheck here; the app proxies /api and /ws to the API on 127.0.0.1:8001.",
      "secret": false,
      "strategy": "default",
      "default": "3782"
    },
    {
      "key": "LLM_MODEL",
      "service": "DeepTutor",
      "description": "Model id on that provider (e.g. gpt-5-mini, claude-sonnet-4-5, gemini-2.5-flash).",
      "secret": false,
      "strategy": "default",
      "default": "gpt-5-mini"
    },
    {
      "key": "LLM_BINDING",
      "service": "DeepTutor",
      "description": "DeepTutor provider id for LLM_API_KEY, e.g. openai, anthropic, gemini, deepseek, openrouter, groq, mistral.",
      "secret": false,
      "strategy": "default",
      "default": "openai"
    },
    {
      "key": "BACKEND_HOST",
      "service": "DeepTutor",
      "description": "Bind address of the FastAPI backend. Loopback only: the browser reaches it through the web app's proxy, never directly.",
      "secret": false,
      "strategy": "default",
      "default": "127.0.0.1"
    },
    {
      "key": "EMBEDDING_MODEL",
      "service": "DeepTutor",
      "description": "Embedding model id used for new knowledge bases.",
      "secret": false,
      "strategy": "default",
      "default": "text-embedding-3-small"
    },
    {
      "key": "DEEPTUTOR_WORKERS",
      "service": "DeepTutor",
      "description": "API worker processes (1-8). More than 1 needs Redis; the start script falls back to 1 if Redis is unreachable. Each worker adds roughly 0.4-0.6 GB RAM.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "EMBEDDING_BINDING",
      "service": "DeepTutor",
      "description": "Embedding provider id for knowledge bases (openai, gemini, cohere, jina, siliconflow, ...).",
      "secret": false,
      "strategy": "default",
      "default": "openai"
    },
    {
      "key": "DEEPTUTOR_REDIS_URL",
      "service": "DeepTutor",
      "description": "Private Redis URL for DeepTutor's turn coordination (event streams, leases, multi-worker mode).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DEEPTUTOR_CORS_ORIGINS",
      "service": "DeepTutor",
      "description": "Allowed browser origins for the API, comma-separated. Add your custom domain here if you attach one.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DEEPTUTOR_ADMIN_PASSWORD",
      "service": "DeepTutor",
      "description": "Admin password, generated at deploy (min. 12 characters). Login is always required; the public sign-up page stays closed. To rotate, change it here and redeploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DEEPTUTOR_ADMIN_USERNAME",
      "service": "DeepTutor",
      "description": "Username of the admin account (3-64 letters, digits, '.', '_' or '-', or an email).",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "DEEPTUTOR_ALLOW_CODE_EXEC",
      "service": "DeepTutor",
      "description": "Keep false unless you need it. true lets admins' chats run model-written code (office-file skills, code answers) as a restricted subprocess inside this container, which can read the app's data and keys. Railway has no Docker sandbox.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DEEPTUTOR_REDIS_WAIT_SECONDS",
      "service": "DeepTutor",
      "description": "How long the start script waits for Redis before starting with 1 in-memory worker instead.",
      "secret": false,
      "strategy": "default",
      "default": "300"
    },
    {
      "key": "DEEPTUTOR_TOKEN_EXPIRE_HOURS",
      "service": "DeepTutor",
      "description": "How long a login stays valid, in hours (upstream default 24).",
      "secret": true,
      "strategy": "default",
      "default": "24"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "DeepTutor",
      "description": "Grace period on redeploy so running answers are saved (the backend gets 30 s before it is stopped).",
      "secret": false,
      "strategy": "default",
      "default": "45"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Private network hostname of the Redis service, only resolvable from services in the same environment",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Port that Redis listens on",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Username for authenticating with Redis",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Connection string for connecting to Redis using the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Alias of REDIS_PASSWORD for clients that expect the unseparated name",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Randomly generated password for authenticating with Redis",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "deeptutor-v1-personal-ai-tutor"
      }
    },
    "cli": "railway deploy --template deeptutor-v1-personal-ai-tutor",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "df856075-a245-4518-9610-0625a129f5d5",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "4ceb6033-ca72-5c79-b2b0-a7a1e7640135": {
                  "icon": "https://cdn.jsdelivr.net/gh/HKUDS/DeepTutor@v1.6.15/web/public/logo.png",
                  "name": "DeepTutor",
                  "build": {
                    "builder": "DOCKERFILE"
                  },
                  "deploy": {
                    "healthcheckPath": "/api/auth/status",
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 900
                  },
                  "source": {
                    "repo": "baranberkay96/deeptutor-railway",
                    "branch": "main",
                    "rootDirectory": "/services/deeptutor"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": true,
                      "description": "Time zone for the backend and frontend (e.g. Europe/Istanbul).",
                      "defaultValue": "UTC"
                    },
                    "PORT": {
                      "isOptional": true,
                      "description": "Port of the Next.js web app (0.0.0.0). Railway routes the public domain and the /api/auth/status healthcheck here; the app proxies /api and /ws to the API on 127.0.0.1:8001.",
                      "defaultValue": "3782"
                    },
                    "LLM_MODEL": {
                      "isOptional": true,
                      "description": "Model id on that provider (e.g. gpt-5-mini, claude-sonnet-4-5, gemini-2.5-flash).",
                      "defaultValue": "gpt-5-mini"
                    },
                    "LLM_API_KEY": {
                      "isOptional": true,
                      "description": "Optional, recommended. Chat model API key. When set, a 'Railway' provider profile is created and selected on boot. You can instead add providers in Settings after login.",
                      "defaultValue": ""
                    },
                    "LLM_BINDING": {
                      "isOptional": true,
                      "description": "DeepTutor provider id for LLM_API_KEY, e.g. openai, anthropic, gemini, deepseek, openrouter, groq, mistral.",
                      "defaultValue": "openai"
                    },
                    "BACKEND_HOST": {
                      "isOptional": true,
                      "description": "Bind address of the FastAPI backend. Loopback only: the browser reaches it through the web app's proxy, never directly.",
                      "defaultValue": "127.0.0.1"
                    },
                    "LLM_BASE_URL": {
                      "isOptional": true,
                      "description": "Optional. API base URL; empty uses the provider's default (e.g. https://api.openai.com/v1).",
                      "defaultValue": ""
                    },
                    "EMBEDDING_MODEL": {
                      "isOptional": true,
                      "description": "Embedding model id used for new knowledge bases.",
                      "defaultValue": "text-embedding-3-small"
                    },
                    "DEEPTUTOR_EXTRAS": {
                      "isOptional": true,
                      "description": "Optional upstream extras installed on every start, comma-separated (e.g. parse-markitdown, rag-lightrag). Slows boot; the pip cache is kept on the volume.",
                      "defaultValue": ""
                    },
                    "DEEPTUTOR_WORKERS": {
                      "isOptional": true,
                      "description": "API worker processes (1-8). More than 1 needs Redis; the start script falls back to 1 if Redis is unreachable. Each worker adds roughly 0.4-0.6 GB RAM.",
                      "defaultValue": "2"
                    },
                    "EMBEDDING_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. Embedding API key. Empty: reuses LLM_API_KEY (and LLM_BASE_URL) when EMBEDDING_BINDING equals LLM_BINDING. Knowledge bases need an embedding model.",
                      "defaultValue": ""
                    },
                    "EMBEDDING_BINDING": {
                      "isOptional": true,
                      "description": "Embedding provider id for knowledge bases (openai, gemini, cohere, jina, siliconflow, ...).",
                      "defaultValue": "openai"
                    },
                    "EMBEDDING_BASE_URL": {
                      "isOptional": true,
                      "description": "Optional. Embedding endpoint; empty uses LLM_BASE_URL when the LLM key is reused, otherwise the provider's default.",
                      "defaultValue": ""
                    },
                    "DEEPTUTOR_REDIS_URL": {
                      "isOptional": true,
                      "description": "Private Redis URL for DeepTutor's turn coordination (event streams, leases, multi-worker mode).",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "EMBEDDING_DIMENSION": {
                      "isOptional": true,
                      "description": "Optional. Vector size. Empty: 1536/3072 for OpenAI text-embedding-3-small/-large, otherwise the provider's default.",
                      "defaultValue": ""
                    },
                    "DEEPTUTOR_APT_PACKAGES": {
                      "isOptional": true,
                      "description": "Optional Debian packages installed on every start, comma-separated (e.g. ffmpeg).",
                      "defaultValue": ""
                    },
                    "DEEPTUTOR_CORS_ORIGINS": {
                      "isOptional": true,
                      "description": "Allowed browser origins for the API, comma-separated. Add your custom domain here if you attach one.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DEEPTUTOR_ADMIN_PASSWORD": {
                      "isOptional": true,
                      "description": "Admin password, generated at deploy (min. 12 characters). Login is always required; the public sign-up page stays closed. To rotate, change it here and redeploy.",
                      "defaultValue": "{{DEEPTUTOR_ADMIN_PASSWORD}}"
                    },
                    "DEEPTUTOR_ADMIN_USERNAME": {
                      "isOptional": true,
                      "description": "Username of the admin account (3-64 letters, digits, '.', '_' or '-', or an email).",
                      "defaultValue": "admin"
                    },
                    "DEEPTUTOR_ALLOW_CODE_EXEC": {
                      "isOptional": true,
                      "description": "Keep false unless you need it. true lets admins' chats run model-written code (office-file skills, code answers) as a restricted subprocess inside this container, which can read the app's data and keys. Railway has no Docker sandbox.",
                      "defaultValue": "false"
                    },
                    "DEEPTUTOR_REDIS_WAIT_SECONDS": {
                      "isOptional": true,
                      "description": "How long the start script waits for Redis before starting with 1 in-memory worker instead.",
                      "defaultValue": "300"
                    },
                    "DEEPTUTOR_TOKEN_EXPIRE_HOURS": {
                      "isOptional": true,
                      "description": "How long a login stays valid, in hours (upstream default 24).",
                      "defaultValue": "24"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Grace period on redeploy so running answers are saved (the backend gets 30 s before it is stopped).",
                      "defaultValue": "45"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:3782": {
                        "port": 3782
                      }
                    }
                  },
                  "volumeMounts": {
                    "bea8388f-e233-53cb-86aa-a47e1d4f50e2": {
                      "mountPath": "/app/data"
                    }
                  }
                },
                "540c4f66-ac1e-590e-901b-66d9ded9ee04": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --appendonly yes --appendfsync everysec --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": true,
                      "description": "Private network hostname of the Redis service, only resolvable from services in the same environment",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": true,
                      "description": "Port that Redis listens on",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": true,
                      "description": "Username for authenticating with Redis",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": true,
                      "description": "Connection string for connecting to Redis using the private network",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": true,
                      "description": "Alias of REDIS_PASSWORD for clients that expect the unseparated name",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": true,
                      "description": "Randomly generated password for authenticating with Redis",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "1262ba77-0696-51fb-8e61-243fcac464c1": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "DeepTutor",
      "method": "GET",
      "path": "/api/auth/status",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-19T22:14:48.327Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-19T21:48:36.888Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c2c996605bc24435a9d3",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 179,
    "typical_build_seconds": 101,
    "typical_start_seconds": 30,
    "slowest_service": "DeepTutor"
  }
}
