Skip to content

shpali4/Online-Store

 
 

Repository files navigation

Online-Store

  • Rest API which simulates the work of an online store.
  • Based on Spring Boot ecosystem technologies and PostgreSQL database.
  • Created for learning purposes.

Prerequisites

  • JDK 17
  • Apache Maven 3.6.3
  • Docker Desktop

Tech stack

  • Spring
    • Boot 3
    • Data
    • Security
  • Security
    • JWT
    • TLS
  • Databases
    • PostgreSQL
  • Containerisation
    • Docker
  • Monitoring
    • ElasticSearch
    • Logstash
    • Kibana
    • Filebeat
  • Logging
    • Log4j2

Getting the project up and running

Get project running by

docker-compose --profile dev up

If this doesn't work use

docker compose --profile dev up

Working with REST API

  • OpenAPI Schema

    Schema in json

    http://localhost:8083/api/docs/schema

    Schema in yaml

    http://localhost:8083/api/docs/schema.yaml
  • Swagger UI page

    http://localhost:8083/api/docs/swagger-ui

Obtaining a token

Using Postman get Bearer token by running

http://localhost:8083/api/auth/register

Copy the token and insert into Auth tab

Testing authorisation

Run this GET request to test authentication

http://localhost:8083/api/products

Docker (Should be fixed)

Build the Docker image

docker build -t zufar_sunagatov/online-store:v1 .

Run the Docker image

docker run -it --rm -p 8081:8081 --name online-store zufar_sunagatov/online-store:v1

Push the image to Docker

docker login --username=zufar_sunagatov
docker tag zufar_sunagatov/online-store:v1 zufar_sunagatov/online-store:v1
docker push zufar_sunagatov/online-store:v1

Override our code style

1. Press ⌘ + , or Ctrl+Alt+S to open the IDE settings and select Editor | Code Style.
2. Check the box Enable EditorConfig support.
3. Apply the changes and close the dialog.

About

E-shop for educational purposes

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 93.5%
  • Shell 4.9%
  • Dockerfile 1.6%