How viniciusbktech/semantic-comparison works
Project type and purpose
• This is a full-stack web application (“Semantic Comparison Project”) for semantically comparing news articles.
• Backend: FastAPI service + Elasticsearch for embedding-based search and reranking.
• Frontend: React single-page application for user queries, results display, and interaction.
File structure
Top-level:
• backend/ – FastAPI application
– app/main.py (entry point, REST endpoints)
– app/elastic_utils.py (helpers to index/query Elasticsearch)
– app/models.py (Pydantic models for request/response)
– requirements.txt (Python deps)
– semantic_comparison-venv/ (virtual environment)
• frontend/ – React application
– public/index.html (HTML shell)
– src/ (JSX/CSS)
• App.jsx (root component)
• ComparisonView.jsx (results UI)
• ConfigPanel.jsx (query config UI)
– package.json & lock (Node deps)
README for additional insights
• Backend exposes REST endpoints for semantic search, uses Elasticsearch 8+, Python 3.8+.
• Frontend runs under Node.js 18+.
• Deployment calls for a reverse proxy (nginx), HTTPS, and environment variables.