{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a3174f0c-3094-463b-9604-62d414645681",
    "slug": "fable",
    "name": "Fable",
    "description": "Developer-led localisation platform with AI translation and QA.",
    "url": "https://railway.com/deploy/fable",
    "upstream": {
      "repo_url": "https://github.com/EggsLeggs/fable"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Web",
      "source": {
        "repo": "https://github.com/EggsLeggs/fable"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Migrate",
      "source": {
        "repo": "https://github.com/EggsLeggs/fable"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "REDIS_URL",
      "service": "Web",
      "description": "Redis connection URL for BullMQ worker queues (MT, QA, VCS sync, webhooks)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DIRECT_URL",
      "service": "Web",
      "description": "Direct Postgres connection string for migrations and db:push (non-pooled)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Web",
      "description": "Pooled Postgres connection string used by the app at runtime",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GITHUB_APP_SLUG",
      "service": "Web",
      "description": "URL slug of your GitHub App (used in install links)",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "TRUSTED_ORIGINS",
      "service": "Web",
      "description": "Comma-separated allowed origins for Better Auth CORS",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "Web",
      "description": "Secret for signing Better Auth sessions; use a long random string",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "NEXT_PUBLIC_APP_URL",
      "service": "Web",
      "description": "Public base URL of the web app (auth callbacks, Stripe redirects)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "GITHUB_WEBHOOK_SECRET",
      "service": "Web",
      "description": "Webhook secret from your GitHub App settings",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DIRECT_URL",
      "service": "Migrate",
      "description": "Postgres connection string for migrations",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Migrate",
      "description": "Postgres connection string for migrations",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Internal hostname for Redis on the Railway private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Internal Redis port (default 6379)",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Redis username (default user)",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Internal connection URL; this is what Fable uses for BullMQ queues",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Alias of REDIS_PASSWORD used by Railway templates",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Auto-generated 32-character Redis password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public TCP proxy URL for external access; Fable does not use this in production",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Filesystem path where Postgres stores its data inside the container",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Internal hostname for Postgres on the Railway private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Internal Postgres port (default 5432)",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Postgres username (references POSTGRES_USER below)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default database name (references POSTGRES_DB below)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Postgres password (references POSTGRES_PASSWORD below)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Internal connection URL; Fable uses this for the app and migrations on Railway",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created when the Postgres service is provisioned",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity period in days for the self-signed SSL cert generated by the Railway Postgres image",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated 32-character Postgres password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public TCP proxy URL for external access (local dev tools, Drizzle Studio); Fable does not use this in production",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Seconds Railway waits for in-flight requests to finish before stopping the old deployment during a rollout",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "fable"
      }
    },
    "cli": "railway deploy --template fable",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a3174f0c-3094-463b-9604-62d414645681",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "64f6a1c7-4160-46bb-9dc5-39ae533ad1e7": {
                  "icon": null,
                  "name": "Web",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/EggsLeggs/fable",
                    "rootDirectory": null
                  },
                  "variables": {
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection URL for BullMQ worker queues (MT, QA, VCS sync, webhooks)",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DIRECT_URL": {
                      "isOptional": false,
                      "description": "Direct Postgres connection string for migrations and db:push (non-pooled)",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Pooled Postgres connection string used by the app at runtime",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "GITHUB_APP_ID": {
                      "isOptional": true,
                      "description": "Numeric ID of your GitHub App",
                      "defaultValue": ""
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "OpenAI API key for AI-powered machine translation",
                      "defaultValue": ""
                    },
                    "GITHUB_APP_SLUG": {
                      "description": "URL slug of your GitHub App (used in install links)",
                      "defaultValue": "{{GITHUB_APP_SLUG}}"
                    },
                    "TRUSTED_ORIGINS": {
                      "isOptional": false,
                      "description": "Comma-separated allowed origins for Better Auth CORS",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "STRIPE_SECRET_KEY": {
                      "isOptional": true,
                      "description": "Stripe secret API key from the Stripe dashboard",
                      "defaultValue": ""
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Secret for signing Better Auth sessions; use a long random string",
                      "defaultValue": "{{BETTER_AUTH_SECRET}}"
                    },
                    "GITHUB_PRIVATE_KEY": {
                      "isOptional": true,
                      "description": "PEM private key for the GitHub App (escape newlines as \\n)",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_APP_URL": {
                      "isOptional": false,
                      "description": "Public base URL of the web app (auth callbacks, Stripe redirects)",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "GITHUB_WEBHOOK_SECRET": {
                      "isOptional": true,
                      "description": "Webhook secret from your GitHub App settings",
                      "defaultValue": "{{GITHUB_WEBHOOK_SECRET}}"
                    },
                    "STRIPE_WEBHOOK_SECRET": {
                      "isOptional": true,
                      "description": "Signing secret for the /api/stripe/webhook endpoint",
                      "defaultValue": ""
                    },
                    "STRIPE_MT_METERED_PRICE_ID": {
                      "isOptional": true,
                      "description": "Price ID for metered MT character usage billing",
                      "defaultValue": ""
                    },
                    "STRIPE_PRO_ANNUAL_PRICE_ID": {
                      "isOptional": true,
                      "description": "Price ID for Fable Pro annual subscription ($313.20)",
                      "defaultValue": ""
                    },
                    "STRIPE_PRO_MONTHLY_PRICE_ID": {
                      "isOptional": true,
                      "description": "Price ID for Fable Pro monthly subscription ($29)",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY": {
                      "isOptional": true,
                      "description": "Stripe publishable key (client-side; optional)",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "b7d165a1-064e-46e6-8c0c-f05262c4e2cb": {
                  "icon": null,
                  "name": "Migrate",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "NEVER",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/EggsLeggs/fable",
                    "rootDirectory": null
                  },
                  "variables": {
                    "DIRECT_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string for migrations",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string for migrations",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    }
                  }
                },
                "d98b13bc-3345-4e12-aa7b-97677790ac17": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Internal hostname for Redis on the Railway private network",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Internal Redis port (default 6379)",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis username (default user)",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Internal connection URL; this is what Fable uses for BullMQ queues",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Alias of REDIS_PASSWORD used by Railway templates",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated 32-character Redis password",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public TCP proxy URL for external access; Fable does not use this in production",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "d98b13bc-3345-4e12-aa7b-97677790ac17": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "ebca07c2-11ef-4b2a-b22c-32bd238e2499": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Filesystem path where Postgres stores its data inside the container",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Internal hostname for Postgres on the Railway private network",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Internal Postgres port (default 5432)",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Postgres username (references POSTGRES_USER below)",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database name (references POSTGRES_DB below)",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password (references POSTGRES_PASSWORD below)",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Internal connection URL; Fable uses this for the app and migrations on Railway",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created when the Postgres service is provisioned",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity period in days for the self-signed SSL cert generated by the Railway Postgres image",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated 32-character Postgres password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public TCP proxy URL for external access (local dev tools, Drizzle Studio); Fable does not use this in production",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Seconds Railway waits for in-flight requests to finish before stopping the old deployment during a rollout",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "ebca07c2-11ef-4b2a-b22c-32bd238e2499": {
                      "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": {
    "healthcheck": {
      "service": "Web",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T22:14:37.505Z",
  "generator_version": "0.1.0"
}
