Skip to content

An example approach for implementing a Clean/Hexagonal Architecture.

Notifications You must be signed in to change notification settings

jmaciel33/comedy-club

Repository files navigation

Comedy Club

Stack

  • Java
  • Spring Boot
  • CockroachDB

Architecture

The main feature of “Hexagonal Architecture”, as opposed to the common layered architecture style, is that the dependencies between our components point “inward”, towards our domain objects:

Hexagonal Architecture

The hexagon is just a fancy way to describe the core of the application that is made up of domain objects, use cases that operate on them, and input and output ports that provide an interface to the outside world.

How to?

Follow this steps before launch application

Environment variables

Run

This will 🚀 start the microservice

$ ./mvnw spring-boot:run

Run on docker 🐳

Build image 🔨

docker build . -t comedy-club-api:latest

It will start 🚀 the database

docker run -d \
--name=comedy-club \
-p 26257:26257 -p 8083:8080 \
cockroachdb/cockroach:latest start-single-node \
--insecure

It will start 🚀 the container

docker run -d -p 8080:8080 -it --name comedy-club-api \
comedy-club-api:latest

Run in Postman

Run in Postman

References

Hexagonal Architecture with Java and Spring

Buckpal

About

An example approach for implementing a Clean/Hexagonal Architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published