{
  "manifest_version": "1.0.0",
  "template": {
    "id": "796599d0-1256-4fbf-afed-f3af3c9c52de",
    "slug": "libredb-studio",
    "name": "libredb-studio",
    "description": "Open-source web-based SQL & NoSQL IDE with AI-powered query assistance",
    "url": "https://railway.com/deploy/libredb-studio",
    "upstream": {
      "image": "ghcr.io/libredb/libredb-studio:0.9.66"
    }
  },
  "services": [
    {
      "name": "libredb-studio",
      "source": {
        "image": "ghcr.io/libredb/libredb-studio:0.9.66"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "libredb-studio",
      "description": "Port the app listens on. Must match the HTTP Proxy Port. Leave as 3000",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "JWT_SECRET",
      "service": "libredb-studio",
      "description": "Secret key used to sign login session tokens. Auto-generated — keep it",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "USER_EMAIL",
      "service": "libredb-studio",
      "description": "Login email for the standard, query-only account",
      "secret": false,
      "strategy": "default",
      "default": "user@libredb.org"
    },
    {
      "key": "ADMIN_EMAIL",
      "service": "libredb-studio",
      "description": "Login email for the ADMIN account (full access incl. maintenance tools)",
      "secret": false,
      "strategy": "default",
      "default": "admin@libredb.org"
    },
    {
      "key": "USER_PASSWORD",
      "service": "libredb-studio",
      "description": "Password for the standard user. Auto-generated; find it in Variables after deploy",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "libredb-studio",
      "description": "Password for the admin account. Auto-generated; find it in Variables after deploy",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "STORAGE_PROVIDER",
      "service": "libredb-studio",
      "description": "Where saved connections & settings live: 'sqlite' (on the volume) or 'postgres' (multi-node)",
      "secret": false,
      "strategy": "default",
      "default": "sqlite"
    },
    {
      "key": "STORAGE_SQLITE_PATH",
      "service": "libredb-studio",
      "description": "SQLite file path on the mounted volume (/app/data). Keep the default.",
      "secret": false,
      "strategy": "default",
      "default": "/app/data/libredb-storage.db"
    },
    {
      "key": "NEXT_PUBLIC_AUTH_PROVIDER",
      "service": "libredb-studio",
      "description": "Auth mode: 'local' (email/password). Set 'oidc' for SSO (needs the OIDC_* optional vars)",
      "secret": false,
      "strategy": "default",
      "default": "local"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "libredb-studio"
      }
    },
    "cli": "railway deploy --template libredb-studio",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "796599d0-1256-4fbf-afed-f3af3c9c52de",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "f8c509ac-9b2d-4153-9a5f-e7510b6f9bcb": {
                  "icon": "https://libredb.org/logo.svg",
                  "name": "libredb-studio",
                  "deploy": {
                    "healthcheckPath": "/api/db/health"
                  },
                  "source": {
                    "image": "ghcr.io/libredb/libredb-studio:0.9.66"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Port the app listens on. Must match the HTTP Proxy Port. Leave as 3000",
                      "defaultValue": "3000"
                    },
                    "LLM_MODEL": {
                      "isOptional": true,
                      "description": "AI model name; provider default used if empty (e.g. gpt-4o-mini, llama3.1)",
                      "defaultValue": ""
                    },
                    "JWT_SECRET": {
                      "description": "Secret key used to sign login session tokens. Auto-generated — keep it",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "OIDC_SCOPE": {
                      "isOptional": true,
                      "description": "OIDC scopes. Defaults to 'openid profile email' if empty",
                      "defaultValue": ""
                    },
                    "USER_EMAIL": {
                      "description": "Login email for the standard, query-only account",
                      "defaultValue": "user@libredb.org"
                    },
                    "ADMIN_EMAIL": {
                      "description": "Login email for the ADMIN account (full access incl. maintenance tools)",
                      "defaultValue": "admin@libredb.org"
                    },
                    "LLM_API_KEY": {
                      "isOptional": true,
                      "description": "API key for the chosen AI provider (Gemini/OpenAI). Not needed for a local Ollama",
                      "defaultValue": ""
                    },
                    "LLM_API_URL": {
                      "isOptional": true,
                      "description": "Base URL for ollama/custom AI providers only. Not needed for gemini/openai",
                      "defaultValue": ""
                    },
                    "OIDC_ISSUER": {
                      "isOptional": true,
                      "description": "OIDC issuer URL for SSO. Required when NEXT_PUBLIC_AUTH_PROVIDER=oidc",
                      "defaultValue": ""
                    },
                    "LLM_PROVIDER": {
                      "isOptional": true,
                      "description": "Optional AI query assistance: gemini \\| openai \\| ollama \\| custom. Omit to keep AI off.",
                      "defaultValue": ""
                    },
                    "USER_PASSWORD": {
                      "description": "Password for the standard user. Auto-generated; find it in Variables after deploy",
                      "defaultValue": "{{USER_PASSWORD}}"
                    },
                    "ADMIN_PASSWORD": {
                      "description": "Password for the admin account. Auto-generated; find it in Variables after deploy",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "OIDC_CLIENT_ID": {
                      "isOptional": true,
                      "description": "OIDC application client ID (SSO)",
                      "defaultValue": ""
                    },
                    "OIDC_ROLE_CLAIM": {
                      "isOptional": true,
                      "description": "`realm_access.roles` > Claim path holding user roles, used for admin mapping",
                      "defaultValue": ""
                    },
                    "OIDC_ADMIN_ROLES": {
                      "isOptional": true,
                      "description": "Comma-separated role values mapped to admin. Defaults to 'admin'",
                      "defaultValue": ""
                    },
                    "STORAGE_PROVIDER": {
                      "description": "Where saved connections & settings live: 'sqlite' (on the volume) or 'postgres' (multi-node)",
                      "defaultValue": "sqlite"
                    },
                    "OIDC_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "OIDC application client secret (SSO)",
                      "defaultValue": ""
                    },
                    "STORAGE_SQLITE_PATH": {
                      "description": "SQLite file path on the mounted volume (/app/data). Keep the default.",
                      "defaultValue": "/app/data/libredb-storage.db"
                    },
                    "STORAGE_POSTGRES_URL": {
                      "isOptional": true,
                      "description": "`postgresql://user:pass@host:5432/db` > PostgreSQL URL for multi-node storage. Also set STORAGE_PROVIDER=postgres",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_AUTH_PROVIDER": {
                      "description": "Auth mode: 'local' (email/password). Set 'oidc' for SSO (needs the OIDC_* optional vars)",
                      "defaultValue": "local"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "f8c509ac-9b2d-4153-9a5f-e7510b6f9bcb": {
                      "mountPath": "/app/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "libredb-studio",
      "method": "GET",
      "path": "/api/db/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-14T22:14:43.073Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-13T10:52:56.134Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_f00790e3aadf4a33aeed",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 63,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "libredb-studio"
  }
}
