Image Service is responsible for uploading and managing profile images for cryptocurrencies (a separate service altogether). The application is prepared to handle various images and types in the future, but currently, it is limited to a demo for uploading the main (profile) picture only.
To build and run the application, you need:
- JDK 22 or higher
- Apache Maven
- Spring Boot 3.3.0 or higher
- Docker (for running the MongoDB database)
-
Clone the repository:
git clone https://github.com/Memtize/memtize-image-service.git cd memtize-image-service
-
Set up MongoDB with Docker:
docker run --name cryptoImages -p 27017:27017 -e MONGO_INITDB_DATABASE=cryptoImages -v mongo-data:/data/cryptoImages -d mongo
-
Build the application:
mvn clean install
-
Run the application with default profile:
The application exposes the following endpoints:
GET /api/crypto/{cryptoId}/pictures/main
- Retrieve the main profile picture by crypto ID.POST /api/crypto/{cryptoId}/pictures/main
- Upload the main profile picture for a given crypto ID.DELETE /api/crypto/{cryptoId}/pictures/main
- Delete the main profile picture for a given crypto ID.
- Support for multiple image types and categories.
- Enhanced image management features.