Skip to content

shaydaroglu/booking-api

Repository files navigation

booking-api

Kotlin based Spring Boot application.

Table of Contents

Resources

What does it include/use?

  • Gradle 7.5.1
  • Java 18
  • Spring Boot 2.7.5 (Compatible with Java 17 && Kotlin)

Dependencies included with Spring Boot Framework

  • Spring Web package (Build web, including RESTful, applications using Spring MVC. Uses Apache Tomcat as the default embedded container.)
  • Spring Boot Actuator (Supports built in (or custom) endpoints that let you monitor and manage your application - such as application health, metrics, sessions, etc.)

About the Architecture

The base folder structure was based on Hexagonal Architecure: image

Getting started

Prerequisites

Required JDK

  • JDK

    • Download the latest version compatible with Kotlin.
  • At the moment the Docker development is slow, we recommend using IntelliJ IDEA for the application, and the rest of dependencies using Docker

Required Tools

  • Docker
    • Also available via HomeBrew, brew install docker docker-compose && brew cask install docker
  • IntelliJ IDEA

Configure your IDE

  • As stated, we use IntelliJ IDEA to spin up the application, the IDE should be smart enough to configure everything except environment variables, you need to expose these through:
    • Edit configuration (BookingApplication) -> Modify Options -> Operating System -> enable Environment Variables.

Development

Clone this repository:

git clone git@github.com:shaydaroglu/booking-api.git

Then migrate the database with setting active profile as migration as following:

--spring.profiles.active=migration

After this is done (or if not needed), run the service using your IDE, you should be able to load (http://127.0.0.1:8080/healthcheck) and be greeted with:

{
	"booking-api": "is_alive"
}