Code Monkey home page Code Monkey logo

tourguide-users's Introduction

* * * * * * * * * made-with-sphinx-doc

TourGuide - Users

  • OpenClassrooms - Project 8 / TourGuide App - Users microservice

  • The application 'TourGuide' is run with Java 11, Gradle and Spring Boot v2.4.0 .

  • This app can be used on mobile and pc, allows you to obtain information on tourist attractions, obtain rewards with personalized offers, and proposals for attractions based on geolocation.


Screenshot


Technical

TourGuide is composed of 4 microservices:

  1. API Gateway: https://github.com/ludovictuccio/TourGuide-Api_Gateway
    The API Gateway, used on port 8080.

  1. Users: https://github.com/ludovictuccio/TourGuide-Users
    The main application, that contains TripPricer.jar, used on port 9001.

  1. GPS: https://github.com/ludovictuccio/TourGuide-GPS
    The microservice used for the geolocation, that contains GpsUtil.jar, used on port 9002.

  1. Rewards: https://github.com/ludovictuccio/TourGuide-Rewards
    The microservice used for calculate the rewards, that contains RewardsCentral.jar, used on port 9003.

Feign is used for the microservices relations.


Installing

  1. Install Java: https://www.oracle.com/java/technologies/javase-downloads.html

  2. Install Gradle: https://gradle.org/install/

In your IDE:

  1. Install Lombok in your IDE before import project: https://www.baeldung.com/lombok-ide
    You must execute an external JAR.

To run microservice:

  • With your IDE: refer to application.properties to set valid proxies url

  • With Docker: the jar hosted on GitHub is for a Docker deployment ("localhost" changed with the image Docker)

For Docker deploiement:

  1. Install Docker Desktop:
    https://docs.docker.com/docker-for-windows/ or https://docs.docker.com/docker-for-mac/

  2. To use the Dockerfile, you must run on the package root:

  • docker build -t tourguide-users .
  • docker run -d -p 9001:9001 tourguide-users
  1. To run all microservices on the same network, with a Docker-Compose deploiement:
    If you want to deploy all TourGuide microservices, use the docker-compose.yml on the package root, after each Dockerfile deployment for the 4 microservices, running:
  • docker network create tourguide-net
  • docker-compose up -d

API documentation

Endpoints

POST - Add new user
http://localhost:8080/user
Need body with: userName, phoneNumber & emailAddress

PUT - Update user preferences
http://localhost:8080/user/updatePreferences
Need parameter: userName
Need body with: tripDuration, ticketQuantity, numberOfAdults & numberOfChildren

GET - Get all user informations
http://localhost:8080/user/getUser
Need parameter: userName

GET - Get user location (longitude/latitude)
http://localhost:8080/user/getLocation
Need parameter: userName

GET - Get all user locations (with user UUID, longitude and latitude)
http://localhost:8080/user/getAllUsersLocations

GET - Get the 5 closest attractions (from the last user visited location in its geolocalisation history)
http://localhost:8080/user/getTheFiveClosestAttractions
Need parameter: userName

GET - Get user trip deals (5 personalized offers)
http://localhost:8080/user/getTripDeals
Need parameter: userName

GET - Get the list of all user rewards
http://localhost:8080/user/getRewards
Need parameter: userName

GET - Get all cumulated rewards points (an integer)
http://localhost:8080/user/getAllUserRewardsPoints
Need parameter: userName

Testing

The app has unit tests and integration tests written.
You must launch gradle test or build (all reports available in "/build").

tourguide-users's People

Contributors

ludovictuccio avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.