{
  "manifest_version": "1.0.0",
  "template": {
    "id": "f34275cb-7a34-41b3-a505-0eaa95c4f555",
    "slug": "mosaic",
    "name": "mos.ai.c",
    "description": "Your second brain on Railway",
    "url": "https://railway.com/deploy/mosaic",
    "upstream": {
      "repo_url": "https://github.com/mumunha/mos.ai.c-app"
    }
  },
  "services": [
    {
      "name": "pgvector",
      "source": {
        "image": "pgvector/pgvector:pg17"
      },
      "needs_volume": false,
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "mos.ai.c-app",
      "source": {
        "repo": "https://github.com/mumunha/mos.ai.c-app"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "pgvector",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "pgvector",
      "description": "Public host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPORT",
      "service": "pgvector",
      "description": "Public port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGUSER",
      "service": "pgvector",
      "description": "Postgres user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "pgvector",
      "description": "Default database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "pgvector",
      "description": "Postgres password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "pgvector",
      "description": "Name of the default database",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "pgvector",
      "description": "Public URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "pgvector",
      "description": "Name of the initial user",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "PGHOST_PRIVATE",
      "service": "pgvector",
      "description": "Private port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGPORT_PRIVATE",
      "service": "pgvector",
      "description": "Private port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "pgvector",
      "description": "The Postgres password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_URL_PRIVATE",
      "service": "pgvector",
      "description": "Private URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NODE_ENV",
      "service": "mos.ai.c-app",
      "description": "Provide a value for NODE_ENV.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "JWT_SECRET",
      "service": "mos.ai.c-app",
      "description": "Provide a value for JWT_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "admin_email",
      "service": "mos.ai.c-app",
      "description": "Provide a value for admin_email.",
      "secret": false,
      "strategy": "default",
      "default": "email@provide.com"
    },
    {
      "key": "DATABASE_URL",
      "service": "mos.ai.c-app",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BCRYPT_ROUNDS",
      "service": "mos.ai.c-app",
      "description": "Provide a value for BCRYPT_ROUNDS.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "OPENAI_API_KEY",
      "service": "mos.ai.c-app",
      "description": "Provide a value for OPENAI_API_KEY.",
      "secret": true,
      "strategy": "default",
      "default": "your-key"
    },
    {
      "key": "TELEGRAM_BOT_TOKEN",
      "service": "mos.ai.c-app",
      "description": "Provide a value for TELEGRAM_BOT_TOKEN.",
      "secret": true,
      "strategy": "default",
      "default": "bot-token"
    },
    {
      "key": "NEXT_PUBLIC_APP_URL",
      "service": "mos.ai.c-app",
      "description": "Provide a value for NEXT_PUBLIC_APP_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mosaic"
      }
    },
    "cli": "railway deploy --template mosaic",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "f34275cb-7a34-41b3-a505-0eaa95c4f555",
            "serializedConfig": {
              "services": {
                "7bb206e3-ad54-4f8e-9552-a0eb57222196": {
                  "name": "pgvector",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"unset PGPORT; docker-entrypoint.sh postgres --port=5432\""
                  },
                  "source": {
                    "image": "pgvector/pgvector:pg17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Public host",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Public port",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Postgres user",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Name of the default database",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Public URL",
                      "defaultValue": "postgres://${{PGUSER}}:${{PGPASSWORD}}@${{PGHOST}}:${{PGPORT}}/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Name of the initial user",
                      "defaultValue": "postgres"
                    },
                    "PGHOST_PRIVATE": {
                      "isOptional": false,
                      "description": "Private port",
                      "defaultValue": "5432"
                    },
                    "PGPORT_PRIVATE": {
                      "isOptional": false,
                      "description": "Private port",
                      "defaultValue": "5432"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "The Postgres password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_URL_PRIVATE": {
                      "isOptional": false,
                      "description": "Private URL",
                      "defaultValue": "postgres://${{PGUSER}}:${{PGPASSWORD}}@${{PGHOST_PRIVATE}}:${{PGPORT_PRIVATE}}/${{PGDATABASE}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    }
                  }
                },
                "8acd644a-0e8a-4373-9354-bfc5fdddb7bd": {
                  "name": "mos.ai.c-app",
                  "source": {
                    "repo": "mumunha/mos.ai.c-app",
                    "branch": null,
                    "rootDirectory": null
                  },
                  "variables": {
                    "NODE_ENV": {
                      "defaultValue": "production"
                    },
                    "JWT_SECRET": {
                      "description": "",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "admin_email": {
                      "defaultValue": "email@provide.com"
                    },
                    "DATABASE_URL": {
                      "description": "",
                      "defaultValue": "${{pgvector.DATABASE_URL}}"
                    },
                    "BCRYPT_ROUNDS": {
                      "defaultValue": "10"
                    },
                    "OPENAI_API_KEY": {
                      "defaultValue": "your-key"
                    },
                    "TELEGRAM_BOT_TOKEN": {
                      "defaultValue": "bot-token"
                    },
                    "NEXT_PUBLIC_APP_URL": {
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": false
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-18T21:35:02.126Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_f754c60b0207424d9d90",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "FAILED,SUCCESS"
      }
    ]
  }
}
