How coutinho-ey/compliance-viewer works
Compliance Viewer is a FastAPI service that accepts an investment recommendation and client risk profile, retrieves relevant regulatory material, and returns a structured compliance assessment. Its runtime path runs from the API through the compliance service, which coordinates retrieval and Azure OpenAI analysis. A separate ingestion capability extracts and chunks PDFs from the knowledge base for persistent vector storage. The README describes RAG as a future project, but the sampled ingestion and retrieval modules implement that capability. Relationships reflect shown calls and documented API behavior; no agent workflow is shown.
Main entry points: complience_service.py Compliance Service · router.py API Routes · ingestion.py PDF Ingestion · retrieval.py Chunk Retrieval
Components 10
API
- FastAPI App
src/main.py - API Routes
src/api/router.py - Analysis Schemas
src/api/schemas/analysis.py
Compliance Analysis
- Compliance Service
src/services/complience_service.py
Knowledge Retrieval
- PDF Ingestion
src/rag/ingestion.py - Chunk Retrieval
src/rag/retrieval.py - ChromaDB Collection
Knowledge Sources
- Knowledge Base
knowledge_base
Other components
- API Client
- Azure OpenAI
Connections 10
- FastAPI App → API Routes: mounts routes
src/main.py - API Client → API Routes: submits analysis
README.md - API Routes → Analysis Schemas: accepts and returns
src/api/router.py - API Routes → Compliance Service: calls analysis
src/api/router.py - Compliance Service → Chunk Retrieval: retrieves context
src/services/complience_service.py - Compliance Service → Azure OpenAI: requests assessment
src/services/complience_service.py - Compliance Service → Analysis Schemas: uses result model
src/services/complience_service.py - PDF Ingestion → Knowledge Base: reads PDFs
src/rag/ingestion.py - PDF Ingestion → ChromaDB Collection: stores chunks
src/rag/ingestion.py - Chunk Retrieval → ChromaDB Collection: queries chunks
src/rag/retrieval.py