How harmonydata/harmonyapi works
Main Components
a. Client Layer:
• External clients (Web browsers, API consumers)
• Docker containers for local deployment
• React frontend (referenced but not in this repository)
b. API Layer:
• FastAPI application
• Main routers (/text, /health-check, /info endpoints)
• Request/response handling
c. Core Services:
• Text parsing service
• Matching service
• Embedding services (OpenAI, Azure, Google, HuggingFace)
• Caching system
• Instrument processing
d. External Dependencies:
• Apache Tika server for PDF parsing
• Azure Functions for spaCy
• Azure Blob Storage
• Sentence transformers
• Various ML models
Architecture Patterns to Highlight
• Microservices architecture (main API + Tika server + Azure Functions)
• Dependency injection pattern (visible in the services structure)
• Caching strategy (vectors_cache and instruments_cache)
• Multiple deployment options (Docker, AWS Lambda, Azure)
┌─ Client Layer ─────────────────────┐
• ┘
┌─ API Layer ──────────────────────┐
• ┘
┌─ Services Layer ─────────────────┐
• ┘
┌─ External Services ──────────────┐
• ┘
Key Relationships
• Client requests flowing through FastAPI endpoints
• Text processing pipeline (PDF/Excel → Tika → Parser → Matcher)
• Multiple embedding service options (OpenAI, Azure, Google, HuggingFace)
• Caching system interaction with core services
• Data persistence and storage interactions
Important Details
• API endpoints (/text/parse, /text/match, etc.)
• Supported file formats (PDF, XLSX, TXT)
• Language support (multilingual capabilities)
• Caching mechanisms
• Authentication/authorization flow (if implemented)
Deployment Options
Alternative deployment paths:
• Docker container deployment
• AWS Lambda serverless deployment
• Azure deployment with Functions
Technical Details to Highlight
• FastAPI framework
• Python-based services
• Docker containerization
• ML model integration
• PDF processing capabilities
• Excel file handling
• Multilingual support
• Vector-based matching