{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a5e6401c-473b-497a-8bc7-5a48bfe48a71",
    "slug": "calendarforge-cloud",
    "name": "CalendarForge Cloud",
    "description": "Self-hosted calendar API, date planning, PostgreSQL & Railway deployment",
    "url": "https://railway.com/deploy/calendarforge-cloud",
    "upstream": {
      "repo_url": "https://github.com/makeacalendar/make-a-calendar-calendarforge"
    }
  },
  "services": [
    {
      "name": "CalendarForge Web",
      "source": {
        "repo": "https://github.com/makeacalendar/make-a-calendar-calendarforge"
      },
      "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": "DATABASE_URL",
      "service": "CalendarForge Web",
      "description": "Automatically linked to the private PostgreSQL service created by this template. Leave unchanged unless you reconfigure the database connection.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CALENDARFORGE_API_TOKEN",
      "service": "CalendarForge Web",
      "description": "Enter a long, random secret unique to this deployment. Store it securely and do not expose it in browser code. Required only for the PostgreSQL project API.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "PostgreSQL data-file directory inside the persistent volume. Use the data subdirectory recommended for this container image.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway-provided private DNS hostname for the PostgreSQL service; leave this generated reference unchanged.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "PostgreSQL server port. Use 5432 unless you have explicitly changed the database image configuration.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Database role used by the application. Keep this equal to POSTGRES_USER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Database name used by the application. Keep this equal to POSTGRES_DB.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Database password reference. Keep it linked to the generated POSTGRES_PASSWORD secret and do not expose it.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Initial database name created by the PostgreSQL image, for example calendarforge.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private PostgreSQL connection URL assembled from the generated host, port, database user, database name, and password.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Initial database login role created by the PostgreSQL image, for example calendarforge.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Number of days for certificates generated by this PostgreSQL image; choose a value consistent with your certificate rotation policy.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated database password. Keep the secret reference; do not share or expose this value.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Grace period in seconds used when Railway drains a deployment. Keep a value suitable for your application's shutdown time.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "calendarforge-cloud"
      }
    },
    "cli": "railway deploy --template calendarforge-cloud",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a5e6401c-473b-497a-8bc7-5a48bfe48a71",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "558fcd38-8822-412f-827c-901cc2c4280c": {
                  "icon": null,
                  "name": "CalendarForge Web",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/v1/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/makeacalendar/make-a-calendar-calendarforge",
                    "rootDirectory": null
                  },
                  "variables": {
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Automatically linked to the private PostgreSQL service created by this template. Leave unchanged unless you reconfigure the database connection.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "CALENDARFORGE_API_TOKEN": {
                      "isOptional": false,
                      "description": "Enter a long, random secret unique to this deployment. Store it securely and do not expose it in browser code. Required only for the PostgreSQL project API.",
                      "defaultValue": "{{CALENDARFORGE_API_TOKEN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "b22867b5-b997-4b50-997b-1050531831d6": {
                  "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": true,
                      "description": "PostgreSQL data-file directory inside the persistent volume. Use the data subdirectory recommended for this container image.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway-provided private DNS hostname for the PostgreSQL service; leave this generated reference unchanged.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": true,
                      "description": "PostgreSQL server port. Use 5432 unless you have explicitly changed the database image configuration.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Database role used by the application. Keep this equal to POSTGRES_USER.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Database name used by the application. Keep this equal to POSTGRES_DB.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Database password reference. Keep it linked to the generated POSTGRES_PASSWORD secret and do not expose it.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": true,
                      "description": "Initial database name created by the PostgreSQL image, for example calendarforge.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private PostgreSQL connection URL assembled from the generated host, port, database user, database name, and password.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": true,
                      "description": "Initial database login role created by the PostgreSQL image, for example calendarforge.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "Number of days for certificates generated by this PostgreSQL image; choose a value consistent with your certificate rotation policy.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated database password. Keep the secret reference; do not share or expose this value.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Grace period in seconds used when Railway drains a deployment. Keep a value suitable for your application's shutdown time.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "b22867b5-b997-4b50-997b-1050531831d6": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "CalendarForge Web",
      "method": "GET",
      "path": "/api/v1/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-12T22:14:42.224Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-12T19:05:47.141Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_d0bbc26c886d47f9ae34",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 88,
    "typical_build_seconds": 71,
    "typical_start_seconds": 0,
    "slowest_service": "soothing-analysis"
  }
}
