A project to learn modern web technologies – backend for an online shop.
You can run the project easily using Docker:
docker-compose up
After that, you can check Swagger UI at http://localhost:8080/swagger-ui and http://localhost:8081/swagger-ui for the API description.
If you want to check it out locally, you should provide database like this:
docker run -it -e POSTGRES_PASSWORD=123 -e POSTGRES_USER=user -e POSTGRES_DB=mydb -p 5432:5432 postgres:9.6
After this, you can run ./gradlew :product:run
and ./gradlew :auth:run
. Don't forget about setting env like in docker-compose: DB_USER=user;DB_HOST=localhost;DB_PORT=5432;DB_DB=mydb;DB_PASSWORD=123;AUTH_PORT=8081;AUTH_HOST=localhost
.
- Public repo.
- Description.
- Architecture graph.
- Swagger UI.
- Docker-compose.
Rest API:
- Create a product.
- Remove a product.
- Return a list of products.
- Return a product.
- Edit a product.
"Product" entity:
- Name.
- ID.
- Type.
Extra points:
- Pagination in list of products.
- Data storage in DB.
- Versioning.
- Logging.
- Data storage in DB.
- Docker-compose.
- Registration (via login+password).
- Auth (change login+password to access+refresh tokens).
- A way to change a refresh token to new access+refresh tokens.
- Validation endpoint.
- Products changing endpoints must be available only with auth tokens.
- Replace token validation to gRPC variant.
- Make protobuf files shared (extract to a module).
- Hash passwords in storage.
- Add roles: admin and user.
- Admin can create, edit, remove, and view products. Also, they can create a new administrator (however, first admin can be created without admin rights).
- User can view products.