How vojtechgero/bakalrkaapi works
This repository is the backend API for a desktop PDF-management application. The main workflows are browsing and modifying documents, requesting OCR for a PDF, and searching OCR text across documents. FileService owns filesystem operations and coordinates OCR; OcrService calls Azure Document Intelligence and caches mapped results as JSON. SearchService scans those JSON caches and returns document-level or match-level results. The README documents the desktop client and Azure configuration; some FileService implementation is excerpted only partially, so uncertain internal wiring is omitted.
Main entry points: FileService.cs File operations · OcrService.cs OCR processing · SearchService.cs OCR text search · Pdf.cs PDF document
Components 15
API workflows
- File endpoints
BakalrkaApi/Controllers/FileController.cs - Search endpoints
BakalrkaApi/Controllers/SearchController.cs
Document management
- File operations
BakalrkaApi/Services/FileService.cs - PDF and JSON files
BakalrkaApi/Services/FileService.cs
OCR and search
- OCR processing
BakalrkaApi/Services/OcrService.cs - OCR text search
BakalrkaApi/Services/SearchService.cs - Azure API settings
BakalrkaApi/Services/ApiSettings.cs
Domain models
- PDF document
BakalrkaApi/Models/Pdf.cs - OCR page
BakalrkaApi/Models/OcrPage.cs - OCR text box
BakalrkaApi/Models/OcrBox.cs - File listing item
BakalrkaApi/Models/FileItem.cs - Search match
BakalrkaApi/Models/SearchResult.cs - Grouped results
BakalrkaApi/Models/FileResults.cs
Other components
- Desktop client
- Azure Document Intelligence
Connections 18
- Desktop client → File endpoints: requests files
- Desktop client → Search endpoints: submits searches
- File endpoints → File operations: calls operations
- File operations → PDF and JSON files: reads and writes
- File operations → OCR processing: requests OCR
- File operations → File listing item: returns listings
- File operations → PDF document: returns PDF data
- OCR processing → PDF and JSON files: reads or caches
- OCR processing → Azure Document Intelligence: analyzes document
- OCR processing → Azure API settings: uses credentials
- OCR processing → PDF document: maps OCR result
- PDF document → OCR page: contains pages
- OCR page → OCR text box: contains boxes
- Search endpoints → OCR text search: calls search
- OCR text search → PDF and JSON files: scans JSON caches
- OCR text search → PDF document: deserializes documents
- OCR text search → Search match: builds matches
- OCR text search → Grouped results: groups matches