Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikby53/image-converter
Service that expose a RESTful API to convert JPEG to PNG and vice versa and compress the image with the compression ratio specified by the user.
https://github.com/nikby53/image-converter
aws-ec2 aws-s3 cli docker docker-compose github-actions go golang golang-api jwt-authentication minio rds-database rest-api swagger-ui transactions
Last synced: about 1 month ago
JSON representation
Service that expose a RESTful API to convert JPEG to PNG and vice versa and compress the image with the compression ratio specified by the user.
- Host: GitHub
- URL: https://github.com/nikby53/image-converter
- Owner: Nikby53
- License: apache-2.0
- Created: 2021-09-13T13:27:28.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-18T15:16:29.000Z (over 2 years ago)
- Last Synced: 2024-10-14T21:40:12.396Z (about 1 month ago)
- Topics: aws-ec2, aws-s3, cli, docker, docker-compose, github-actions, go, golang, golang-api, jwt-authentication, minio, rds-database, rest-api, swagger-ui, transactions
- Language: Go
- Homepage:
- Size: 2.2 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image-converter
Service that expose a RESTful API to convert JPEG to PNG and vice versa and compress the image with the compression ratio specified by the user. The user has the ability to view the history and status of their requests (queued, processed, completed) and download the original image and the processed one.## Build & Run (Locally)
### Prerequisites
- go 1.16
- docker
- golangci-lint (optional, used to run code checks)
- aws access and secret keyCreate .env file in root directory and add following values:
```dotenv
API_PORT=DB_USERNAME=
DB_PASSWORD=
DB_NAME=
DB_HOST=
DB_PORT=
DB_SSL_MODE=AWS_BUCKET_NAME=
AWS_ACC_ID=
AWS_SECRET_KEY=
AWS_REGION=MINIO_BUCKET_NAME=
MINIO_ACC_ID=
MINIO_SECRET_KEY=
MINIO_REGION=
MINIO_ENDPOINT=JWT_SIGNING_KEY=
JWT_TOKEN_TTL=
```Use `make run` to build&run project, `make lint` to check code with linter.
## Architecture Diagram
![](schema/Architecture.jpg)## Entity–relationship model
![](schema/ERD.jpg)# Endpoints
* /auth/signup - user registration [POST]
* /auth/login - user authorization [POST]
* /image/convert - convert and compress image [POST]
* /image/download/{id} - downloads needed image [GET]
* /requests - get the user's requests history [GET]## Run image converter from a binary command line interface
Grab a binary from [releases page](https://github.com/Nikby53/image-converter/releases)