bphenriques / interview-challenge-employee-shift-api

Exploring Spring Boot and Hexagonal Architecture.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kotlin Spring Boot PostgreSQL Docker Kubernetes

Employee Shift API

The project's description is available in docs/requirements.md. This was made as part of a challenge in early 2021. Let me know how you would approach the project!


The application explores:

You will find my notes on the project under docs/project-notes.md, and notes regarding production readiness under docs/production-checklist.md.

Development

Requirements:

  • Java 11

Building

Docker image:

$ make build

Locally:

$ make build-local

Running

Kubernetes

Create if absent the docker images:

$ make build

Then follow the k8s guide at k8s/README.md.

Docker-Compose

$ make run

Locally

$ make run-local

What is available

Application:

Management:

Note: Kubernetes uses different ports. See the guide there to see which ports it uses.

Testing

As it runs in the continuous-integration leveraging local containers using docker-compose:

$ make test

In order to run locally (for speed at the expense of slight inaccuracy):

$ make test-dependencies-up

You may now run the test gradle target or directly in IntelliJ.

Nail polish

Linter:

$ make lint

Format:

$ make format

Project Structure

  • domain: Business rules.
  • infrastructure: Interaction with the infrastructure (Database).
  • web-app: Exposes HTTP interface.
  • common-test: As the name says.
  • db: Data migrations scripts.
  • docs: Relevant documentation.
  • ci: Continuous integrations scripts.
  • buildSrc and gradle: Relevant folders to build the project itself.
  • k8: Folder demonstrating how to deploy the application on K8S.

About

Exploring Spring Boot and Hexagonal Architecture.

License:MIT License


Languages

Language:Kotlin 95.0%Language:Makefile 2.5%Language:Dockerfile 1.3%Language:Shell 1.3%