feat(image-microservice): Add authentication microservice #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Image Storage Microservice Features Report
Project Description
This project implements a basic CRUD microservice for uploading, storing, and retrieving images using NestJS. Images are stored externally in Firebase Storage, and the endpoints support file uploading, retrieval, and validation.
Main Features
Image Upload
Type and Size Validation: Uploaded images are validated to ensure they meet the allowed types (jpg, jpeg, png) and do not exceed the maximum size limit of 5 MB.
Endpoint: POST /images
Related Code: ImagesController.uploadImage
Storage in Firebase Storage
Firebase Initialization: Configuration of Firebase using credentials obtained from environment variables.
Related Code: ImagesService.initializeFirebase
Image Retrieval
Retrieval via Public URLs: Images stored in Firebase Storage can be retrieved using signed URLs.
Endpoint: GET /images/:id
Related Code: ImagesService.getImage
Security with JWT Authentication
Endpoint Protection: The endpoints are protected by JWT authentication to ensure that only authenticated users can access them.
Related Code: ImagesController
Additional Features (Optional)
Thumbnail Generation
Image Resizing: Generation of thumbnails for uploaded images using the sharp library.
Related Code: ImagesService.uploadImage
Audit Logs
Activity Logging: Recording who uploaded which file and when, using a logging service.
Related Code: ImagesController.uploadImage
Integration with Redis
URL Caching: Performance improvement through caching image URLs in Redis.
Related Code: ImagesController.uploadImage
Contact
Email