/reservations

One Day Reservations - an API written in Spring Boot

Primary LanguageJavaMIT LicenseMIT

1 Day Reservation Management System

Quick Start

This project was created to learn how to work with Spring JPA and Spring Boot in general.

If you have found a bug, please file an issue in Github/Issues

API Endpoints

The swagger ui can be accessed with the following link: https://localhost:8443/swagger-ui/index.html#/

'../' is a shortener for '/api/v1'

Endpoint Description
../reservations View all reservations, separated by completed, active, inactive GET
../reservations Submit a reservation for specified sub-category POST
../reservations/subcategories Uses query params to specify subcategory in which reservations are requested. Provides data about active and inactive reservations, together with reservation of user requesting GET
../categories List all categories GET
../subcategories List all subcategories GET
../subcategories/{id} Specify id of category to limit list of subcategories GET
../employee/controls/category Create new category POST
../employee/controls/category Update category name by id PATCH
../employee/controls/category Delete category by id DELETE
../employee/controls/subcategory Create new subcategory POST
../employee/controls/subcategory Update subcategory name by id PATCH
../employee/controls/subcategory Delete subcategory by id DELETE
../employee/rooms View all rooms data and the room employee is assigned to GET
../employee/controls/room Create new room with name POST
../employee/controls/room Delete room by id DELETE
../employee/controls/room Update room name PATCH
../employee/controls/room/user Assign self (current employee) to specified room id POST
../employee/controls/room/user Delete (de-assign) self from specified room id DELETE
../employee/controls/room/subcategory Assign a subcategory to the room (Same as users, room can have many subcategories assigned) POST
../employee/controls/room/subcategory Delete a subcategory from the room DELETE
../auth/registration Register by providing registration ticket POST
../auth/login Login with employee account POST
../auth/signout Sign out GET
../admin/controls/create_ticket Create a ticket with specified role POST
../admin/controls/users View list of users (email, role and id) GET
../admin/controls/tickets View list of tickets created GET
../admin/controls/user Delete user by id (cannot delete self) DELETE
../admin/controls/ticket Delete ticket by id DELETE

Installation

First you have to have a running Postgres instance with the parameters set in src/main/resources/application.yml.

Second run from the IDE, run or build the project using mvn.

To simply run the application

mvn spring-boot:run

To build package

mvn clean package

Run the application from jar

java -jar target/reservations-0.0.1-SNAPSHOT.jar