https://github.com/mmilk23/image_unmirrorer
Image Unmirrorer is an API that allows users to upload an image and receive a horizontally mirrored version in return. Developed with Elixir, this project can be easily run using Docker, making it simple and quick to set up.
https://github.com/mmilk23/image_unmirrorer
docker docker-compose elixir image-editing-api image-manipulation image-mirroring image-processing microservices openapi
Last synced: 2 months ago
JSON representation
Image Unmirrorer is an API that allows users to upload an image and receive a horizontally mirrored version in return. Developed with Elixir, this project can be easily run using Docker, making it simple and quick to set up.
- Host: GitHub
- URL: https://github.com/mmilk23/image_unmirrorer
- Owner: mmilk23
- License: mit
- Created: 2024-11-23T23:20:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-29T04:45:51.000Z (about 1 year ago)
- Last Synced: 2025-04-29T05:29:27.924Z (about 1 year ago)
- Topics: docker, docker-compose, elixir, image-editing-api, image-manipulation, image-mirroring, image-processing, microservices, openapi
- Language: Elixir
- Homepage:
- Size: 15.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Unmirrorer
[](https://github.com/mmilk23/image_unmirrorer/actions)
[](https://codecov.io/gh/mmilk23/image_unmirrorer)
[](https://coveralls.io/github/mmilk23/image_unmirrorer)

[](https://github.com/mmilk23/image_unmirrorer/commits/main)
The **Image Unmirrorer**
This project provides a set of APIs for image manipulation and processing, currently under active development. The /mirror endpoint allows users to upload an image and receive a horizontally mirrored version, while the /grayscale endpoint returns a grayscale version of the uploaded image.
Developed in Elixir and containerized with Docker, the project is easy to set up and deploy. It serves as an excellent example application for newcomers to Elixir programming, demonstrating fundamental concepts in API design and image processing.
## Features
- Mirrors/grayscale uploaded images (supports JPEG and PNG formats).
- Easy integration via RESTful API.
## Live Demo 🌟
Explore the features of the application through the link below:
🔗 [Try the Live Demo](https://image-unmirrorer.gigalixirapp.com/testmirror.html) (https://image-unmirrorer.gigalixirapp.com/testgrayscale.html)
### OpenAPI Specification
To access the API specification (OpenAPI), click the link below:
📜 [View OpenAPI Spec](https://image-unmirrorer.gigalixirapp.com/openapi.json)
## How to Run the Project
### Requirements
- Docker
- Elixir (if you wish to run it locally without Docker)
### Running with Docker
1. Clone the repository:
```sh
git clone https://github.com/mmilk23/image_unmirrorer.git
cd image_unmirrorer
```
2. Build and run the container:
```sh
docker build -t image_unmirrorer .
docker run -p 4000:4000 image_unmirrorer
```
3. Access the application in your browser:
```
http://localhost:4000
```
### Running Locally (Without Docker)
1. Clone the repository:
```sh
git clone https://github.com/mmilk23/image_unmirrorer.git
cd image_unmirrorer
```
2. Install dependencies:
```sh
mix deps.get
```
3. Compile the project:
```sh
mix clean
mix compile
```
4. Run the application:
```sh
mix run --no-halt
```
5. Access the application in your browser:
```
http://localhost:4000
```
## API Endpoints
- **POST /mirror**: Receives an image and returns its horizontally mirrored version.
- **POST /grayscale**: Receives an image and returns a grayscale version of the image.
- **GET /openapi.json**: Provides the OpenAPI specification for the API.
### Example Request
```sh
curl -X POST http://localhost:4000/mirror -H "Content-Type: image/jpeg" --data-binary @your_image.jpg -o image-mirror.jpg
```
## Testing
You can test the application by accessing the `testmirror.html` file in your browser:
```
http://localhost:4000/testmirror.html
http://localhost:4000/testgrayscale.html
```
Alternatively, you can use a CURL command:
```sh
curl -X POST -H "Content-Type: image/jpeg" --data-binary @your_image.jpg http://localhost:4000/mirror --output image-mirror.jpg
```
To run coverage tests:
```sh
mix test --cover
```
## Technologies Used
- Elixir
- Docker
## Contributing
Contributions are more than welcome!
Feel free to submit a pull request or open an issue to discuss improvements or report bugs.
## License
This project is licensed under the MIT License.
## Disclaimer
This project was developed as part of a system architecture playground and is not recommended for production environments without an in-depth review.
If you found this project helpful, please consider giving it a star ⭐️.
## Contact
For more information, visit the [GitHub repository](https://github.com/mmilk23/image_unmirrorer).