{
  "manifest_version": "1.0.0",
  "template": {
    "id": "16fe5e03-db67-40f4-b822-835a7478871c",
    "slug": "xbridge-test",
    "name": "xbridge-test",
    "description": "Full-stack dashboard with Keycloak authentication and PostgreSQL",
    "url": "https://railway.com/deploy/xbridge-test"
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:16-alpine"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "First Sys Dashboard CI/CD",
      "source": {
        "repo": "https://github.com/ashraftryfie/first-sys-ci-test-back"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Keycloak",
      "source": {
        "image": "quay.io/keycloak/keycloak:26.7.0"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Name of the PostgreSQL database used by Keycloak.",
      "secret": false,
      "strategy": "default",
      "default": "keycloak"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Username Keycloak uses to connect to PostgreSQL.",
      "secret": false,
      "strategy": "default",
      "default": "keycloak"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password for the PostgreSQL user. Use a strong secret.",
      "secret": true,
      "strategy": "default",
      "default": "keycloak_db_pass_2026"
    },
    {
      "key": "NODE_ENV",
      "service": "First Sys Dashboard CI/CD",
      "description": "Runtime environment for the backend, such as production.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "API_PREFIX",
      "service": "First Sys Dashboard CI/CD",
      "description": "URL path prefix used by the backend API, such as api.",
      "secret": false,
      "strategy": "default",
      "default": "api"
    },
    {
      "key": "CORS_ORIGIN",
      "service": "First Sys Dashboard CI/CD",
      "description": "Allowed frontend origin for browser cross-origin API requests.",
      "secret": false,
      "strategy": "default",
      "default": "https://ashraf-ultra.infinityfree.me"
    },
    {
      "key": "KEYCLOAK_URL",
      "service": "First Sys Dashboard CI/CD",
      "description": "Public URL where the Keycloak server is accessible.",
      "secret": true,
      "strategy": "default",
      "default": "https://ashraf-keycloak-prod.up.railway.app"
    },
    {
      "key": "KEYCLOAK_REALM",
      "service": "First Sys Dashboard CI/CD",
      "description": "Keycloak realm containing the application configuration.",
      "secret": true,
      "strategy": "default",
      "default": "xbridge"
    },
    {
      "key": "KEYCLOAK_CLIENT_ID",
      "service": "First Sys Dashboard CI/CD",
      "description": "Keycloak client ID used by the backend or frontend.",
      "secret": true,
      "strategy": "default",
      "default": "xbridge-daap-console"
    },
    {
      "key": "KC_DB",
      "service": "Keycloak",
      "description": "Keycloak database vendor, such as postgres.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "KC_DB_URL",
      "service": "Keycloak",
      "description": "JDBC connection URL for Keycloak's database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "KC_DB_PASSWORD",
      "service": "Keycloak",
      "description": "Password for the Keycloak database user.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "KC_DB_USERNAME",
      "service": "Keycloak",
      "description": "Username for the Keycloak database connection.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "KC_HTTP_ENABLED",
      "service": "Keycloak",
      "description": "Enables HTTP access to Keycloak when set to true.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "KC_HOSTNAME_STRICT",
      "service": "Keycloak",
      "description": "Controls whether Keycloak requires requests to match its configured hostname.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "KC_BOOTSTRAP_ADMIN_PASSWORD",
      "service": "Keycloak",
      "description": "Initial Keycloak administrator password. Use a strong secret.",
      "secret": true,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "KC_BOOTSTRAP_ADMIN_USERNAME",
      "service": "Keycloak",
      "description": "Initial Keycloak administrator username.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "xbridge-test"
      }
    },
    "cli": "railway deploy --template xbridge-test",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "16fe5e03-db67-40f4-b822-835a7478871c",
            "serializedConfig": {
              "services": {
                "073280cf-05be-41dc-8df0-e21650de7286": {
                  "icon": "https://www.svgrepo.com/download/306591/postgresql.svg",
                  "name": "Postgres",
                  "source": {
                    "image": "postgres:16-alpine"
                  },
                  "variables": {
                    "POSTGRES_DB": {
                      "description": "Name of the PostgreSQL database used by Keycloak.",
                      "defaultValue": "keycloak"
                    },
                    "POSTGRES_USER": {
                      "description": "Username Keycloak uses to connect to PostgreSQL.",
                      "defaultValue": "keycloak"
                    },
                    "POSTGRES_PASSWORD": {
                      "description": "Password for the PostgreSQL user. Use a strong secret.",
                      "defaultValue": "keycloak_db_pass_2026"
                    }
                  }
                },
                "86099912-1149-4d19-b2ef-ca76dc9414ed": {
                  "icon": "https://www.svgrepo.com/download/324142/dashboard-graph-analytics-report.svg",
                  "name": "First Sys Dashboard CI/CD",
                  "source": {
                    "repo": "ashraftryfie/first-sys-ci-test-back"
                  },
                  "variables": {
                    "NODE_ENV": {
                      "description": "Runtime environment for the backend, such as production.",
                      "defaultValue": "production"
                    },
                    "API_PREFIX": {
                      "description": "URL path prefix used by the backend API, such as api.",
                      "defaultValue": "api"
                    },
                    "CORS_ORIGIN": {
                      "description": "Allowed frontend origin for browser cross-origin API requests.",
                      "defaultValue": "https://ashraf-ultra.infinityfree.me"
                    },
                    "KEYCLOAK_URL": {
                      "description": "Public URL where the Keycloak server is accessible.",
                      "defaultValue": "https://ashraf-keycloak-prod.up.railway.app"
                    },
                    "KEYCLOAK_REALM": {
                      "description": "Keycloak realm containing the application configuration.",
                      "defaultValue": "xbridge"
                    },
                    "KEYCLOAK_CLIENT_ID": {
                      "description": "Keycloak client ID used by the backend or frontend.",
                      "defaultValue": "xbridge-daap-console"
                    }
                  }
                },
                "ef8f1804-5666-43c3-8c89-d356a5192f65": {
                  "icon": "https://www.svgrepo.com/download/331455/keycloak.svg",
                  "name": "Keycloak",
                  "deploy": {
                    "startCommand": "start --optimized --http-port=8080 --proxy-headers=xforwarded (or start-dev --http-port=8080"
                  },
                  "source": {
                    "image": "quay.io/keycloak/keycloak:26.7.0"
                  },
                  "variables": {
                    "KC_DB": {
                      "isOptional": false,
                      "description": "Keycloak database vendor, such as postgres.",
                      "defaultValue": "postgres"
                    },
                    "KC_DB_URL": {
                      "isOptional": false,
                      "description": "JDBC connection URL for Keycloak's database.",
                      "defaultValue": "jdbc:postgresql://${{Postgres.PGHOST}}:${{Postgres.PGPORT}}/${{Postgres.PGDATABASE}}"
                    },
                    "KC_DB_PASSWORD": {
                      "description": "Password for the Keycloak database user.",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "KC_DB_USERNAME": {
                      "description": "Username for the Keycloak database connection.",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "KC_HTTP_ENABLED": {
                      "description": "Enables HTTP access to Keycloak when set to true.",
                      "defaultValue": "true"
                    },
                    "KC_HOSTNAME_STRICT": {
                      "description": "Controls whether Keycloak requires requests to match its configured hostname.",
                      "defaultValue": "false"
                    },
                    "KC_BOOTSTRAP_ADMIN_PASSWORD": {
                      "description": "Initial Keycloak administrator password. Use a strong secret.",
                      "defaultValue": "admin"
                    },
                    "KC_BOOTSTRAP_ADMIN_USERNAME": {
                      "description": "Initial Keycloak administrator username.",
                      "defaultValue": "admin"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": false
  },
  "generated_at": "2026-09-20T22:14:37.505Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-19T14:19:38.022Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_8bddeb4529e0478bb9de",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "BUILDING,SUCCESS,FAILED"
      }
    ]
  }
}
