{
  "manifest_version": "1.0.0",
  "template": {
    "id": "dd7bc9c7-d77d-40de-9541-2fe0eb1a3a6c",
    "slug": "cloud-cost-optimization-hub",
    "name": "cloud-cost-optimization-hub",
    "description": "Multi-cloud cost observability and optimization dashboard.",
    "url": "https://railway.com/deploy/cloud-cost-optimization-hub",
    "upstream": {
      "image": "xiaosong233/cloud-cost-optimization-hub-frontend-railway:latest"
    }
  },
  "services": [
    {
      "name": "frontend",
      "source": {
        "image": "xiaosong233/cloud-cost-optimization-hub-frontend-railway:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "backend",
      "source": {
        "image": "xiaosong233/cloud-cost-optimization-hub-backend-railway:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "database",
      "source": {
        "image": "postgres:15.14-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "frontend",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "BACKEND_URL",
      "service": "frontend",
      "description": "Provide a value for BACKEND_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ENV",
      "service": "backend",
      "description": "Provide a value for ENV.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "PORT",
      "service": "backend",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "DB_HOST",
      "service": "backend",
      "description": "Provide a value for DB_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_NAME",
      "service": "backend",
      "description": "Provide a value for DB_NAME.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "backend",
      "description": "Provide a value for DB_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "DB_USER",
      "service": "backend",
      "description": "Provide a value for DB_USER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GIN_MODE",
      "service": "backend",
      "description": "Provide a value for GIN_MODE.",
      "secret": false,
      "strategy": "default",
      "default": "release"
    },
    {
      "key": "LOG_LEVEL",
      "service": "backend",
      "description": "Provide a value for LOG_LEVEL.",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "AWS_REGION",
      "service": "backend",
      "description": "Provide a value for AWS_REGION.",
      "secret": false,
      "strategy": "default",
      "default": "us-east-1"
    },
    {
      "key": "JWT_SECRET",
      "service": "backend",
      "description": "Provide a value for JWT_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DB_PASSWORD",
      "service": "backend",
      "description": "Provide a value for DB_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "JWT_EXPIRY_HOURS",
      "service": "backend",
      "description": "Provide a value for JWT_EXPIRY_HOURS.",
      "secret": false,
      "strategy": "default",
      "default": "24"
    },
    {
      "key": "PGDATA",
      "service": "database",
      "description": "Provide a value for PGDATA.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "database",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "default",
      "default": "ccoh"
    },
    {
      "key": "POSTGRES_USER",
      "service": "database",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "ccoh"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "database",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "cloud-cost-optimization-hub"
      }
    },
    "cli": "railway deploy --template cloud-cost-optimization-hub",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "dd7bc9c7-d77d-40de-9541-2fe0eb1a3a6c",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3538aa56-d34e-497d-aebf-1f67336a1911": {
                  "icon": null,
                  "name": "frontend",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "xiaosong233/cloud-cost-optimization-hub-frontend-railway:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "3000"
                    },
                    "BACKEND_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "http://${{backend.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "8c80bddf-5aee-4b41-8e9e-e3e193646d22": {
                  "icon": null,
                  "name": "backend",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "xiaosong233/cloud-cost-optimization-hub-backend-railway:latest"
                  },
                  "variables": {
                    "ENV": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "production"
                    },
                    "PORT": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "8080"
                    },
                    "DB_HOST": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{database.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_NAME": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{database.POSTGRES_DB}}"
                    },
                    "DB_PORT": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "5432"
                    },
                    "DB_USER": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{database.POSTGRES_USER}}"
                    },
                    "GIN_MODE": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "release"
                    },
                    "LOG_LEVEL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "info"
                    },
                    "AWS_REGION": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "us-east-1"
                    },
                    "JWT_SECRET": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "DB_PASSWORD": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{database.POSTGRES_PASSWORD}}"
                    },
                    "JWT_EXPIRY_HOURS": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "24"
                    }
                  }
                },
                "fb381941-4a66-46ef-b5a3-f2241d239db6": {
                  "icon": null,
                  "name": "database",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:15.14-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "ccoh"
                    },
                    "POSTGRES_USER": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "ccoh"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "fb381941-4a66-46ef-b5a3-f2241d239db6": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T15:36:43.491Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_e7ee474c990f43538aa5",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 103,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "frontend"
  }
}
