/carmarketplace

carmarketplace app demonstrates a spring boot microservices app with everything you need to run it in PRODUCTION.

Primary LanguageJava

Car Marketplace

Microservices App for Car Marketplace

Status

apigateway
build    codecov    Docker Image Version (latest by date)    Docker Image Size (latest by date)

car-info-service
build    codecov    Docker Image Version (latest by date)    Docker Image Size (latest by date)

car-listing-service
build    codecov    Docker Image Version (latest by date)    Docker Image Size (latest by date)

user-service
build    codecov    Docker Image Version (latest by date)    Docker Image Size (latest by date)

discovery-server
build    codecov    Docker Image Version (latest by date)    Docker Image Size (latest by date)

config-server
build    codecov    Docker Image Version (latest by date)    Docker Image Size (latest by date)

Related Git Repos

DockerHub Images

Technologies Used

  • Spring Boot 3.x
  • Spring Cloud 2023.x
  • Spring Cloud Config
  • Netflix Discovery
  • Spring Cloud Gateway
  • JUnit 5
  • Open API Docs
  • Model Mapper
  • Java 17
  • Lombok
  • Jacoco Code Coverage
  • Docker
  • Docker Compose
  • Maven
  • Spring JPA
  • H2 database
  • MySQL

Features

  • H2 database for running in test profile for execution of integration testing
  • JUnit 5 for unit and integration testing
  • Netflix Discovery service for automatic service discovery
  • Spring Cloud Config Server for centralised config
  • Swagger is included in all services
  • Aggregated Swagger Documentation

Architecture

TODO

Environment Build

  • Builds are automated via GitHub Actions
  • For each service build scripts are present in .github/workflows/build.yml
  • Build process
    • checkout -> build -> test -> codecov -> docker image -> upload to dockerhub

Environment Deployment

  • TODO

Local Build

  • Local Environment Requirements

    • Install and ensure MySQL database IS running.
    • Check application.yml for connection properties
    • Create DB Schemas for Services that need datastore.
  • Local Build Steps

  • First build the parent pom. This is needed before others can be built.
    • mvn -f pom.xml install -N
  • Build again to also build the core module. Core module is a dependency across other services.
    • mvn -f pom.xml install
  • Now you can go and build all services under carmarketplace repos.

Local Development