{
  "manifest_version": "1.0.0",
  "template": {
    "id": "197a81ed-f60d-4dcc-b575-9e82594f2085",
    "slug": "crikket",
    "name": "crikket",
    "description": "Deploy and Host crikket with Railway",
    "url": "https://railway.com/deploy/crikket",
    "upstream": {
      "repo_url": "https://github.com/saenyakorn/crikket"
    }
  },
  "services": [
    {
      "name": "crikket-web",
      "source": {
        "repo": "https://github.com/saenyakorn/crikket"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "crikket-migrate",
      "source": {
        "repo": "https://github.com/saenyakorn/crikket"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "crikket-postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "crikket-server",
      "source": {
        "repo": "https://github.com/saenyakorn/crikket"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "NEXT_PUBLIC_APP_URL",
      "service": "crikket-web",
      "description": "Primary web app URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_SITE_URL",
      "service": "crikket-web",
      "description": "Public site URL for metadata/canonical links.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_SERVER_URL",
      "service": "crikket-web",
      "description": "Public API/server base URL used by the web app.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NODE_ENV",
      "service": "crikket-migrate",
      "description": "Provide a value for NODE_ENV.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "DATABASE_URL",
      "service": "crikket-migrate",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "crikket-postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "crikket-postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "crikket-postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "crikket-postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "crikket-postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "crikket-postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "crikket-postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "crikket-postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "crikket-postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "crikket-postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "crikket-postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "crikket-postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "crikket-postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "NODE_ENV",
      "service": "crikket-server",
      "description": "Core",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "CORS_ORIGINS",
      "service": "crikket-server",
      "description": "Provide a value for CORS_ORIGINS.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "crikket-server",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "STORAGE_BUCKET",
      "service": "crikket-server",
      "description": "Provide a value for STORAGE_BUCKET.",
      "secret": false,
      "strategy": "default",
      "default": "crikket"
    },
    {
      "key": "STORAGE_REGION",
      "service": "crikket-server",
      "description": "Provide a value for STORAGE_REGION.",
      "secret": false,
      "strategy": "default",
      "default": "auto"
    },
    {
      "key": "BETTER_AUTH_URL",
      "service": "crikket-server",
      "description": "Provide a value for BETTER_AUTH_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ENABLE_PAYMENTS",
      "service": "crikket-server",
      "description": "Storage (MinIO)",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "STORAGE_ENDPOINT",
      "service": "crikket-server",
      "description": "Provide a value for STORAGE_ENDPOINT.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "crikket-server",
      "description": "Provide a value for BETTER_AUTH_SECRET.",
      "secret": true,
      "strategy": "default",
      "default": "{{secret()}}"
    },
    {
      "key": "STORAGE_ACCESS_KEY_ID",
      "service": "crikket-server",
      "description": "Provide a value for STORAGE_ACCESS_KEY_ID.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOWED_SIGNUP_DOMAINS",
      "service": "crikket-server",
      "description": "Provide a value for ALLOWED_SIGNUP_DOMAINS.",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "STORAGE_ADDRESSING_STYLE",
      "service": "crikket-server",
      "description": "Provide a value for STORAGE_ADDRESSING_STYLE.",
      "secret": false,
      "strategy": "default",
      "default": "path"
    },
    {
      "key": "STORAGE_SECRET_ACCESS_KEY",
      "service": "crikket-server",
      "description": "Provide a value for STORAGE_SECRET_ACCESS_KEY.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CAPTURE_SUBMIT_TOKEN_SECRET",
      "service": "crikket-server",
      "description": "Provide a value for CAPTURE_SUBMIT_TOKEN_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "crikket"
      }
    },
    "cli": "railway deploy --template crikket",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "197a81ed-f60d-4dcc-b575-9e82594f2085",
            "serializedConfig": {
              "buckets": {
                "a4eace94-6acf-43ba-9580-809f3733a823": {
                  "name": "crikket-storage"
                }
              },
              "services": {
                "57c3131e-2e67-4d7a-bc1c-8c9f68fc05ba": {
                  "name": "crikket-web",
                  "source": {
                    "repo": "saenyakorn/crikket",
                    "branch": null,
                    "rootDirectory": "/apps/web"
                  },
                  "variables": {
                    "NEXT_PUBLIC_APP_URL": {
                      "isOptional": true,
                      "description": "Primary web app URL.",
                      "defaultValue": "https://${{crikket-web.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_DEMO_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_SITE_URL": {
                      "isOptional": true,
                      "description": "Public site URL for metadata/canonical links.",
                      "defaultValue": "https://${{crikket-web.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_SERVER_URL": {
                      "isOptional": true,
                      "description": "Public API/server base URL used by the web app.",
                      "defaultValue": "https://${{crikket-server.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_CRIKKET_KEY": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_POSTHOG_KEY": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_POSTHOG_HOST": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_GOOGLE_AUTH_ENABLED": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3001": {
                        "port": 3001
                      }
                    }
                  }
                },
                "b1e3e93b-3eb4-4b91-9043-a39cd1e33b0a": {
                  "name": "crikket-migrate",
                  "deploy": {
                    "startCommand": "bun run --filter @crikket/db db:migrate"
                  },
                  "source": {
                    "repo": "saenyakorn/crikket",
                    "branch": null,
                    "rootDirectory": "/apps/server"
                  },
                  "variables": {
                    "NODE_ENV": {
                      "defaultValue": "production"
                    },
                    "DATABASE_URL": {
                      "defaultValue": "${{crikket-postgres.DATABASE_URL}}"
                    }
                  }
                },
                "ee16938d-91e4-44c8-a9d6-33be99fd3cbb": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "crikket-postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "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 variable for Data panel",
                      "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}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "ee16938d-91e4-44c8-a9d6-33be99fd3cbb": {
                      "mountPath": "/var/lib/postgresql/data",
                      "backupSchedules": [
                        "DAILY"
                      ]
                    }
                  },
                  "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."
                  }
                },
                "fe676d33-de24-4ff7-9e39-ee7634037be8": {
                  "name": "crikket-server",
                  "source": {
                    "repo": "saenyakorn/crikket",
                    "branch": null,
                    "rootDirectory": "/apps/server"
                  },
                  "variables": {
                    "NODE_ENV": {
                      "isOptional": true,
                      "description": "Core",
                      "defaultValue": "production"
                    },
                    "CORS_ORIGINS": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "https://${{crikket-web.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{crikket-postgres.DATABASE_URL}}"
                    },
                    "RESEND_API_KEY": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "STORAGE_BUCKET": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "crikket"
                    },
                    "STORAGE_REGION": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "auto"
                    },
                    "BETTER_AUTH_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "https://${{crikket-server.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ENABLE_PAYMENTS": {
                      "isOptional": true,
                      "description": "Storage (MinIO)",
                      "defaultValue": "false"
                    },
                    "GOOGLE_CLIENT_ID": {
                      "isOptional": true,
                      "defaultValue": ""
                    },
                    "STORAGE_ENDPOINT": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "http://${{crikket-storage.RAILWAY_PRIVATE_DOMAIN}}:9000"
                    },
                    "POLAR_SUCCESS_URL": {
                      "isOptional": true,
                      "defaultValue": ""
                    },
                    "RESEND_FROM_EMAIL": {
                      "isOptional": true,
                      "description": "Optional security/rate limiting",
                      "defaultValue": ""
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "{{secret()}}"
                    },
                    "POLAR_ACCESS_TOKEN": {
                      "isOptional": true,
                      "defaultValue": ""
                    },
                    "STORAGE_PUBLIC_URL": {
                      "isOptional": true,
                      "description": "Optional OAuth / Email",
                      "defaultValue": ""
                    },
                    "TURNSTILE_SITE_KEY": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "GOOGLE_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "POLAR_PRO_PRODUCT_ID": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "POLAR_WEBHOOK_SECRET": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "TURNSTILE_SECRET_KEY": {
                      "isOptional": true,
                      "description": "Optional Polar (only if ENABLE_PAYMENTS=true)",
                      "defaultValue": ""
                    },
                    "STORAGE_ACCESS_KEY_ID": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{crikket-storage.MINIO_ROOT_USER}}"
                    },
                    "ALLOWED_SIGNUP_DOMAINS": {
                      "isOptional": true,
                      "defaultValue": "*"
                    },
                    "UPSTASH_REDIS_REST_URL": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "POLAR_STUDIO_PRODUCT_ID": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "STORAGE_ADDRESSING_STYLE": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "path"
                    },
                    "UPSTASH_REDIS_REST_TOKEN": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "STORAGE_SECRET_ACCESS_KEY": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "${{crikket-storage.MINIO_ROOT_PASSWORD}}"
                    },
                    "CAPTURE_SUBMIT_TOKEN_SECRET": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "{{CAPTURE_SUBMIT_TOKEN_SECRET}}"
                    },
                    "POLAR_PRO_YEARLY_PRODUCT_ID": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "POLAR_STUDIO_YEARLY_PRODUCT_ID": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-09T06:58:57.338Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_badef43417144cef9a2c",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ]
  }
}
