{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c36475ea-ac38-4bd7-99bf-a65e6e24cbde",
    "slug": "code-reviewer-mira-mcp",
    "name": "Code Reviewer (Mira + MCP)",
    "description": "Always-on AI GitHub PR reviewer with dashboard, MCP, and your own LLM keys.",
    "url": "https://railway.com/deploy/code-reviewer-mira-mcp",
    "upstream": {
      "repo_url": "https://github.com/D-Lite/mira-mcp"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "mira",
      "source": {
        "repo": "https://github.com/D-Lite/mira-mcp"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "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": "MIRA_LLM",
      "service": "mira",
      "description": "LLM vendor: anthropic, openai, google, deepseek, or openrouter. Leave empty to default to OpenRouter. Fill only the matching API key below.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "MIRA_MODEL",
      "service": "mira",
      "description": "Optional model id, e.g. anthropic/claude-sonnet-4-6. Leave empty for the vendor default.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "MCP_API_KEY",
      "service": "mira",
      "description": "Bearer token IDEs send to POST /mcp. Generated per deploy; copy it into your MCP client.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_URL",
      "service": "mira",
      "description": "Private Postgres URL from the Postgres service. Do not replace with a public URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "mira",
      "description": "Dashboard password for user admin. Generated per deploy; copy it from Variables after deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MIRA_WEBHOOK_SECRET",
      "service": "mira",
      "description": "GitHub App webhook secret. Generated per deploy; paste the same value into the GitHub App.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Postgres data directory on the mounted volume. Leave as-is so data survives redeploys.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname other services use to reach Postgres. Do not change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Postgres listen port on the private network. Do not change unless you also update DATABASE_URL.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Connection username. Mirrors POSTGRES_USER so clients and the server stay in sync.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Connection database name. Mirrors POSTGRES_DB so clients and the server stay in sync.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Connection password. Mirrors POSTGRES_PASSWORD. Used by libpq clients and DATABASE_URL.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot. Mira reads this via DATABASE_URL. Change only before the first deploy.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection URL for services in this project. Mira should reference ${{Postgres.DATABASE_URL}}.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot. Change only before the first deploy.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity of the self-signed SSL cert in days. Restart the service to renew. Optional; newer images may ignore this.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password, generated per deploy. Do not hardcode. Mira gets it through DATABASE_URL.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Seconds to let in-flight queries finish before a redeploy kills the container.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "code-reviewer-mira-mcp"
      }
    },
    "cli": "railway deploy --template code-reviewer-mira-mcp",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c36475ea-ac38-4bd7-99bf-a65e6e24cbde",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "1b2c80de-a279-484a-9c33-1e35069a1e34": {
                  "icon": "https://devicons.railway.com/i/coder-light.png",
                  "name": "mira",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/D-Lite/mira-mcp",
                    "rootDirectory": null
                  },
                  "variables": {
                    "MIRA_LLM": {
                      "description": "LLM vendor: anthropic, openai, google, deepseek, or openrouter. Leave empty to default to OpenRouter. Fill only the matching API key below.",
                      "defaultValue": "{{MIRA_LLM}}"
                    },
                    "MIRA_MODEL": {
                      "isOptional": false,
                      "description": "Optional model id, e.g. anthropic/claude-sonnet-4-6. Leave empty for the vendor default.",
                      "defaultValue": "{{MIRA_MODEL}}"
                    },
                    "MCP_API_KEY": {
                      "isOptional": false,
                      "description": "Bearer token IDEs send to POST /mcp. Generated per deploy; copy it into your MCP client.",
                      "defaultValue": "{{MCP_API_KEY}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private Postgres URL from the Postgres service. Do not replace with a public URL.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "MIRA_BOT_NAME": {
                      "isOptional": true,
                      "description": "GitHub App slug for @mentions, e.g. code-reviewer-railway. Must match the App name.",
                      "defaultValue": ""
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": true,
                      "description": "Dashboard password for user admin. Generated per deploy; copy it from Variables after deploy.",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "GEMINI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. Google Gemini key if MIRA_LLM=google. Leave empty if you use another vendor.",
                      "defaultValue": ""
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. OpenAI key (sk-…) if MIRA_LLM=openai. Leave empty if you use another vendor.",
                      "defaultValue": ""
                    },
                    "DEEPSEEK_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. DeepSeek key if MIRA_LLM=deepseek. Leave empty if you use another vendor.",
                      "defaultValue": ""
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. Claude key (sk-ant-…) if MIRA_LLM=anthropic. Leave empty if you use OpenAI, Gemini, DeepSeek, or OpenRouter instead.",
                      "defaultValue": ""
                    },
                    "MIRA_GITHUB_APP_ID": {
                      "isOptional": true,
                      "description": "Numeric GitHub App ID from github.com/settings/apps. Required for GitHub PR reviews.",
                      "defaultValue": ""
                    },
                    "OPENROUTER_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. OpenRouter key (sk-or-…) if MIRA_LLM=openrouter or MIRA_LLM is unset. Leave empty if you use Anthropic, OpenAI, Gemini, or DeepSeek.",
                      "defaultValue": ""
                    },
                    "MIRA_WEBHOOK_SECRET": {
                      "isOptional": true,
                      "description": "GitHub App webhook secret. Generated per deploy; paste the same value into the GitHub App.",
                      "defaultValue": "{{MIRA_WEBHOOK_SECRET}}"
                    },
                    "MIRA_GITHUB_PRIVATE_KEY": {
                      "isOptional": true,
                      "description": "Full GitHub App private key PEM, including BEGIN/END lines. Multiline; not a file path.",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "ec14deb0-bd9a-46b7-a401-aea6e900b4b6": {
                  "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": "Postgres data directory on the mounted volume. Leave as-is so data survives redeploys.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname other services use to reach Postgres. Do not change.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres listen port on the private network. Do not change unless you also update DATABASE_URL.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Connection username. Mirrors POSTGRES_USER so clients and the server stay in sync.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Connection database name. Mirrors POSTGRES_DB so clients and the server stay in sync.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Connection password. Mirrors POSTGRES_PASSWORD. Used by libpq clients and DATABASE_URL.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot. Mira reads this via DATABASE_URL. Change only before the first deploy.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection URL for services in this project. Mira should reference ${{Postgres.DATABASE_URL}}.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot. Change only before the first deploy.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity of the self-signed SSL cert in days. Restart the service to renew. Optional; newer images may ignore this.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, generated per deploy. Do not hardcode. Mira gets it through DATABASE_URL.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Seconds to let in-flight queries finish before a redeploy kills the container.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "ec14deb0-bd9a-46b7-a401-aea6e900b4b6": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "mira",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T10:14:47.278Z",
  "generator_version": "0.1.0"
}
