How dlcastra/api_file_processing works
This is a FastAPI file-processing and analysis API. Clients authenticate, upload and manage files, then request conversion, parsing, or tonality analysis; processing requests are queued, workers return results through webhooks, and the API waits for cached results. The graph includes the documented worker capabilities, but their implementations are absent from the tree. Relationships for the main request flow are supported by excerpts; worker callbacks and some infrastructure behavior are based on the README.
Main entry points: file_management/routers.py File routes · webhooks/routers.py Webhook routes · auth/routers.py Auth routes · services.py File service
Components 21
API and authentication
- FastAPI application
application.py - Auth routes
src/app/auth/routers.py - Auth service
src/app/auth/services.py - User models
src/app/auth/models.py - Session utilities
src/app/auth/utils.py
File management
- File routes
src/app/file_management/routers.py - File service
src/app/file_management/services.py - File models
src/app/file_management/models.py - File validation
src/app/validators/file_validation.py - Response generation
src/app/responses/generator.py
Async processing
- Webhook routes
src/app/webhooks/routers.py - Cache waiting
src/app/webhooks/utils.py - Conversion worker
src/external/services/converter - Analysis workers
src/external/services/analyser
Persistence and infrastructure
- AWS clients
src/app/aws/clients.py - SQS messaging
src/app/aws/utils.py - AWS SQS
- Redis cache
- PostgreSQL database
- AWS S3
Other components
- Client
Connections 28
- Client → FastAPI application: sends requests
application.py - FastAPI application → Auth routes: registers routes
application.py - FastAPI application → File routes: registers routes
application.py - FastAPI application → Webhook routes: registers routes
application.py - Auth routes → Auth service: calls
src/app/auth/routers.py - Auth service → User models: queries and creates
src/app/auth/services.py - Auth routes → Session utilities: manages sessions
src/app/auth/routers.py - Auth routes → PostgreSQL database: reads and writes
src/app/auth/routers.py - Auth routes → Redis cache: stores sessions
src/app/auth/routers.py - Auth service → PostgreSQL database: reads and writes
src/app/auth/services.py - File routes → File validation: validates uploads
src/app/file_management/routers.py - File routes → File service: calls
src/app/file_management/routers.py - File routes → SQS messaging: enqueues tasks
src/app/file_management/routers.py - File routes → Cache waiting: waits for results
src/app/file_management/routers.py - File routes → Response generation: formats results
src/app/file_management/routers.py - File service → File models: queries and updates
src/app/file_management/services.py - File service → PostgreSQL database: reads and writes
src/app/file_management/services.py - File service → AWS clients: uses S3 client
src/app/file_management/services.py - AWS clients → AWS S3: accesses objects
- SQS messaging → AWS SQS: sends messages
- AWS SQS → Conversion worker: dispatches tasks
README.md - AWS SQS → Analysis workers: dispatches tasks
README.md - Conversion worker → Webhook routes: posts results
README.md - Analysis workers → Webhook routes: posts results
README.md - Webhook routes → File service: updates file record
src/app/webhooks/routers.py - Webhook routes → PostgreSQL database: commits updates
src/app/webhooks/routers.py - Webhook routes → Redis cache: caches results
src/app/webhooks/routers.py - Cache waiting → Redis cache: polls results
README.md