Electronics Catalog: API, MCP server, frontend and deployment

Verified catalogue of mobiles and laptops sold in India, collected from
real retail listings (FastAPI backend, React frontend, Postgres/pgvector).

- REST API under /api/elec (read-only catalogue; admin endpoints need login)
- MCP server (FastMCP) at /mcp/ with list_categories, search_products,
  get_product and price_history tools
- Real ratings and reviews read from product pages and search results
- Production Dockerfile (requirements-api.txt, no PyTorch) and
  .env.production.example; remote database only via an explicit
  ELEC_ALLOW_REMOTE_DB host/name allowlist
- docs/API.md: endpoint and MCP reference with live examples

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
sriram
2026-10-01 12:17:42 +05:30
commit c7e4d59188
115 changed files with 14329 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" role="img" aria-label="Electronics Catalog">
<!--
Electrical-products mark: a lightning bolt inside a plug face.
Same drawing as src/components/BrandMark.jsx. Colours are the app's
tokens (ink-950 #0f1626, amber-500 #e2a33d, amber-400 #f0b94f).
Flat shapes, strokes >= 4px, so it stays legible at 16px.
-->
<rect width="64" height="64" rx="16" fill="#0f1626"/>
<rect x="23" y="7" width="5" height="11" rx="2.5" fill="#e2a33d"/>
<rect x="36" y="7" width="5" height="11" rx="2.5" fill="#e2a33d"/>
<circle cx="32" cy="37" r="17" fill="none" stroke="#e2a33d" stroke-width="4.5"/>
<path d="M34.5 25 24 39.5h7.2L28.8 50 40 34.8h-7.3L34.5 25z" fill="#f0b94f"/>
</svg>

After

Width:  |  Height:  |  Size: 774 B