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:
35
backend/requirements-api.txt
Normal file
35
backend/requirements-api.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
# Production API image: everything in requirements.txt EXCEPT sentence-transformers.
|
||||
#
|
||||
# Embeddings are only computed inside collection runs (collector.embed ->
|
||||
# services/embeddings_service.py, imported lazily), and the collector already
|
||||
# skips that step when it fails. Leaving MiniLM/PyTorch out keeps the image
|
||||
# ~2 GB smaller; set USE_EMBEDDINGS=false in the production environment.
|
||||
# Keep the two files in step when a dependency is added.
|
||||
|
||||
# --- API ---
|
||||
fastapi>=0.115.0
|
||||
uvicorn[standard]>=0.30.6
|
||||
pydantic>=2.9.2
|
||||
python-dotenv>=1.0.1
|
||||
PyJWT>=2.9.0
|
||||
fastmcp>=4.0,<5 # MCP endpoint at /mcp/ (app/mcp_server.py)
|
||||
|
||||
# --- Database ---
|
||||
psycopg[binary]>=3.2.3
|
||||
pgvector>=0.2.5
|
||||
|
||||
# --- HTTP, search, parsing (used by admin collection runs) ---
|
||||
requests>=2.31.0
|
||||
httpx>=0.27.2
|
||||
ddgs>=9.14.4
|
||||
protego>=0.3.1
|
||||
extruct>=0.17.0
|
||||
beautifulsoup4>=4.12.3
|
||||
lxml>=4.9.3
|
||||
PyYAML>=6.0
|
||||
|
||||
# --- Normalisation / matching ---
|
||||
rapidfuzz>=3.9.0
|
||||
|
||||
# --- CLI ---
|
||||
typer>=0.12.0
|
||||
Reference in New Issue
Block a user