{
  "manifest_version": "1.0.0",
  "template": {
    "id": "8166b543-4dd0-4150-a0b0-d556b3c17d5e",
    "slug": "blinko",
    "name": "Blinko",
    "description": "Blinko — AI-powered note-taking with RAG chat over your notes",
    "url": "https://railway.com/deploy/blinko",
    "upstream": {
      "image": "blinkospace/blinko:1.8.8"
    }
  },
  "services": [
    {
      "name": "postgres",
      "source": {
        "image": "postgres:16-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    },
    {
      "name": "blinko",
      "source": {
        "image": "blinkospace/blinko:1.8.8"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Postgres data directory inside the mounted volume. MUST be a subpath of the volume mount path /var/lib/postgresql — this geometry places the volume's lost+found/ at /var/lib/postgresql/lost+found (outside PGDATA), so initdb sees an empty directory and proceeds. DO NOT change this without also changing the volume mount path.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Initial database created on first boot. MUST match the database name in Blinko's DATABASE_URL (path component: /blinko).",
      "secret": false,
      "strategy": "default",
      "default": "blinko"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "Postgres superuser name. Used as the credential prefix in Blinko's DATABASE_URL.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Postgres password. Default literal 'postgres' chosen so marketplace first-time deploys authenticate against Blinko's literal DATABASE_URL out of the box. Rotate this in the dashboard AND update Blinko's DATABASE_URL to match before going to production.",
      "secret": true,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "PORT",
      "service": "blinko",
      "description": "Container port. Defaults to 1111 (blinko's internal listener). When blank, Railway auto-injects.",
      "secret": false,
      "strategy": "default",
      "default": "1111"
    },
    {
      "key": "DATABASE_URL",
      "service": "blinko",
      "description": "PostgreSQL connection string. Defaults to a literal credential matched against the sibling postgres service's POSTGRES_PASSWORD. For production, rotate POSTGRES_PASSWORD in the postgres service AND update this URL to match (path component /blinko is the database name created by POSTGRES_DB).",
      "secret": false,
      "strategy": "default",
      "default": "postgresql://postgres:postgres@postgres.railway.internal:5432/blinko"
    },
    {
      "key": "NEXTAUTH_URL",
      "service": "blinko",
      "description": "Public URL of your Blinko instance. Required for auth callbacks. The https:// prefix is mandatory — RAILWAY_PUBLIC_DOMAIN resolves to the bare domain only.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXTAUTH_SECRET",
      "service": "blinko",
      "description": "Random secret for authentication encryption. Auto-generated on first deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "blinko"
      }
    },
    "cli": "railway deploy --template blinko",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "8166b543-4dd0-4150-a0b0-d556b3c17d5e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "4345b6b1-ab9e-427a-a783-f64e8aa293c8": {
                  "icon": null,
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:16-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Postgres data directory inside the mounted volume. MUST be a subpath of the volume mount path /var/lib/postgresql — this geometry places the volume's lost+found/ at /var/lib/postgresql/lost+found (outside PGDATA), so initdb sees an empty directory and proceeds. DO NOT change this without also changing the volume mount path.",
                      "defaultValue": "/var/lib/postgresql/data"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Initial database created on first boot. MUST match the database name in Blinko's DATABASE_URL (path component: /blinko).",
                      "defaultValue": "blinko"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres superuser name. Used as the credential prefix in Blinko's DATABASE_URL.",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password. Default literal 'postgres' chosen so marketplace first-time deploys authenticate against Blinko's literal DATABASE_URL out of the box. Rotate this in the dashboard AND update Blinko's DATABASE_URL to match before going to production.",
                      "defaultValue": "postgres"
                    }
                  },
                  "volumeMounts": {
                    "4345b6b1-ab9e-427a-a783-f64e8aa293c8": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                },
                "6683e220-0f0d-4931-af86-e83c9ed32ffc": {
                  "icon": null,
                  "name": "blinko",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "blinkospace/blinko:1.8.8"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Container port. Defaults to 1111 (blinko's internal listener). When blank, Railway auto-injects.",
                      "defaultValue": "1111"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string. Defaults to a literal credential matched against the sibling postgres service's POSTGRES_PASSWORD. For production, rotate POSTGRES_PASSWORD in the postgres service AND update this URL to match (path component /blinko is the database name created by POSTGRES_DB).",
                      "defaultValue": "postgresql://postgres:postgres@postgres.railway.internal:5432/blinko"
                    },
                    "NEXTAUTH_URL": {
                      "isOptional": false,
                      "description": "Public URL of your Blinko instance. Required for auth callbacks. The https:// prefix is mandatory — RAILWAY_PUBLIC_DOMAIN resolves to the bare domain only.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXTAUTH_SECRET": {
                      "isOptional": false,
                      "description": "Random secret for authentication encryption. Auto-generated on first deploy.",
                      "defaultValue": "{{NEXTAUTH_SECRET}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-09T02:12:54.980Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_a0024074f3fb4069bfe5",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 48,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "blinko"
  }
}
