Commit f725ced6 authored by Daniel Puchala's avatar Daniel Puchala
Browse files

feat: readmen updated

parent 086ca1b3
......@@ -4,15 +4,55 @@
# Instructions
### Milestone 1
## How to run the app
- To **compile project and run entity and DAO tests** use: `mvn clean install`
- Make sure your Java is set to `version 17`
### With docker
- Make sure your docker application is running
- `docker-compose up --build` build both FE and BE and runs it
- Webpage will be available on http://localhost:8081/pa165
### Without docker
Start backend
- `mvn clean install` Compiles source
- `mvn -f core/pom.xml spring-boot:run` Runs the app
Start frontend (In another terminal)
- `cd frontend` Change to folder with FE
- `npm i` Install dependencies
- `npm run dev` Start the FE application
Webpage will be available on http://localhost:8081/pa165
###Users
- There are 3 sampled users, "admin" with password "admin" and ADMIN role. "pepa" with password "pepa" with BASIC_USER role, "karel" with password "karel" with BASIC_USER role.
- User not logged in can view movies, get recommended movies for a movie.
- Basic user can also write a review and delete his own review.
- Admin can write reviews and delete all reviews.
### Testing the app
- Go to http://localhost:8080/pa165/rest/swagger-ui.html
- You need to authenticate, use token `eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjei5maS5tdW5pLnBhMTY1Lm1vdmllcmVjb21tZW5kZXIiLCJpYXQiOjE2NTMzMTM4MjEsInN1YiI6IjEiLCJleHAiOjE2NTM0MDAyMjEsInJvbGUiOiJBRE1JTiIsIm5hbWUiOiJhZG1pbiJ9.douDjKgiV02Ct8FgBrAYnazNjXsPd1iPjdYiS-xFjHk`
- For each method you will have an option to try it out
**Alternatively**
- Login in as user admin
`curl -X POST "http://localhost:8080/pa165/rest/login" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"name\": \"admin\", \"password\": \"admin\"}"`
- Get all movies
`curl -X GET "http://localhost:8080/pa165/rest/movies" -H "accept: */*"`
- Get all reviews for movie with id 18 (The Shawshank Redemption)
`curl -X GET "http://localhost:8080/pa165/rest/reviews/search/18" -H "accept: */*"`
# About Project
- **Name**: Movie Recommender Catalogue
- **Technologies**: Java 17, Spring, Hibernate, Maven, (...?)
- **Technologies**: Java 17, Spring, Hibernate, Maven, React + Typescript
- **Developers**:
- Maxim Svistunov @xsvistun
- Martin Bartoš @xbartos5
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment