https://github.com/marcussilva3298/iloveimages
NestJS Image Processor
https://github.com/marcussilva3298/iloveimages
aws bucket cdn docker docker-compose nestjs nestjs-backend redis typescript
Last synced: 3 months ago
JSON representation
NestJS Image Processor
- Host: GitHub
- URL: https://github.com/marcussilva3298/iloveimages
- Owner: MarcusSilva3298
- Created: 2024-09-24T23:52:03.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-08T13:55:57.000Z (over 1 year ago)
- Last Synced: 2025-04-03T10:29:45.572Z (over 1 year ago)
- Topics: aws, bucket, cdn, docker, docker-compose, nestjs, nestjs-backend, redis, typescript
- Language: TypeScript
- Homepage:
- Size: 699 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
Awesome Lists containing this project
README
# ILoveImages - NestJS Project





## Description
This **NestJS** project is responsible for fetching, listing, and processing images stored in AWS buckets, utilizing a CDN to optimize distribution. It also uses **Redis** as a cache to enhance performance in repetitive image fetching and processing operations. The project is dockerized and uses a `docker-compose.yaml` file to simplify configuration and execution.
## Features
- Fetch images from AWS S3 buckets.
- List available images via API.
- Process images (formatting, quality adjustment, grayscale conversion).
- Use Redis for caching to improve performance.
- Distribute images via a CDN optimized for different regions.
## Technologies Used
- [NestJS](https://nestjs.com/)
- [TypeScript](https://www.typescriptlang.org/)
- [AWS S3](https://aws.amazon.com/s3/)
- [Redis](https://redis.io/)
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)
## How to Run the Project
### Prerequisites
- [Docker](https://www.docker.com/) installed.
- [Docker Compose](https://docs.docker.com/compose/) installed.
### Steps to run the project
1. Clone the repository:
```bash
git clone https://github.com/MarcusSilva3298/iloveimages.git
cd iloveimages
```
2. Run the project with Docker Compose:
```bash
docker-compose up --build
```
3. The application will be available at `http://localhost:3000`.
### API Endpoints
- **GET** `/pictures`: List available images.
- **GET** `/pictures/{filename.format}`: Fetch a specific image with optional query parameters to process the image:
- `q`: Image quality (number from 1 to 100)
- `fm`: Image format (string: `png`, `jpg`, or `webp`)
- `w`: Image width (number)
- `h`: Image height (number)
- `gray`: Apply grayscale (1 or 0)
## License
Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).