Skip to content

API for a renting website. Features layer architecture with routes, and Spring Security.

Notifications You must be signed in to change notification settings

clementolive/project_3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChâTop - Backend

This is an API for a rental website, as an Openclassroom project.

Documentation

For using Springdoc documentation : https://springdoc.org/v2/

The OpenAPI description will be available at the following url for json format: http://localhost:3001/v3/api-docs

API Documentation : http://localhost:3001/swagger-ui/index.html#/

Tools

This project uses:

  • Spring Boot
  • Spring Security
  • Mapstruct for repository Mapper Find more info on pom.xml for dependencies.

It is used in combination with a MySQL database hosted by Wamp for development purposes. The development involved Postman to test the API.

File structure

This is a layer-based architecture, Controller-Service-Repository-Database.

How to use

  1. Setup your database :
  1. Setup the backend : clone this repository
  1. Setup the frontend :
  1. Test the app
  • Run the associated Postman files in Postman from Openclassroom project page. You will need some changes in the JSON (or follow this link : https://api.postman.com/collections/26119928-5373f50a-bd58-470f-9474-f11f32a62863?access_key=PMAT-01GXS04JCZBWPQ0SPTY82H1ZNN) I needed the following changes to make it work :

  • changed "email" instead of "login" in /login route. (check Angular form)

  • removed Authorization Inherited from /register route. No JWT token should be sent when registering.

  • "Lorem ipsum" description is too long in PUT request, and also in /create request.

  • There is no slash in the end of api/messages (check src/app/features/rentals/messages.sercive.ts in Angular)

  • Same way, no "/1" at the end of api/rentals for CREATE request. Remember to add a picture in the request body.

  • Or test manually on the adress http://localhost:4200/rentals

  • You should get a JWT token on login or register. Use this token in headers to authenticate in any request.

About

API for a renting website. Features layer architecture with routes, and Spring Security.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages