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:
33
backend/requirements.txt
Normal file
33
backend/requirements.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
# Electronics Catalog backend (local only). Python 3.13.
|
||||
# py -3.13 -m venv .venv && .venv\Scripts\pip install -r requirements.txt -r requirements-dev.txt
|
||||
|
||||
# --- 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
|
||||
|
||||
# --- Embeddings (MiniLM, CPU) ---
|
||||
sentence-transformers>=3.0.1
|
||||
|
||||
# --- HTTP, search, parsing ---
|
||||
requests>=2.31.0
|
||||
httpx>=0.27.2
|
||||
ddgs>=9.14.4
|
||||
protego>=0.3.1 # robots.txt parser (Google-style wildcards)
|
||||
extruct>=0.17.0 # JSON-LD / microdata / OpenGraph
|
||||
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