{
  "manifest_version": "1.0.0",
  "template": {
    "id": "2d68998b-1a2e-4605-9ab1-9b3f20fa9c1e",
    "slug": "cf5-chat",
    "name": "cf5 chat",
    "description": "Chat with multiple models in a sleek interface.",
    "url": "https://railway.com/deploy/cf5-chat",
    "upstream": {
      "repo_url": "https://github.com/CoasterFan5/cfchat"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "chat",
      "source": {
        "repo": "https://github.com/CoasterFan5/cfchat"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "ZERO_APP",
      "service": "chat",
      "description": "Provide a value for ZERO_APP.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "ZERO_TOKEN",
      "service": "chat",
      "description": "Provide a value for ZERO_TOKEN.",
      "secret": true,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "DATABASE_URL",
      "service": "chat",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GOOGLE_TOKEN",
      "service": "chat",
      "description": "Provide a value for GOOGLE_TOKEN.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "OPENAI_TOKEN",
      "service": "chat",
      "description": "Provide a value for OPENAI_TOKEN.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "GITHUB_CLIENT_ID",
      "service": "chat",
      "description": "Provide a value for GITHUB_CLIENT_ID.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "GITHUB_CLIENT_SECRET",
      "service": "chat",
      "description": "Provide a value for GITHUB_CLIENT_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Provide a value for PGDATA.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Provide a value for PGHOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Provide a value for PGPORT.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Provide a value for PGUSER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Provide a value for PGDATABASE.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Provide a value for PGPASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Provide a value for SSL_CERT_DAYS.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Provide a value for RAILWAY_DEPLOYMENT_DRAINING_SECONDS.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "cf5-chat"
      }
    },
    "cli": "railway deploy --template cf5-chat",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "2d68998b-1a2e-4605-9ab1-9b3f20fa9c1e",
            "serializedConfig": {
              "services": {
                "412783bf-57a6-4716-9e57-dfd9c84e30db": {
                  "icon": "https://raw.githubusercontent.com/CoasterFan5/cfchat/refs/heads/main/apps/web/static/favicon.png",
                  "name": "chat",
                  "deploy": {
                    "startCommand": "node ./apps/web/build",
                    "healthcheckPath": null,
                    "preDeployCommand": "cd ./packages/database && npx drizzle-kit migrate"
                  },
                  "source": {
                    "repo": "https://github.com/CoasterFan5/cfchat",
                    "rootDirectory": ""
                  },
                  "variables": {
                    "ZERO_APP": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "0"
                    },
                    "ZERO_TOKEN": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "0"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "GOOGLE_TOKEN": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{GOOGLE_TOKEN}}"
                    },
                    "OPENAI_TOKEN": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{OPENAI_TOKEN}}"
                    },
                    "GITHUB_CLIENT_ID": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{GITHUB_CLIENT_ID}}"
                    },
                    "GITHUB_CLIENT_SECRET": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{GITHUB_CLIENT_SECRET}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "9e83edd5-0515-4cd5-b836-f8ef90ae65d9": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "3000"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgresql://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "9e83edd5-0515-4cd5-b836-f8ef90ae65d9": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0"
}
