|
|
||
|---|---|---|
| database_utils | ||
| itserr_backend.egg-info | ||
| routers | ||
| utils | ||
| .gitignore | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| DOCUMENTAZIONE_TECNICA.md | ||
| Dockerfile | ||
| KNOWN_ISSUES.md | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| SECURITY.md | ||
| __init__.py | ||
| app.py | ||
| d4science_public_key.pem | ||
| pyproject.toml | ||
| requirements.txt | ||
| script.sh | ||
| sonar-project.properties | ||
README.md
ITSERR WP6 Plorabunt — Backend
Backend API for the ITSERR WP6 Plorabunt project. This service provides functionalities for CSV import, dynamic table management, semantic search (powered by Qdrant and embeddings), and resource retrieval APIs.
Related Repositories
This project is part of a larger ecosystem. Here are the related repositories:
- Frontend: wp6_plorabunt_fe
- Backend (this repo): wp6_plorabunt_be
- Database Migrations: wp6-be-db-migration (Liquibase migrations)
Prerequisites
- Python: >= 3.11
- PostgreSQL: Required for data storage and metadata.
- Qdrant: Required for semantic search capabilities.
Quick Start (Local Development)
1. Environment Setup
Create and activate a virtual environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
2. Install Dependencies
pip install -r requirements.txt
3. Configuration
Set the required environment variables. Example for PowerShell:
$env:POSTGRES_USER = "itserr_user"
$env:POSTGRES_PASSWORD = "your_password"
$env:DB_HOST = "localhost"
$env:DB_PORT = "5432"
$env:POSTGRES_DB = "itserr_db3_plorabunt"
$env:QDRANT_HOST = "localhost"
$env:QDRANT_PORT = "6333"
4. Run the Application
uvicorn app:app --host 0.0.0.0 --port 8004 --reload
Main API Endpoints
GET /— Health check / Hello WorldPOST /search— Semantic searchPOST /keyword-search— Lexical searchPOST /api/upload/start— CSV upload and schema inferencePOST /api/upload/confirm— Confirm import and start background job
Technical Documentation
Detailed technical information, including architecture overview and database schemas, can be found in DOCUMENTAZIONE_TECNICA.md.
Deployment
For production, it is recommended to use Docker. See the provided Dockerfile and script.sh for guidance. The application is typically served using Gunicorn with Uvicorn workers.
docker build -t itserr-wp6-be .
Configuration in production is often handled via secrets (e.g., /run/secrets/wp6_services_secret.yml). Check utils/config.py for implementation details.