How sahil555/image-service works
This is a FastAPI image backend. Clients submit images and metadata, then retrieve filtered or individual image records, temporary download URLs, or delete images. The documented upload workflow stores image bytes in S3 and metadata in DynamoDB; the service code shows the orchestration of storage, metadata, and URL generation. The graph also includes Lambda adaptation and shared configuration and utility layers. Some repository/database wiring is documented but its implementation was not sampled, so those links are identified by their README evidence.
Main entry points: image_service.py Image service · storage_service.py Storage service · images.py Image routes · exception.py Error handling
Components 17
API and runtime
- Lambda adapter
app/lambda_handler.py - FastAPI app
app/main.py - Image routes
app/api/routes/images.py - Image schemas
app/schemas/image.py
Image workflows
- Image service
app/services/image_service.py - Image metadata model
app/models/image.py
Storage and metadata
- Storage service
app/services/storage_service.py - Image repository
app/repositories/image_repository.py - DynamoDB client
app/dbs/ddb.py - S3 image store
- DynamoDB
Shared support
- AWS configuration
app/core/config.py - Error handling
app/core/exception.py - Timing and dates
app/utils/helpers.py - Structured logging
app/core/logging.py
Other components
- Image client
- API Gateway
Connections 18
- Image client → Image routes: calls image APIs
README.md - API Gateway → Lambda adapter: delivers events
README.md - Lambda adapter → FastAPI app: adapts requests
README.md - FastAPI app → Image routes: registers routes
app/main.py - Image routes → Image service: calls workflows
app/api/routes/images.py - Image service → Storage service: uploads, signs, deletes
app/services/image_service.py - Image service → Image repository: reads and saves metadata
app/services/image_service.py - Storage service → S3 image store: transfers image objects
app/services/storage_service.py - Image repository → DynamoDB: persists metadata
README.md - DynamoDB client → DynamoDB: opens table
app/dbs/ddb.py - Storage service → AWS configuration: reads AWS settings
app/services/storage_service.py - DynamoDB client → AWS configuration: reads AWS settings
app/dbs/ddb.py - Image service → Timing and dates: formats timestamps
app/services/image_service.py - Storage service → Timing and dates: times operations
app/services/storage_service.py - Image routes → Error handling: handles service errors
app/api/routes/images.py - FastAPI app → Error handling: registers handlers
app/main.py - Image service → Error handling: raises workflow errors
app/services/image_service.py - Storage service → Error handling: raises storage errors
app/services/storage_service.py