Skip to content

Kyran121/musicalog

Repository files navigation

Musicalog

Tech Stack

  • Java 17
  • Spring Boot 3
  • MongoDB
  • Mongo Express
  • LocalStack (S3) - cover image files wll be stored here, in a bucket called image-bucket

Prerequisites:

  • Docker - this project requires running a compose file to start up

What I would have done with more time:

  • Added existence check to prevent duplicate albums
  • Implemented transactional testing to ensure create/update album journeys are atomic
  • Added logging to aid debugging

Architecture

You can view my planning for this microservice in this LucidCharts doc

Document includes:

  • Data Schemas
  • Data Transfer Objects
  • Sequence Diagrams

To start application

To start S3 and MongoDB:

docker-compose up -d

To start musicalog:

./gradlew bootRun --args='--spring.profiles.active=local'

Or running through IntelliJ in the local profile.

To access Swagger

Once the application has started swagger can be accessed via: http://localhost:8080/swagger-ui.html

To stop application

First stop the application, and then run the following to stop S3 and MongoDB:

docker-compose down

To access S3

First you need to access the localstack container by running:

docker exec -it localstack-main /bin/bash

Then to list cover images in the image-bucket, you can run:

awslocal s3api list-objects --bucket image-bucket

To access MongoDB

MongoDB can be accessed through Mongo Express at http://localhost:8081

user: admin
pass: pass

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published