Skip to content

TsimurSh/vending_maschine

Repository files navigation

🍱 Vending machine

🐲 Tech Stack

  • Kotlin
  • Spring Boot
  • Spring Cloud
  • H2 database
  • Gradle
  • Caffeine Cache

🚀 Run

  • CLI:
./gradlew -q
  • Or just run it on your IDE

❗️ Please, note that this project requires Java 17. If you have other version of java on your local machine - change the version in gradle.properties file in the root:

java=17

Project configuration

You are able to configure machine application in file machine/src/main/resources/application.yml:

api:
  cors-allowed: http://localhost:3000

Also in this file you can change cache expiration (10s):

spring:
  cache:
    caffeine.spec: expireAfterWrite=10s

📦 Solution

gateway

Services

Name Description
eureka-server Service registration and discovery
gateway The tool provides out-of-the-box routing mechanisms often used in microservices applications as a way of hiding multiple services behind a single facade.
machine API for a vending machine, allowing users with a “seller” role to add, update or remove products, while users with a “buyer” role can deposit coins into the machine and make purchases.

Tests

Code is tested with integration tests. You can run it with your IDE or with CLI:

./gradlew test

📕 API Documentation

When application is running the API documentation will be available at http://localhost:8080/swagger-ui/index.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published