Giter VIP home page Giter VIP logo

assignment3-backend's Introduction

Assignment3-Backend

Description

This project is our solution to assignment 3, backend. When running the project you can perform the HTTP requests according to the lab specification, just go to the right endpoint in something like postman and perform the correct HTTP method. When an endpoint is specified and a HTTP method is performed, for example in Postman, then a controller will map to that specific endpoint, and method. What then happens is that controller will perform a HTTP request with the user of services, which uses repositories that implement JPA repository. DTOs are also used in services to expose specific data encapsulating the entity models (Character, Movie, Franchise). Mapper objects are used to map from DTO to the entity. It is often said though that a picture can say more than 1000 words and so here below is a diagram of the structure:

Life Cycle of A HTTP Request (Class Diagram)

diagram drawio

Endpoints (where {id} is a specific primary key id)

Here are some endpoints that can be used to test the functionality of the project.

Franchise Endpoints:

  1. Get all Characters in franchise: (GET) localhost:8080/api/v1/franchises/characters/{id}

  2. Get a specific franchise: (GET) localhost:8080/api/v1/franchises/{id}.

  3. Get all franchises: (GET) localhost:8080/api/v1/franchises

  4. Post a franchise: (POST) localhost:8080/api/v1/franchises

  5. Update a franchise: (PUT) localhost:8080/api/v1/franchises/{id}

  6. Delete a franchise: (DELETE) localhost:8080/api/v1/franchises/{id}

  7. Update movies in a franchise: (PUT) localhost:8080/api/v1/franchises/movies/{id}

Movie Endpoints:

  1. Get all Movies: (GET) localhost:8080/api/v1/movies

  2. Get specific Movie: (GET) localhost:8080/api/v1/movies/{id}

  3. Post a new Movie: (POST) localhost:8080/api/v1/movies

  4. Update a new Movie: (PUT) localhost:8080/api/v1/movies/{id}

  5. Delete a Movie: (DELETE) localhost:8080/api/v1/movies/{id}

  6. Update characters in Movie: (PUT) localhost:8080/api/v1/movies/characters/1

Character Endpoints:

  1. Get all Characters: (GET) localhost:8080/api/v1/character

  2. Get a specific Character: (GET) localhost:8080/api/v1/character/{id}

  3. Post a new Character: (POST) localhost:8080/api/v1/character/{id}

  4. Update a Character: (PUT) localhost:8080/api/v1/characters/1

  5. Delete a Character: (DELETE) localhost:8080/api/v1/characters/1

Installation

  1. Install Java version 17 (or later versions).
  2. Install Maven (you can run the command mvn -v to see if you have it installed).
  3. Install SpringBoot.
  4. Install DBeaver or PGadmin.
  5. Install PostgresSQL.
  6. Create an account at postman (or any other similar service) to test HTTP methods like POST.

Authors

Vendela Österman

August Danell Håkansson

assignment3-backend's People

Contributors

vendelaosterman avatar augustdanell avatar

Watchers

 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.