zyv42 27a91b5cc2 Update README.md | %!s(int64=3) %!d(string=hai) anos | |
---|---|---|
seb-app-backend | %!s(int64=3) %!d(string=hai) anos | |
seb-app-frontend | %!s(int64=3) %!d(string=hai) anos | |
.gitignore | %!s(int64=3) %!d(string=hai) anos | |
README.md | %!s(int64=3) %!d(string=hai) anos | |
docker-compose.dev.yml | %!s(int64=3) %!d(string=hai) anos | |
docker-compose.yml | %!s(int64=3) %!d(string=hai) anos |
An easy way to get recommendations regarding SEB products
This is a simple application, which ties together Spring Boot, Angular and Docker to provide smooth and consistent experience with neat user interface.
Provides management and backend validation for both users and products.
Method | Path | Description | User role |
---|---|---|---|
POST | /api/auth/signin | Authenticate user | Anonymous |
POST | /api/auth/signup | Register new user | Anonymous |
GET | /api/products/search?ageBracket&incomeBracket&student | Get the products conforming with criteria | User |
GET | /api/products | Get all products | Product Manager |
GET | /api/products/{productName} | Get specified product data | Product Manager |
POST | /api/products | Create new product | Product Manager |
PUT | /api/products/{productName} | Update specified product | Product Manager |
DELETE | /api/products/{productName} | Delete specified product | Product Manager |
Contains general user input logic and its validation.
This solution doesn't utilize any sort of database, thus all data is stored in memory with some default presets of data provided.
Security is implemented with JWT Authentication. Both backend endpoints and frontend routes are secured. There is also a full Login and User Registration functionality with form validation.
There are two predefined user roles: User and Product Manager. Product Manager role is obtainable only by using the default product_manager account(password="password"), while all newly registered users have only a role of User.
You can always look up default users on the Home page of the application.
Username | Password | Role | Description |
---|---|---|---|
customer | password | ROLE_USER | Can get product recommendations |
product_manager | password | ROLE_PRODUCT_MANAGER | Can get product recommendations and manage products |
Just copy 'docker-compose.yml', go to the folder with the downloaded file and run:'docker-compose up'. In this case, the latest images will be pulled from Docker Hub. After that just launch your browser and go to 'http://localhost:4200'.
If you'd like to build images yourself (with some changes in the code, for example), you have to clone repository and build backend service artifact with maven: 'maven package [-DskipTests]'. Then, run 'docker-compose -f docker-compose.dev.yml up'.