Coder Social home page Coder Social logo

selimyanat / cola-day Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 3.05 MB

A basic implementation of a room reservation system with Spring boot that serves a REST API that meet HATEOAS standard

Java 3.24% Dockerfile 1.21% Shell 2.66% Makefile 2.06% Smarty 2.13% Kotlin 88.70%
spring-boot spring-data-jpa aop-aspects hateoas rest-api java maven junit5 spring-data-rest helm-charts

cola-day's Introduction

example workflow

Quality Gate Status

Cola day: Book your room !

https://www.freepik.com/vectors/boardroom

Boardroom vector created by vectorpocket

Introduction

The goal of this application is to showcase a CRUD application for a booking room system with a limited set of requirements, that follows the best practices of modern software development such as:

Business problem

The business problem addressed by this application follows this narrative:

Two companies, COKE and PEPSI, are sharing an office building. Tomorrow is COLA day (for one day), that the two companies are celebrating. They are hosting a number of business partners in the building.

In order to optimize space utilization, they have decided to set-up a joint booking system where any user can book one of the 20 meeting rooms available, 10 from each company (C01, C02, ... , C10 and P01, P02, .... , P10).

The two companies would prefer that they do not have to use a central booking system for this (as they do not trust each other or anyone else to not take advantage of the situation) - but it’s up to you to decide if you want to implement this functionality or not, and how.

The booking system has the following functionalities:

● Each company has its own room booking front-end application (note: you may develop only one of them)

● Users can see hourly meeting room availabilities of any of the 20 meeting rooms on COLA day (8am-9am, 9am-10am, etc.)

● Users can book meeting rooms by the hour (first come first served)

● Users can cancel their own reservations

Continuous Integration

Important

  • Git hooks is used to keep the commit log consistent by following a conventional message structure with git-hooks/commit-msg hook, git-hooks/pre-commit and git-hooks/pre-push hooks by running both unit and integration tests before pushing the code to the remote.

  • Jgitver is used to automatically compute the version of your project leveraging the git history. It does not pollute the project’s git history like the maven release plugin.

  • The Rest API documentation uses Spring rest docs to generate the documentation out of the tests. Github page is used as a hosting system for the documentation.

Feature

CI Feature

Release

CI Release

Design

Coladay is a self-contained CRUD application based on Spring Boot that runs an embedded servlet container that expose a REST API. The following is the technology stack used to develop this application:

Support of Grafana and Prometheus is only supported with Dockcer-compose

Technology stack

API

The application requires a user authentication. You can use the users accounts preconfigured in the application (in the database) user 1 and user 2 with their corresponding password password 1 and password 2. You can refer to the API documentation here !

Run

With Docker-Compose

Navigate to the cola-day source directory then issue the following command:

make run-in-docker-compose

With Kubernetes

Navigate to the cola-day source directory then:

  • Build and import coladay dependency by running the following command:
make build-bitnami-chart
  • Deploy (or upgrade) the application to kubernetes by running the following command:
make deploy-to-kubernetes
  • Expose the application outside kubernetes by using a port-forward with the following command:
export POD_NAME=$(kubectl get pods --namespace coladay -l "app.kubernetes.io/name=coladay-chart,app.kubernetes.io/instance=coladay" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace coladay $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
kubectl --namespace coladay port-forward $POD_NAME 8080:$CONTAINER_PORT 

Monitoring and dashboards

If you run the application with docker-compose , you can access Grafana and Prometheusrespectively at http://locahost:3000 and http://localhost:7070. The following is a screenshot of the application dashboard available in Grafana that leverages Micrometer dashboard for JVM application (Java, Spring Boot, Micronaut) and a custom dashboard that shows business metrics

Operational metrics

operational metrics dashboard

Business metrics

business metrics dashboard

cola-day's People

Contributors

dependabot[bot] avatar galactik05 avatar selimyanat avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

gemacjr hpfloresj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.