{
  "manifest_version": "1.0.0",
  "template": {
    "id": "3beaeef3-e797-4243-925c-4289ecc41cc2",
    "slug": "powersync-starter-postgres",
    "name": "PowerSync Starter (Postgres)",
    "description": "PowerSync Open Edition Starter with Postgres. Build synced apps.",
    "url": "https://railway.com/deploy/powersync-starter-postgres",
    "upstream": {
      "image": "journeyapps/powersync-service"
    }
  },
  "services": [
    {
      "name": "postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "service",
      "source": {
        "image": "journeyapps/powersync-service"
      },
      "needs_volume": true,
      "volume_mount_path": "/powersync",
      "http": true
    },
    {
      "name": "bucket",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "backend",
      "source": {
        "repo": "https://github.com/powersync-ja/powersync-nodejs-backend-todolist-demo"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "sync-diagnostics-client",
      "source": {
        "image": "journeyapps/powersync-diagnostics-app"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "scripts",
      "source": {
        "image": "ghcr.io/railwayapp/function-bun:1.3.0"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "postgres",
      "description": "Railway TCP Proxy Domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "postgres",
      "description": "Required password for database",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "postgres",
      "description": "URL to connect to Postgres database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Required password for database",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "postgres",
      "description": "URL to connect to Postgres database from the public internet",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "service",
      "description": "Healthcheck Endpoints",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "PS_AUTH_AUD",
      "service": "service",
      "description": "Provide a value for PS_AUTH_AUD.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PS_AUTH_JWKS",
      "service": "service",
      "description": "Provide a value for PS_AUTH_JWKS.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POWERSYNC_CONFIG_B64",
      "service": "service",
      "description": "See https://docs.powersync.com/integration-guides/railway-+-powersync",
      "secret": false,
      "strategy": "default",
      "default": "cmVwbGljYXRpb246CiAgY29ubmVjdGlvbnM6CiAgICAtIHR5cGU6IHBvc3RncmVzcWwKICAgICAgdXJpOiAhZW52IFBTX1BPU1RHUkVTX1NPVVJDRV9VUkwKICAgICAgc3NsbW9kZTogZGlzYWJsZQoKc3RvcmFnZToKICB0eXBlOiBwb3N0Z3Jlc3FsCiAgdXJpOiAhZW52IFBTX1BPU1RHUkVTX0JVQ0tFVF9VUkwKICBzc2xtb2RlOiBkaXNhYmxlCgpwb3J0OiA4MAoKc3luY19jb25maWc6CiAgY29udGVudDogfAogICAgY29uZmlnOgogICAgICBlZGl0aW9uOiAzCiAgICBzdHJlYW1zOgogICAgICBnbG9iYWw6CiAgICAgICAgYXV0b19zdWJzY3JpYmU6IHRydWUKICAgICAgICBxdWVyaWVzOgogICAgICAgICAgLSBTRUxFQ1QgKiBGUk9NIGxpc3RzCiAgICAgICAgICAtIFNFTEVDVCAqIEZST00gdG9kb3MKCmNsaWVudF9hdXRoOgogIGp3a3NfdXJpOiAhZW52IFBTX0FVVEhfSldLUwogIGF1ZGllbmNlOgogICAgLSAhZW52IFBTX0FVVEhfQVVE"
    },
    {
      "key": "PS_POSTGRES_BUCKET_URL",
      "service": "service",
      "description": "Provide a value for PS_POSTGRES_BUCKET_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PS_POSTGRES_SOURCE_URL",
      "service": "service",
      "description": "Provide a value for PS_POSTGRES_SOURCE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "bucket",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "bucket",
      "description": "Railway TCP Proxy Domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "bucket",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "bucket",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "bucket",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "bucket",
      "description": "Required password for database",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "bucket",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "bucket",
      "description": "URL to connect to Postgres database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "bucket",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "bucket",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "bucket",
      "description": "Required password for database",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "bucket",
      "description": "Typically not needed for bucket storage",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "backend",
      "description": "Backend port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "JWT_ISSUER",
      "service": "backend",
      "description": "Either 'mongodb', 'mysql' or 'postgres'. This defaults to Postgres",
      "secret": false,
      "strategy": "default",
      "default": "powersync-dev"
    },
    {
      "key": "DATABASE_URI",
      "service": "backend",
      "description": "Source database URI",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_TYPE",
      "service": "backend",
      "description": "Source database name",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POWERSYNC_URL",
      "service": "backend",
      "description": "PowerSync service public URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BACKEND_PUBLIC_DOMAIN",
      "service": "backend",
      "description": "Provide a value for BACKEND_PUBLIC_DOMAIN.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PORT",
      "service": "sync-diagnostics-client",
      "description": "Healthcheck endpoints",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "PGHOST",
      "service": "scripts",
      "description": "Source database host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPORT",
      "service": "scripts",
      "description": "Source database port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGUSER",
      "service": "scripts",
      "description": "Source database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "scripts",
      "description": "Source database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "scripts",
      "description": "Source database",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "powersync-starter-postgres"
      }
    },
    "cli": "railway deploy --template powersync-starter-postgres",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "3beaeef3-e797-4243-925c-4289ecc41cc2",
            "serializedConfig": {
              "services": {
                "05ac442e-1afa-44df-a704-e230bb81a4c2": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "postgres",
                  "deploy": {
                    "startCommand": "wrapper.sh postgres --port=5432 -c wal_level=logical",
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway TCP Proxy Domain",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required password for database",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:${{PGPORT}}/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Required password for database",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database from the public internet",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "The time given to gracefully shutdown",
                      "defaultValue": ""
                    }
                  },
                  "volumeMounts": {
                    "05ac442e-1afa-44df-a704-e230bb81a4c2": {
                      "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."
                  }
                },
                "1e2da649-2d1b-4b37-bcc5-deab08815f0d": {
                  "icon": "https://journeyapps.com/assets/images/powersync-railway/powersync-logo-icon.png",
                  "name": "service",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/probes/liveness"
                  },
                  "source": {
                    "image": "journeyapps/powersync-service"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Healthcheck Endpoints",
                      "defaultValue": "80"
                    },
                    "PS_AUTH_AUD": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "https://${{service.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "PS_AUTH_JWKS": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "https://${{backend.BACKEND_PUBLIC_DOMAIN}}/api/auth/keys"
                    },
                    "POWERSYNC_CONFIG_B64": {
                      "isOptional": false,
                      "description": "See https://docs.powersync.com/integration-guides/railway-+-powersync",
                      "defaultValue": "cmVwbGljYXRpb246CiAgY29ubmVjdGlvbnM6CiAgICAtIHR5cGU6IHBvc3RncmVzcWwKICAgICAgdXJpOiAhZW52IFBTX1BPU1RHUkVTX1NPVVJDRV9VUkwKICAgICAgc3NsbW9kZTogZGlzYWJsZQoKc3RvcmFnZToKICB0eXBlOiBwb3N0Z3Jlc3FsCiAgdXJpOiAhZW52IFBTX1BPU1RHUkVTX0JVQ0tFVF9VUkwKICBzc2xtb2RlOiBkaXNhYmxlCgpwb3J0OiA4MAoKc3luY19jb25maWc6CiAgY29udGVudDogfAogICAgY29uZmlnOgogICAgICBlZGl0aW9uOiAzCiAgICBzdHJlYW1zOgogICAgICBnbG9iYWw6CiAgICAgICAgYXV0b19zdWJzY3JpYmU6IHRydWUKICAgICAgICBxdWVyaWVzOgogICAgICAgICAgLSBTRUxFQ1QgKiBGUk9NIGxpc3RzCiAgICAgICAgICAtIFNFTEVDVCAqIEZST00gdG9kb3MKCmNsaWVudF9hdXRoOgogIGp3a3NfdXJpOiAhZW52IFBTX0FVVEhfSldLUwogIGF1ZGllbmNlOgogICAgLSAhZW52IFBTX0FVVEhfQVVE"
                    },
                    "PS_POSTGRES_BUCKET_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{bucket.DATABASE_URL}}"
                    },
                    "PS_POSTGRES_SOURCE_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{postgres.DATABASE_URL}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "1e2da649-2d1b-4b37-bcc5-deab08815f0d": {
                      "mountPath": "/powersync"
                    }
                  }
                },
                "27ee0456-be8e-47a3-ab6c-6270fdd6eef7": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "bucket",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway TCP Proxy Domain",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required password for database",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:${{PGPORT}}/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Required password for database",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": true,
                      "description": "Typically not needed for bucket storage",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "The time given to gracefully shutdown",
                      "defaultValue": ""
                    }
                  },
                  "volumeMounts": {
                    "27ee0456-be8e-47a3-ab6c-6270fdd6eef7": {
                      "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."
                  }
                },
                "311b006c-43ca-4a53-ae9d-9ff747fb7cda": {
                  "icon": "https://devicons.railway.app/node",
                  "name": "backend",
                  "source": {
                    "repo": "powersync-ja/powersync-nodejs-backend-todolist-demo",
                    "branch": null,
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "description": "Backend port",
                      "defaultValue": "8080"
                    },
                    "JWT_ISSUER": {
                      "description": "Either 'mongodb', 'mysql' or 'postgres'. This defaults to Postgres",
                      "defaultValue": "powersync-dev"
                    },
                    "DATABASE_URI": {
                      "description": "Source database URI",
                      "defaultValue": "${{postgres.DATABASE_URL}}"
                    },
                    "DATABASE_TYPE": {
                      "description": "Source database name",
                      "defaultValue": "postgres"
                    },
                    "POWERSYNC_URL": {
                      "description": "PowerSync service public URL",
                      "defaultValue": "https://${{service.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "POWERSYNC_PUBLIC_KEY": {
                      "isOptional": true,
                      "description": "Optional: Public encryption key (verifier)",
                      "defaultValue": ""
                    },
                    "BACKEND_PUBLIC_DOMAIN": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "POWERSYNC_PRIVATE_KEY": {
                      "isOptional": true,
                      "description": "Optional: Private encryption key (signer)",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "77d3b8c1-765f-430a-92f7-bff34daf96bd": {
                  "icon": "https://journeyapps.com/assets/images/powersync-railway/powersync-logo-icon.png",
                  "name": "sync-diagnostics-client",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/"
                  },
                  "source": {
                    "image": "journeyapps/powersync-diagnostics-app"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Healthcheck endpoints",
                      "defaultValue": "80"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "ef7ce39e-863b-4ab5-812e-2ecceb5c9f83": {
                  "icon": "https://devicons.railway.app/script",
                  "name": "scripts",
                  "deploy": {
                    "startCommand": "./run.sh aW1wb3J0IHBnIGZyb20gInBnIjsKY29uc3QgeyBDbGllbnQgfSA9IHBnOwoKY29uc3QgY2xpZW50ID0gbmV3IENsaWVudCh7CiAgaG9zdDogcHJvY2Vzcy5lbnYuUEdIT1NULAogIHBvcnQ6IHBhcnNlSW50KHByb2Nlc3MuZW52LlBHUE9SVCB8fCAiNTQzMiIpLAogIGRhdGFiYXNlOiBwcm9jZXNzLmVudi5QR0RBVEFCQVNFLAogIHVzZXI6IHByb2Nlc3MuZW52LlBHVVNFUiwKICBwYXNzd29yZDogcHJvY2Vzcy5lbnYuUEdQQVNTV09SRCwKfSk7Cgphd2FpdCBjbGllbnQuY29ubmVjdCgpOwoKdHJ5IHsKICAvLyBDcmVhdGUgbGlzdHMgdGFibGUKICBhd2FpdCBjbGllbnQucXVlcnkoCiAgICAiQ1JFQVRFIFRBQkxFIElGIE5PVCBFWElTVFMgcHVibGljLmxpc3RzIChpZCB1dWlkIE5PVCBOVUxMIERFRkFVTFQgZ2VuX3JhbmRvbV91dWlkKCksIGNyZWF0ZWRfYXQgdGltZXN0YW1wIHdpdGggdGltZSB6b25lIE5PVCBOVUxMIERFRkFVTFQgbm93KCksIG5hbWUgdGV4dCBOT1QgTlVMTCwgb3duZXJfaWQgdXVpZCBOT1QgTlVMTCwgQ09OU1RSQUlOVCBsaXN0c19wa2V5IFBSSU1BUlkgS0VZIChpZCkpOyIKICApOwoKICBjb25zb2xlLmxvZygiQ3JlYXRlZCBsaXN0cyB0YWJsZSIpOwoKICAvLyBDcmVhdGUgdG9kb3MgdGFibGUKICBhd2FpdCBjbGllbnQucXVlcnkoCiAgICAiQ1JFQVRFIFRBQkxFIElGIE5PVCBFWElTVFMgcHVibGljLnRvZG9zIChpZCB1dWlkIE5PVCBOVUxMIERFRkFVTFQgZ2VuX3JhbmRvbV91dWlkKCksIGNyZWF0ZWRfYXQgdGltZXN0YW1wIHdpdGggdGltZSB6b25lIE5PVCBOVUxMIERFRkFVTFQgbm93KCksIGNvbXBsZXRlZF9hdCB0aW1lc3RhbXAgd2l0aCB0aW1lIHpvbmUsIGRlc2NyaXB0aW9uIHRleHQgTk9UIE5VTEwsIGNvbXBsZXRlZCBib29sZWFuIE5PVCBOVUxMIERFRkFVTFQgRkFMU0UsIGNyZWF0ZWRfYnkgdXVpZCwgY29tcGxldGVkX2J5IHV1aWQsIGxpc3RfaWQgdXVpZCBOT1QgTlVMTCwgcGhvdG9faWQgdXVpZCwgQ09OU1RSQUlOVCB0b2Rvc19wa2V5IFBSSU1BUlkgS0VZIChpZCkpOyIKICApOwoKICBjb25zb2xlLmxvZygiQ3JlYXRlZCB0b2RvcyB0YWJsZSIpOwoKICAvLyBDcmVhdGUgcHVibGljYXRpb24KICBhd2FpdCBjbGllbnQucXVlcnkoIkNSRUFURSBQVUJMSUNBVElPTiBwb3dlcnN5bmMgRk9SIFRBQkxFIGxpc3RzLCB0b2RvczsiKTsKCiAgY29uc29sZS5sb2coIkNyZWF0ZWQgcHVibGljYXRpb24iKTsKfSBjYXRjaCAoZXJyb3IpIHsKICBjb25zb2xlLmVycm9yKCJEYXRhYmFzZSBlcnJvcjoiLCBlcnJvcik7CiAgdGhyb3cgZXJyb3I7Cn0gZmluYWxseSB7CiAgYXdhaXQgY2xpZW50LmVuZCgpOwp9Cg=="
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp/function-bun:1.3.0"
                  },
                  "variables": {
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Source database host",
                      "defaultValue": "${{postgres.PGHOST}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Source database port",
                      "defaultValue": "${{postgres.PGPORT}}"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Source database user",
                      "defaultValue": "${{postgres.PGUSER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Source database name",
                      "defaultValue": "${{postgres.PGDATABASE}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Source database",
                      "defaultValue": "${{postgres.PGPASSWORD}}"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "service",
      "method": "GET",
      "path": "/probes/liveness",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 6,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-18T19:29:31.220Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_d0623d298c2c4a7fa6c5",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 111,
    "typical_build_seconds": 30,
    "typical_start_seconds": 10,
    "slowest_service": "backend"
  }
}
