Implement file upload functionality for book-related assets (e.g., book images, review media) and store them in an object storage system. The solution should prioritize open-source, actively maintained alternatives to MinIO and include Docker-based orchestration.
User Story
Given a user uploads a file
When the request is processed
Then the file should be stored in object storage and accessible via URL
Goals
- Enable file uploads via API
- Store files in scalable object storage
- Avoid deprecated/unmaintained tools
- Provide a containerized setup using Docker Compose
Research Context
Architecture Overview
- API (Node.js + Express)
- File upload middleware
- Object storage service (S3-compatible preferred)
- Docker Compose orchestration
Tasks
File Upload API
Upload Handling
Object Storage Integration
Docker Setup
Swagger Documentation
Project Structure
Acceptance Criteria
Testing Steps
Definition of Done
Optional (Nice to Have)
Suggested Approach (Practical Tip)
For your level/project:
- Start with Garage (lightweight) or Alarik (modern & active)
- Avoid Ceph initially (too heavy for learning project)
Implement file upload functionality for book-related assets (e.g., book images, review media) and store them in an object storage system. The solution should prioritize open-source, actively maintained alternatives to MinIO and include Docker-based orchestration.
User Story
Given a user uploads a file
When the request is processed
Then the file should be stored in object storage and accessible via URL
Goals
Research Context
Investigate object storage solutions
Avoid MinIO (archived / maintenance mode as of 2026) ([alarik.io][1])
Evaluate open-source alternatives:
Compare trade-offs:
Document decision (ADR or README section)
Architecture Overview
Tasks
File Upload API
Create file upload endpoint:
Accept:
Validate file type (images/videos only)
Validate file size limits
Handle upload errors
Upload Handling
Integrate file upload middleware:
multer(or equivalent)Store files temporarily before upload
Generate unique file names
Upload files to object storage
Return file URL in response
Object Storage Integration
Choose storage provider (after research)
Ensure S3-compatible API (preferred)
Configure SDK (e.g., AWS SDK for S3-compatible storage)
Implement upload service:
Handle failures and retries
Docker Setup
Create
docker-compose.ymlAdd services:
Configure volumes for persistence
Configure environment variables
Ensure services communicate via network
Swagger Documentation
/uploadendpointProject Structure
Add upload-related modules:
/services/storage.service.js/middlewares/upload.middleware.js/routes/upload.routes.jsAcceptance Criteria
File upload endpoint works
Files stored in object storage
Returned URL is accessible
Invalid files rejected (type/size)
Docker setup runs successfully:
Services communicate correctly
Swagger supports file upload testing
Testing Steps
/uploadDefinition of Done
Optional (Nice to Have)
/books/:id/)Suggested Approach (Practical Tip)
For your level/project: