{
  "manifest_version": "1.0.0",
  "template": {
    "id": "937d28bb-e132-4910-bc50-b1c5187745e3",
    "slug": "agentic-crm",
    "name": "Comp AI CRM | Open-Source Agentic CRM with a Research Agent",
    "description": "Comp AI's open-source CRM with Gmail sync and an AI research agent",
    "url": "https://railway.com/deploy/agentic-crm",
    "upstream": {
      "image": "ghcr.io/two-workspaces/comp-crm:6e9ed2c"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "CRM",
      "source": {
        "image": "ghcr.io/two-workspaces/comp-crm:6e9ed2c"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Cron",
      "source": {
        "image": "ghcr.io/two-workspaces/comp-crm:6e9ed2c"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Agent",
      "source": {
        "image": "ghcr.io/two-workspaces/comp-crm:6e9ed2c"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "API",
      "source": {
        "image": "ghcr.io/two-workspaces/comp-crm:6e9ed2c"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "CRM",
      "description": "Port of the web app. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "API_URL",
      "service": "CRM",
      "description": "Public origin of the auth routes, which this app proxies to the API. Do not change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "APP_URL",
      "service": "CRM",
      "description": "Public address of the CRM. Change it to https://your-domain after adding a custom domain, here and on the API.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CRM_ROLE",
      "service": "CRM",
      "description": "Runs the web app. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "app"
    },
    {
      "key": "AGENT_URL",
      "service": "CRM",
      "description": "The research agent on the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "CRM",
      "description": "Postgres connection.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOWED_SIGN_IN",
      "service": "CRM",
      "description": "Set on the API service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GOOGLE_CLIENT_ID",
      "service": "CRM",
      "description": "Set on the API service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "CRM",
      "description": "Shared with the API, which signs sessions.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MCP_ENCRYPTION_KEY",
      "service": "CRM",
      "description": "Shared with the API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AGENT_BRIDGE_SECRET",
      "service": "CRM",
      "description": "Shared with the API and the agent.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CRM_API_INTERNAL_URL",
      "service": "CRM",
      "description": "The API on the private network; the app's /api proxy calls it.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GOOGLE_CLIENT_SECRET",
      "service": "CRM",
      "description": "Set on the API service.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CHAT_EVENT_ENCRYPTION_KEY",
      "service": "CRM",
      "description": "Shared with the API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CRM_ROLE",
      "service": "Cron",
      "description": "Runs the scheduled syncs. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "cron"
    },
    {
      "key": "CRON_SECRET",
      "service": "Cron",
      "description": "Shared with the API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CRM_API_INTERNAL_URL",
      "service": "Cron",
      "description": "The API on the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "HOST",
      "service": "Agent",
      "description": "Listen on the private network. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "API_URL",
      "service": "Agent",
      "description": "The API on the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "APP_URL",
      "service": "Agent",
      "description": "Public address of the CRM.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CRM_ROLE",
      "service": "Agent",
      "description": "Runs the research agent. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "agent"
    },
    {
      "key": "NODE_ENV",
      "service": "Agent",
      "description": "Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "AGENT_PORT",
      "service": "Agent",
      "description": "Port of the agent on the private network. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "2000"
    },
    {
      "key": "DATABASE_URL",
      "service": "Agent",
      "description": "Postgres connection.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOWED_SIGN_IN",
      "service": "Agent",
      "description": "Set on the API service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "Agent",
      "description": "Shared with the API, which signs sessions.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MCP_ENCRYPTION_KEY",
      "service": "Agent",
      "description": "Shared with the API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AGENT_BRIDGE_SECRET",
      "service": "Agent",
      "description": "Shared with the API and the agent.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WORKFLOW_LOCAL_DATA_DIR",
      "service": "Agent",
      "description": "Where the agent keeps its durable sessions, on the volume. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "/data/workflow"
    },
    {
      "key": "CHAT_EVENT_ENCRYPTION_KEY",
      "service": "Agent",
      "description": "Shared with the API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Host.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "User.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name.",
      "secret": false,
      "strategy": "default",
      "default": "crm"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Connection string the CRM services use.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Days the self-signed certificate lasts.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Seconds Postgres gets to shut down cleanly.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "API",
      "description": "Port of the API on the private network. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "3001"
    },
    {
      "key": "API_URL",
      "service": "API",
      "description": "Public origin of the auth routes (the CRM app proxies /api to this service). Must match APP_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "APP_URL",
      "service": "API",
      "description": "Public address of the CRM. Change it to https://your-domain after adding a custom domain, here and on the CRM service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CRM_ROLE",
      "service": "API",
      "description": "Runs the API. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "api"
    },
    {
      "key": "NODE_ENV",
      "service": "API",
      "description": "Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "AGENT_URL",
      "service": "API",
      "description": "The research agent on the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CRON_SECRET",
      "service": "API",
      "description": "Guards the scheduled sync routes the Cron service calls.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_URL",
      "service": "API",
      "description": "Postgres connection.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOWED_SIGN_IN",
      "service": "API",
      "description": "Who may sign in: your email address, or your company's domain (acme.com). Comma-separate several. This is the whole access control.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "BETTER_AUTH_SECRET",
      "service": "API",
      "description": "Signs sessions. Changing it signs everyone out.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MCP_ENCRYPTION_KEY",
      "service": "API",
      "description": "Encrypts MCP connection tokens. Never change it once connections exist.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "AGENT_BRIDGE_SECRET",
      "service": "API",
      "description": "Lets the app and API talk to the research agent.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CHAT_EVENT_ENCRYPTION_KEY",
      "service": "API",
      "description": "Encrypts agent-builder chat history. Never change it once chats exist.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "agentic-crm"
      }
    },
    "cli": "railway deploy --template agentic-crm",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "937d28bb-e132-4910-bc50-b1c5187745e3",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "44c1ae76-cc5a-4e44-b1d7-1b710b783a25": {
                  "icon": "https://raw.githubusercontent.com/trycompai/crm/v1.16.0/apps/app/public/web-app-manifest-512x512.png",
                  "name": "CRM",
                  "deploy": {
                    "healthcheckPath": "/sign-in",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/two-workspaces/comp-crm:6e9ed2c"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port of the web app. Do not change.",
                      "defaultValue": "3000"
                    },
                    "API_URL": {
                      "isOptional": false,
                      "description": "Public origin of the auth routes, which this app proxies to the API. Do not change.",
                      "defaultValue": "https://${{CRM.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "APP_URL": {
                      "isOptional": false,
                      "description": "Public address of the CRM. Change it to https://your-domain after adding a custom domain, here and on the API.",
                      "defaultValue": "https://${{CRM.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "CRM_ROLE": {
                      "isOptional": false,
                      "description": "Runs the web app. Do not change.",
                      "defaultValue": "app"
                    },
                    "AGENT_URL": {
                      "isOptional": false,
                      "description": "The research agent on the private network.",
                      "defaultValue": "http://${{Agent.RAILWAY_PRIVATE_DOMAIN}}:2000"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "ALLOWED_SIGN_IN": {
                      "isOptional": false,
                      "description": "Set on the API service.",
                      "defaultValue": "${{API.ALLOWED_SIGN_IN}}"
                    },
                    "GOOGLE_CLIENT_ID": {
                      "isOptional": false,
                      "description": "Set on the API service.",
                      "defaultValue": "${{API.GOOGLE_CLIENT_ID}}"
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Shared with the API, which signs sessions.",
                      "defaultValue": "${{API.BETTER_AUTH_SECRET}}"
                    },
                    "MCP_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Shared with the API.",
                      "defaultValue": "${{API.MCP_ENCRYPTION_KEY}}"
                    },
                    "AGENT_BRIDGE_SECRET": {
                      "isOptional": false,
                      "description": "Shared with the API and the agent.",
                      "defaultValue": "${{API.AGENT_BRIDGE_SECRET}}"
                    },
                    "CRM_API_INTERNAL_URL": {
                      "isOptional": false,
                      "description": "The API on the private network; the app's /api proxy calls it.",
                      "defaultValue": "http://${{API.RAILWAY_PRIVATE_DOMAIN}}:3001"
                    },
                    "GOOGLE_CLIENT_SECRET": {
                      "isOptional": false,
                      "description": "Set on the API service.",
                      "defaultValue": "${{API.GOOGLE_CLIENT_SECRET}}"
                    },
                    "CHAT_EVENT_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Shared with the API.",
                      "defaultValue": "${{API.CHAT_EVENT_ENCRYPTION_KEY}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                },
                "58ebc763-0323-432a-8eda-b9158669a11b": {
                  "icon": "https://raw.githubusercontent.com/trycompai/crm/v1.16.0/apps/app/public/web-app-manifest-512x512.png",
                  "name": "Cron",
                  "deploy": {
                    "cronSchedule": "*/5 * * * *",
                    "restartPolicyType": "NEVER"
                  },
                  "source": {
                    "image": "ghcr.io/two-workspaces/comp-crm:6e9ed2c"
                  },
                  "variables": {
                    "CRM_ROLE": {
                      "isOptional": false,
                      "description": "Runs the scheduled syncs. Do not change.",
                      "defaultValue": "cron"
                    },
                    "CRON_SECRET": {
                      "isOptional": false,
                      "description": "Shared with the API.",
                      "defaultValue": "${{API.CRON_SECRET}}"
                    },
                    "CRM_API_INTERNAL_URL": {
                      "isOptional": false,
                      "description": "The API on the private network.",
                      "defaultValue": "http://${{API.RAILWAY_PRIVATE_DOMAIN}}:3001"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  }
                },
                "75587fbb-84ef-4db2-9f98-6de25cd5abed": {
                  "icon": "https://raw.githubusercontent.com/trycompai/crm/v1.16.0/apps/app/public/web-app-manifest-512x512.png",
                  "name": "Agent",
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/two-workspaces/comp-crm:6e9ed2c"
                  },
                  "variables": {
                    "HOST": {
                      "isOptional": false,
                      "description": "Listen on the private network. Do not change.",
                      "defaultValue": "::"
                    },
                    "API_URL": {
                      "isOptional": false,
                      "description": "The API on the private network.",
                      "defaultValue": "http://${{API.RAILWAY_PRIVATE_DOMAIN}}:3001"
                    },
                    "APP_URL": {
                      "isOptional": false,
                      "description": "Public address of the CRM.",
                      "defaultValue": "https://${{CRM.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "CRM_ROLE": {
                      "isOptional": false,
                      "description": "Runs the research agent. Do not change.",
                      "defaultValue": "agent"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Do not change.",
                      "defaultValue": "production"
                    },
                    "AGENT_PORT": {
                      "isOptional": false,
                      "description": "Port of the agent on the private network. Do not change.",
                      "defaultValue": "2000"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "ALLOWED_SIGN_IN": {
                      "isOptional": false,
                      "description": "Set on the API service.",
                      "defaultValue": "${{API.ALLOWED_SIGN_IN}}"
                    },
                    "AI_GATEWAY_API_KEY": {
                      "isOptional": true,
                      "description": "Vercel AI Gateway key for the agent's model (vercel.com/docs/ai-gateway). Without it the CRM works but the research agent can't run.",
                      "defaultValue": ""
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Shared with the API, which signs sessions.",
                      "defaultValue": "${{API.BETTER_AUTH_SECRET}}"
                    },
                    "MCP_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Shared with the API.",
                      "defaultValue": "${{API.MCP_ENCRYPTION_KEY}}"
                    },
                    "PERPLEXITY_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. Lets the agent search the web for people and news.",
                      "defaultValue": ""
                    },
                    "AGENT_BRIDGE_SECRET": {
                      "isOptional": false,
                      "description": "Shared with the API and the agent.",
                      "defaultValue": "${{API.AGENT_BRIDGE_SECRET}}"
                    },
                    "WORKFLOW_LOCAL_DATA_DIR": {
                      "isOptional": false,
                      "description": "Where the agent keeps its durable sessions, on the volume. Do not change.",
                      "defaultValue": "/data/workflow"
                    },
                    "CHAT_EVENT_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Shared with the API.",
                      "defaultValue": "${{API.CHAT_EVENT_ENCRYPTION_KEY}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "f48f8bda-b424-4ee9-b69e-7a51d373f869": {
                      "mountPath": "/data"
                    }
                  }
                },
                "8a284c6e-2a45-4550-bbe0-5d7003109f1c": {
                  "icon": "https://devicons.railway.com/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Host.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "User.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Database.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name.",
                      "defaultValue": "crm"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Connection string the CRM services use.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Days the self-signed certificate lasts.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Seconds Postgres gets to shut down cleanly.",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "4e6df5f4-09b9-4716-b6e5-bcaafef803f0": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "9bc4181b-fb88-4f92-ba69-efc84fa3608e": {
                  "icon": "https://raw.githubusercontent.com/trycompai/crm/v1.16.0/apps/app/public/web-app-manifest-512x512.png",
                  "name": "API",
                  "deploy": {
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/two-workspaces/comp-crm:6e9ed2c"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port of the API on the private network. Do not change.",
                      "defaultValue": "3001"
                    },
                    "API_URL": {
                      "isOptional": false,
                      "description": "Public origin of the auth routes (the CRM app proxies /api to this service). Must match APP_URL.",
                      "defaultValue": "https://${{CRM.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "APP_URL": {
                      "isOptional": false,
                      "description": "Public address of the CRM. Change it to https://your-domain after adding a custom domain, here and on the CRM service.",
                      "defaultValue": "https://${{CRM.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "CRM_ROLE": {
                      "isOptional": false,
                      "description": "Runs the API. Do not change.",
                      "defaultValue": "api"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Do not change.",
                      "defaultValue": "production"
                    },
                    "AGENT_URL": {
                      "isOptional": false,
                      "description": "The research agent on the private network.",
                      "defaultValue": "http://${{Agent.RAILWAY_PRIVATE_DOMAIN}}:2000"
                    },
                    "CRON_SECRET": {
                      "isOptional": false,
                      "description": "Guards the scheduled sync routes the Cron service calls.",
                      "defaultValue": "{{CRON_SECRET}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "ALLOWED_SIGN_IN": {
                      "isOptional": false,
                      "description": "Who may sign in: your email address, or your company's domain (acme.com). Comma-separate several. This is the whole access control.",
                      "defaultValue": "{{ALLOWED_SIGN_IN}}"
                    },
                    "GOOGLE_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Google OAuth client id. Sign-in needs Google or Microsoft: create a Web client at console.cloud.google.com with the redirect URI https://your-crm-domain/api/auth/callback/google.",
                      "defaultValue": ""
                    },
                    "BETTER_AUTH_SECRET": {
                      "isOptional": false,
                      "description": "Signs sessions. Changing it signs everyone out.",
                      "defaultValue": "{{BETTER_AUTH_SECRET}}"
                    },
                    "MCP_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts MCP connection tokens. Never change it once connections exist.",
                      "defaultValue": "{{MCP_ENCRYPTION_KEY}}"
                    },
                    "AGENT_BRIDGE_SECRET": {
                      "isOptional": false,
                      "description": "Lets the app and API talk to the research agent.",
                      "defaultValue": "{{AGENT_BRIDGE_SECRET}}"
                    },
                    "MICROSOFT_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Instead of or next to Google: a Microsoft Entra app id, with the redirect URI https://your-crm-domain/api/auth/callback/microsoft.",
                      "defaultValue": ""
                    },
                    "GOOGLE_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Google OAuth client secret, set together with the id.",
                      "defaultValue": ""
                    },
                    "MICROSOFT_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Microsoft client secret, set together with the id.",
                      "defaultValue": ""
                    },
                    "CHAT_EVENT_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts agent-builder chat history. Never change it once chats exist.",
                      "defaultValue": "{{CHAT_EVENT_ENCRYPTION_KEY}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "CRM",
      "method": "GET",
      "path": "/sign-in",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-11-01T04:15:07.855Z",
  "generator_version": "0.1.0"
}
