This microservice implements a basic CRUD for uploading, storing, and retrieving images using NestJS. Images are externally stored in Firebase Storage, and the endpoints support file upload, retrieval, and validation.
This project provides a scalable and efficient image storage microservice, featuring:
- Image upload (with type and size validation).
- Storage in Firebase Storage.
- Image retrieval via public URLs.
- Security with JWT authentication to protect access to the endpoints (Mocked data, not real authentication process required).
- Thumbnail generation (for image resizing).
- Audit logs to track who uploaded which file and when.
- Redis integration to cache URLs and improve performance.
Before starting, make sure you have the following installed in your local environment:
- Node.js (version 20 or higher).
- NestJS (already included in the template).
- Firebase CLI (if using Firebase Storage).
- Redis (optional for URL caching).
You should use the following tech stack during this project:
- TypeORM.
- PostgreSQL.
- Redis (optional).
- You should create a forked repository and make a PR when you complete the project.
- A guideline of the tasks required can be found in the issues of this repo and in the following project: Cute Digital Media Project
- Each issue contains the description needed to handle the task.
-
Clone the Repository
Clone the GitHub repository to your local machine:
git clone <REPOSITORY_URL> cd <PROJECT_NAME>
-
Install dependencies
yarn install
-
.env variables
- You should update this point to include env names needed.
- Start the Service
yarn start:dev
- Final considerations and recomendations
- Keep it simple.
- Be organized in your code.
- Don't forget to provide the necessary environment variable names needed to run and test the project.
- Good luck :).