Skip to content

davidrodriguezlosada/pilotes-ordering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pilotes ordering

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

About the project

Simple Spring project with a small REST API.

The project represents an ordering system that allows external users to order pilotes, a Majorcan recipe consisting of a meatball stew. Each time an order is created or modified, the project notifies the external system that will handle the cooking of the pilotes. Currently the notification system is handled just inserting the events in the database in JSON format, but this could be handled by sending the notifications to a message queue system, like RabbitMQ or Kafka.

The project includes an example implementation of some features like:

(back to top)

Built with

(back to top)

Getting started

Prerequisites

You will need Java JDK 11 to execute this project. You can use the distribution you prefer, if you don't have it installed yet, you can get the one provided by AdoptOpenJDK.

This project includes a maven wrapper, so you won't have to install Maven.

(back to top)

Installation

  1. Clone the repo
  2. Execute a Maven install to download all dependencies and construct the project:
./mvnw clean install

if you are using Linux or

mvnw.cmd clean install

if you are using Windows.

  1. Launch the application
./mvn spring-boot:run

(back to top)

Building a docker image

You can create a docker image of the project by following this steps:

./mvnw clean package
docker build --tag pilotes-ordering:latest .
docker run -p8080:8080 pilotes-ordering

(back to top)

Usage

When the application launches, it already has a list of four clients already created to make testing easier. They have the following codes: 0001, 0002, 0003 and 0004.

Some endpoints are protected by a simple HttpBasic authorization. The user and password needed to access these endpoints are:

  • user/userPass: with the role USER
  • admin/adminPass: with the role ADMIN

(back to top)

API documentation

API documentation can be accessed on http://localhost:8080/swagger-ui.html once you launch the application.

(back to top)

License

Distributed under the Apache License 2.0. See LICENSE file for more information

(back to top)

Contact

David Rodríguez Losada - [email protected] - LinkedIn

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published