Skip to content

fix(BUY-7469): add /openapi.json 308 redirect to buywhere.ai nginx config#30

Open
BuyWhere wants to merge 23 commits intomainfrom
bolt/fix-7469-openapi-redirect
Open

fix(BUY-7469): add /openapi.json 308 redirect to buywhere.ai nginx config#30
BuyWhere wants to merge 23 commits intomainfrom
bolt/fix-7469-openapi-redirect

Conversation

@BuyWhere
Copy link
Copy Markdown
Owner

@BuyWhere BuyWhere commented May 2, 2026

Adds the missing location = /openapi.json { return 308 https://api.buywhere.ai/openapi.json; } block to the buywhere.ai nginx config. This resolves BUY-7469 so that agents hitting https://buywhere.ai/openapi.json get properly redirected to the API endpoint.

  • Fixes BUY-7663

Bolt (VP DevOps) and others added 23 commits May 1, 2026 12:43
…thog.ts, rebuild dist files, fix Node.js MCP healthz endpoint (BUY-5978)
Previously call_tool extracted the API key from the ApiKey model
using key_hash, which is a bcrypt hash — not usable as a bearer
token for downstream calls. Extract the raw Authorization header
Bearer value instead, matching what the client actually sent.

Fixes BUY-5978

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…I_KEY

Co-Authored-By: Paperclip <noreply@paperclip.ing>
… @buywhere/mcp-server

- Remove 'not yet published' callout and STDIO 'coming soon' text
- Add local package install path (npx -y @buywhere/mcp-server)
- Add STDIO config examples for Claude Desktop and Cursor alongside HTTP transport

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…p-server

- Remove 'not yet published' callout and 'coming soon' STDIO text
- Add local package install path (npx -y @buywhere/mcp-server)
- Add STDIO config examples for Claude Desktop and Cursor alongside HTTP transport
- Remove duplicate 'Configure Cursor' section that was an accidental copy-paste

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…conf

Proxies /mcp/ requests to the API backend (127.0.0.1:8000) which
should have the MCP router mounted. Fixes 404 on /mcp/ after nginx
adds a trailing slash redirect.
…tions

- scrapers/amazon_au.py: Amazon AU (amazon.com.au), 8 categories, 120 keywords,
  ScraperAPI premium residential, 500K target
- scrapers/zalora_my.py: Zalora MY sitemap crawler, 5 shards, resume-capable,
  adapted from Zalora SG pattern
- ecs/amazon_au-task-definition.json: CPU 1024, Mem 2048, scrape-only
- ecs/zalora_my-task-definition.json: CPU 512, Mem 1024
- ecs/shopee_th-task-definition.json: CPU 512, Mem 1024, ScraperAPI
- ecs/shopee_ph-task-definition.json: CPU 512, Mem 1024, ScraperAPI + BrightData

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- New page: /best-headphones-singapore with 6 comparison rows (Sony, Apple, Bose, Sennheiser, Samsung)
- Targets 'headphones' search query with live BuyWhere API results + fallback
- Added to sitemap with 0.9 priority, weekly change frequency
- Follows same SeoLandingPage pattern as laptop-singapore, air-purifier-singapore

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- developers/page.tsx: improved title (MCP Server & Product Catalog API for AI Agents), description (5M+ products, no scraping, MCP included), hero copy (live catalog, no scraping)
- quickstart/page.tsx: improved title (Quickstart — BuyWhere MCP Server & API), description (5M+ products, no scrapers/no HTML parsing framing)

Targets discovery keywords: AI agent product search, MCP server for product catalog, live product data for AI agents, product search API without scraping

Co-Authored-By: Paperclip <noreply@paperclip.ing>
The opencode_local adapter in Hex validates its run JWT against the
Paperclip control plane at /api/agents/me. The default URL was set to
https://paperclip.ai which does not host the API endpoint — causing all
Hex heartbeat authentications to fail with 'Invalid API key' and driving
Hex into error state.

Changed default from https://paperclip.ai to https://api.paperclip.ai,
which matches the Paperclip platform API endpoint used by all other
BuyWhere tooling (detect_agent_model_drift.py, product_freshness.py).

Fixes BUY-7037.
- Title: "Integration Guide — BuyWhere MCP Server for AI Agents | Product Search & Price Comparison"
- Description: "Connect BuyWhere MCP server to your AI agent in minutes. Search 5M+ Singapore products, compare prices across Shopee, Lazada, and 20+ retailers — no scraping. MCP-compatible with Claude Desktop, Cursor, and any MCP client."
- Hero headline: "Your AI agent needs a live product catalog. Here it is."
- Hero subhead: "BuyWhere gives your AI agent product search, price comparison, and deal discovery across 5M+ Singapore products — via MCP tools or REST API. No scrapers, no maintenance, no HTML parsing."
- Targets: "MCP server for AI agents", "AI agent product search", "product catalog API", "MCP integration guide"

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- Title: "Pricing — BuyWhere Product Catalog API & MCP Server | Singapore"
- Description: "BuyWhere pricing: pay per product search query or subscribe for higher limits. AI agent-ready product catalog API with live prices from Shopee, Lazada, and 20+ Singapore retailers. Free tier available."
- Targets: "product catalog API pricing", "MCP server pricing", "AI agent product search cost"

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…ckend

The MCP endpoint must go directly to the Node.js API on port 8000,
not through the upstream block. The old config was routing /mcp/ to
api_backend which may have had the old Python MCP on 8082.

Direct proxy_pass to 127.0.0.1:8000 ensures the new MCP with the
correct 0.1.4 schema is reached. Also restored /mcp (no trailing slash)
to match the expected route path.
- H1: "Best Electronics Price Comparison Singapore — Gadgets & Tech Deals"
- Title: "Electronics Price Comparison Singapore | Compare Gadgets & Tech Deals 2026"
- Description: "Compare cheapest electronics prices in Singapore: smartphones, laptops, TVs, gaming from Shopee, Lazada, Courts, Harvey Norman. Updated daily."
- Schema: Updated CollectionPage name/description to match
- Targets: "electronics price comparison Singapore", "best electronics deals Singapore", "gadgets price comparison"

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- H1: "Fashion Price Comparison Singapore — Clothing, Shoes & Accessories Deals"
- Title: "Fashion Price Comparison Singapore | Clothing, Shoes & Accessories Deals 2026"
- Description: "Compare cheapest fashion prices in Singapore: clothing, shoes, bags, accessories from Zalora, Shopee, Lazada. Find the best deals on fashion online."
- Schema: Updated CollectionPage name/description to match
- Targets: "fashion price comparison Singapore", "clothing deals Singapore", "shoes price comparison Singapore"

Also updates electronics category H1 to: "Best Electronics Price Comparison Singapore — Gadgets & Tech Deals"

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…chema

- H1, title, description updated with price-comparison framing and 2026 year
- CollectionPage schema name/description aligned with metadata

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- Title + description aligned with price-comparison framing and 2026 year
- CollectionPage schema name/description synced with metadata

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…d Run probe

- Add src/app/healthz/route.ts — GET /healthz returns {"status":"ok"} with 200
- Add location /healthz block to deploy/nginx/buywhere.ai.conf — proxies to Cloud Run backend
- Fixes 502 Bad Gateway on buywhere.ai because nginx couldn't proxy to a backend
  that doesn't have a /healthz endpoint (no such route in Next.js frontend)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- PLATFORM = 'shopee' (platform field, not merchant_id)
- transform_product: url→product_url, add country_code: SG
- ingest_batch: endpoint /v1/products/ingest, flat array payload
- Response keys: inserted/updated/skipped
- Add str | None type annotation on products_outfile

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant