danvergara / morphos

Self-hosted file converter server
MIT License
750 stars 33 forks source link

Add abstract factory #19

Closed danvergara closed 7 months ago

danvergara commented 7 months ago

Description

I'm about to add features to convert files to documents and vice versa, so I'll need to add some design patterns to come up concrete types based off their family types.

I made a diagram to depict how this new change works: File_Converter_Abstract_Factory

To put it another way, this change aims to provide a way to select between different file kinds, such as images, documents, videos, etc. Screenshot from 2023-12-10 16-50-09

Today, there's only support for images. Document support will be added in upcoming Pull Requests.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

I've added tests to validate the new behavior.

Checklist: