Skip to content

Fully fledged image optimizer with FFmpeg + Go + Quarkus... (this is overkill I know :p)

License

Notifications You must be signed in to change notification settings

MateuxDotDev/tiny-img

Repository files navigation

TinyImg logo

Project scope

With TinyImg you can upload any image you want, and change it's size, format and quality. You will be able to either store the image in the server, download it directly or even share it with a link.

Application architecture

graph LR
    A[Auth Service]
    B[TinyImg Service]
    B <--> C[Notification Service]
    B <--> D[FFmpeg Service]
    D <--> C
Loading

Table of contents

Function requirements

  1. The user should be able to sign up.
  2. The user should be able to sign in.
  3. The user should be able to upload an image.
  4. The user should be able to change the image size.
  5. The user should be able to change the image format.
  6. The user should be able to change the image quality.
  7. The user should be able to store the image in the server.
  8. The user should be able to download the image converted image.
  9. The user should be able to share the image with a link.

Non-functional requirements

  1. The image processing should be done using FFmpeg.
  2. The image should be able to store images.

Business rules

  1. The user should be able to upload images up to 5MB.
  2. The user should be able to store up to 10 images.
  3. The user should be able to store images up to 30 days.
  4. The user should be able to download up to 5 images per day.
  5. The user should be able to share up to 3 images per day.

Tech stack

Technology Reason System
Quarkus Quarkus is a powerful Java framework that can be used to build cloud-native applications. Authentication, TinyImg and Notification Service
Postgres A powerful, open source object-relational database system. Database
Swagger Swagger is a powerful tool for documenting APIs. Documentation
Go Go is a strong statically typed language with a powerful standard library FFmpeg Service
FFmpeg FFmpeg is a powerful multimedia framework that can decode, encode, transcode, mux, demux, stream, filter, and play almost anything that humans and machines have created. FFmpeg Service
RabbitMQ RabbitMQ is a powerful message broker that can be used to implement the message queue pattern. Message Queue
Socket.io Socket.io is a powerful tool for building real-time applications. Notification Service
Docker Docker is a powerful tool for creating, deploying, and managing containers. Deployment
GitHub Actions GitHub Actions is a powerful tool for automating workflows. CI/CD
SonarQube SonarQube is a powerful tool for code quality and security analysis. Code Quality
Nginx Nginx is a powerful web server that can be used to serve static files. Will be used as a load balancer. Deployment

GoF patterns adopted

Pattern Reason
Builder Will be used on Authentication Service to build the user during the sign up process
Adapter Will be used on FFmpeg Service and TinyImg Service to communicate with Message Queue
Strategy Will be used on FFmpeg Service to process the image
Singleton Will be used on FFmpeg Service to ensure only one instance of the message queue

Code quality and coverage

This will be handled by SonarQube during the CI/CD pipeline. All services must meet a quota of 100% code coverage. Yes, you read it right, 100%.

Communication protocols

Protocol Reason
REST Will be used to communicate between the user and the TinyImg Service and Authentication Service
WebSockets Will be used to communicate between the Notification Service and the user
AMQP Will be used to communicate between the TinyImg Service, FFmpeg Service, and the Message Queue

ALM - Application Lifecycle Management

The project backlog can be found in this repo project section.

About

Fully fledged image optimizer with FFmpeg + Go + Quarkus... (this is overkill I know :p)

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published