{
  "manifest_version": "1.0.0",
  "template": {
    "id": "945a9f0a-8870-416a-90bb-e32e7b192f2f",
    "slug": "KO6Gvb",
    "name": "kuai-mvp",
    "description": "A template to deploy for DApp mvp with kuai",
    "url": "https://railway.com/deploy/KO6Gvb",
    "upstream": {
      "repo_url": "https://github.com/ckb-js/kuai"
    }
  },
  "services": [
    {
      "name": "kuai",
      "source": {
        "repo": "https://github.com/ckb-js/kuai"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "kuai-mvp-dapp-ui",
      "source": {
        "repo": "https://github.com/Magickbase/kuai-mvp-dapp-ui"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "bitnami/redis"
      },
      "needs_volume": true,
      "volume_mount_path": "/bitnami",
      "tcp_ports": [
        6379
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "HOST",
      "service": "kuai",
      "description": "Provide a value for HOST.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "kuai",
      "description": "Provide a value for RAILWAY_DOCKERFILE_PATH.",
      "secret": false,
      "strategy": "default",
      "default": "docker/mvp-dapp/Dockerfile"
    },
    {
      "key": "NEXT_PUBLIC_CKB_NODE",
      "service": "kuai-mvp-dapp-ui",
      "description": "CKB node rpc url",
      "secret": false,
      "strategy": "default",
      "default": "https://testnet.ckb.dev/rpc"
    },
    {
      "key": "NEXT_PUBLIC_CHAIN_TYPE",
      "service": "kuai-mvp-dapp-ui",
      "description": "CKB chain type",
      "secret": false,
      "strategy": "default",
      "default": "testnet"
    },
    {
      "key": "NEXT_PUBLIC_SERVER_API",
      "service": "kuai-mvp-dapp-ui",
      "description": "The DApp service API url, it was created by kuai.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXT_PUBLIC_STORAGE_CAPACITY",
      "service": "kuai-mvp-dapp-ui",
      "description": "The min capacity needs",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Port to connect to Redis.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Default user to connect to Redis.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "URL to connect to Redis over the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Password to connect to Redis.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Password to connect to Redis.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Redis",
      "description": "Start Redis process as root to allow for writing to the volume",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public URL to connect to Redis, needed for the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_RUN_AS_ROOT",
      "service": "Redis",
      "description": "Start Redis process as root to allow for writing to the volume",
      "secret": false,
      "strategy": "default",
      "default": "true"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "KO6Gvb"
      }
    },
    "cli": "railway deploy --template KO6Gvb",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "945a9f0a-8870-416a-90bb-e32e7b192f2f",
            "serializedConfig": {
              "services": {
                "2d19a592-968d-48c9-ad2b-f3eb4878a848": {
                  "name": "kuai",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "repo": "https://github.com/ckb-js/kuai",
                    "rootDirectory": null
                  },
                  "variables": {
                    "HOST": {
                      "isOptional": true,
                      "defaultValue": "0.0.0.0"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": true,
                      "defaultValue": "docker/mvp-dapp/Dockerfile"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {}
                },
                "54f3618a-1765-4863-9de6-374e38838415": {
                  "name": "kuai-mvp-dapp-ui",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "repo": "https://github.com/Magickbase/kuai-mvp-dapp-ui",
                    "rootDirectory": null
                  },
                  "variables": {
                    "NEXT_PUBLIC_CKB_NODE": {
                      "isOptional": true,
                      "description": "CKB node rpc url",
                      "defaultValue": "https://testnet.ckb.dev/rpc"
                    },
                    "NEXT_PUBLIC_CHAIN_TYPE": {
                      "isOptional": true,
                      "description": "CKB chain type",
                      "defaultValue": "testnet"
                    },
                    "NEXT_PUBLIC_SERVER_API": {
                      "isOptional": true,
                      "description": "The DApp service API url, it was created by kuai.",
                      "defaultValue": "https://${{RAILWAY_SERVICE_KUAI_URL}}"
                    },
                    "NEXT_PUBLIC_STORAGE_CAPACITY": {
                      "isOptional": true,
                      "description": "The min capacity needs",
                      "defaultValue": "5000"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {}
                },
                "78f38aae-5935-4cf1-8deb-3339f216fa1b": {
                  "icon": "https://devicons.railway.app/i/redis.svg",
                  "name": "Redis",
                  "build": {},
                  "deploy": {},
                  "source": {
                    "image": "bitnami/redis"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{ RAILWAY_PRIVATE_DOMAIN }}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Redis.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Default user to connect to Redis.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Redis over the private network.",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_PRIVATE_DOMAIN }}:6379"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to Redis.",
                      "defaultValue": "${{ REDIS_PASSWORD }}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to Redis.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Start Redis process as root to allow for writing to the volume",
                      "defaultValue": "0"
                    },
                    "REDIS_PUBLIC_URL": {
                      "description": "Public URL to connect to Redis, needed for the Data panel.",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_TCP_PROXY_DOMAIN }}:${{ RAILWAY_TCP_PROXY_PORT }}"
                    },
                    "RAILWAY_RUN_AS_ROOT": {
                      "isOptional": false,
                      "description": "Start Redis process as root to allow for writing to the volume",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6379": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "78f38aae-5935-4cf1-8deb-3339f216fa1b": {
                      "mountPath": "/bitnami"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-21T17:17:03.229Z",
  "success_rate_30d": 0.1667,
  "validation": {
    "last_run_id": "run_c8e3af06f4e64797b164",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "BUILDING,BUILDING,CRASHED"
      }
    ],
    "typical_ready_seconds": 239,
    "typical_build_seconds": 157,
    "typical_start_seconds": 10,
    "slowest_service": "kuai"
  }
}
