{
  "manifest_version": "1.0.0",
  "template": {
    "id": "2ba25fd9-688c-4758-8dab-f265f4258d4e",
    "slug": "magic-reactions-for-chatgpt",
    "name": "Magic Reactions for ChatGPT",
    "description": "Private GIF and sticker reactions for ChatGPT, with OAuth and storage.",
    "url": "https://railway.com/deploy/magic-reactions-for-chatgpt",
    "upstream": {
      "repo_url": "https://github.com/lauramarmun-prog/magic-reactions-chatgpt-template"
    }
  },
  "services": [
    {
      "name": "Postgres Live",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Magic Reactions",
      "source": {
        "repo": "https://github.com/lauramarmun-prog/magic-reactions-chatgpt-template"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres Live",
      "description": "Directory where PostgreSQL stores persistent database files.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres Live",
      "description": "Private Railway hostname used by internal clients.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres Live",
      "description": "PostgreSQL server port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres Live",
      "description": "PostgreSQL username exposed to connected services.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres Live",
      "description": "Default PostgreSQL database name exposed to connected services.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres Live",
      "description": "PostgreSQL password exposed to connected services.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres Live",
      "description": "Database created when PostgreSQL initializes.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres Live",
      "description": "Complete private PostgreSQL connection string for application services.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres Live",
      "description": "PostgreSQL administrator username created at initialization.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres Live",
      "description": "Number of days generated PostgreSQL TLS certificates remain valid.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres Live",
      "description": "Auto-generated PostgreSQL administrator password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres Live",
      "description": "Grace period for existing connections during Railway redeployments.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Magic Reactions",
      "description": "Internal HTTP port used by the Node.js service.",
      "secret": false,
      "strategy": "default",
      "default": "8787"
    },
    {
      "key": "BUCKET",
      "service": "Magic Reactions",
      "description": "Railway Bucket name used to store uploaded reaction images.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REGION",
      "service": "Magic Reactions",
      "description": "Railway Bucket region used by the S3-compatible client.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENDPOINT",
      "service": "Magic Reactions",
      "description": "S3-compatible endpoint supplied by the Railway Bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NODE_ENV",
      "service": "Magic Reactions",
      "description": "Runs the application with production defaults.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "OWNER_CODE",
      "service": "Magic Reactions",
      "description": "Auto-generated private code used during owner OAuth authorization.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_URL",
      "service": "Magic Reactions",
      "description": "PostgreSQL connection string supplied by Postgres Live.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ACCESS_KEY_ID",
      "service": "Magic Reactions",
      "description": "Access key supplied by the Railway Bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GIPHY_API_KEY",
      "service": "Magic Reactions",
      "description": "Your GIPHY developer API key for GIF and sticker search.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "STORAGE_DRIVER",
      "service": "Magic Reactions",
      "description": "Selects the S3-compatible Railway Bucket storage adapter.",
      "secret": false,
      "strategy": "default",
      "default": "s3"
    },
    {
      "key": "DATABASE_DRIVER",
      "service": "Magic Reactions",
      "description": "Selects the PostgreSQL database adapter.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "PUBLIC_BASE_URL",
      "service": "Magic Reactions",
      "description": "Public HTTPS origin generated for the Magic Reactions service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SECRET_ACCESS_KEY",
      "service": "Magic Reactions",
      "description": "Secret access key supplied by the Railway Bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_FORCE_PATH_STYLE",
      "service": "Magic Reactions",
      "description": "Uses virtual-hosted S3 requests for Railway Buckets.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "OAUTH_SIGNING_SECRET",
      "service": "Magic Reactions",
      "description": "Auto-generated secret used to sign OAuth access and refresh tokens.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "magic-reactions-for-chatgpt"
      }
    },
    "cli": "railway deploy --template magic-reactions-for-chatgpt",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "2ba25fd9-688c-4758-8dab-f265f4258d4e",
            "serializedConfig": {
              "buckets": {
                "88f5c501-3664-44c7-8a54-b5a80cddca28": {
                  "name": "Reactions Bucket"
                }
              },
              "services": {
                "beea952b-4959-4fe6-800b-73ced0aa42bc": {
                  "icon": null,
                  "name": "Postgres Live",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Directory where PostgreSQL stores persistent database files.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private Railway hostname used by internal clients.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "PostgreSQL server port.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "PostgreSQL username exposed to connected services.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default PostgreSQL database name exposed to connected services.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "PostgreSQL password exposed to connected services.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created when PostgreSQL initializes.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Complete private PostgreSQL connection string for application services.",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "PostgreSQL administrator username created at initialization.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Number of days generated PostgreSQL TLS certificates remain valid.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated PostgreSQL administrator password.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Grace period for existing connections during Railway redeployments.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "beea952b-4959-4fe6-800b-73ced0aa42bc": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "d22422f0-f75b-4015-9617-3246490d9bf2": {
                  "icon": null,
                  "name": "Magic Reactions",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/ready",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "lauramarmun-prog/magic-reactions-chatgpt-template",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal HTTP port used by the Node.js service.",
                      "defaultValue": "8787"
                    },
                    "BUCKET": {
                      "isOptional": false,
                      "description": "Railway Bucket name used to store uploaded reaction images.",
                      "defaultValue": "${{Reactions Bucket.BUCKET}}"
                    },
                    "REGION": {
                      "isOptional": false,
                      "description": "Railway Bucket region used by the S3-compatible client.",
                      "defaultValue": "${{Reactions Bucket.REGION}}"
                    },
                    "ENDPOINT": {
                      "isOptional": false,
                      "description": "S3-compatible endpoint supplied by the Railway Bucket.",
                      "defaultValue": "${{Reactions Bucket.ENDPOINT}}"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Runs the application with production defaults.",
                      "defaultValue": "production"
                    },
                    "OWNER_CODE": {
                      "isOptional": false,
                      "description": "Auto-generated private code used during owner OAuth authorization.",
                      "defaultValue": "{{OWNER_CODE}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string supplied by Postgres Live.",
                      "defaultValue": "${{Postgres Live.DATABASE_URL}}"
                    },
                    "ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Access key supplied by the Railway Bucket.",
                      "defaultValue": "${{Reactions Bucket.ACCESS_KEY_ID}}"
                    },
                    "GIPHY_API_KEY": {
                      "isOptional": false,
                      "description": "Your GIPHY developer API key for GIF and sticker search.",
                      "defaultValue": "{{GIPHY_API_KEY}}"
                    },
                    "STORAGE_DRIVER": {
                      "isOptional": false,
                      "description": "Selects the S3-compatible Railway Bucket storage adapter.",
                      "defaultValue": "s3"
                    },
                    "DATABASE_DRIVER": {
                      "isOptional": false,
                      "description": "Selects the PostgreSQL database adapter.",
                      "defaultValue": "postgres"
                    },
                    "PUBLIC_BASE_URL": {
                      "isOptional": false,
                      "description": "Public HTTPS origin generated for the Magic Reactions service.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Secret access key supplied by the Railway Bucket.",
                      "defaultValue": "${{Reactions Bucket.SECRET_ACCESS_KEY}}"
                    },
                    "S3_FORCE_PATH_STYLE": {
                      "isOptional": false,
                      "description": "Uses virtual-hosted S3 requests for Railway Buckets.",
                      "defaultValue": "false"
                    },
                    "OAUTH_SIGNING_SECRET": {
                      "isOptional": false,
                      "description": "Auto-generated secret used to sign OAuth access and refresh tokens.",
                      "defaultValue": "{{OAUTH_SIGNING_SECRET}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8787": {
                        "port": 8787
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Magic Reactions",
      "method": "GET",
      "path": "/ready",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-11T04:14:34.944Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-10T17:52:13.421Z",
  "success_rate_30d": 0.5,
  "validation": {
    "last_run_id": "run_69e99d971d924e358273",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ],
    "typical_ready_seconds": 71,
    "typical_build_seconds": 40,
    "typical_start_seconds": 10,
    "slowest_service": "Magic Reactions"
  }
}
