monleru / Online-Store

E-shop for educational purposes

Home Page:https://t.me/zufarexplained

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Online-Store

  • Rest API which simulates the work of an online store.
  • Based on AWS Services and Spring Boot ecosystem technologies.
  • 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
    • Mongo DB
    • AWS Dynamo DB
  • Queues
    • AWS SQS
  • Topics
    • AWS SNS
  • Containerisation
    • Docker
  • Monitoring
    • ElasticSearch
    • Logstash
    • Kibana
    • Filebeat
  • Logging
    • Slf4j
    • Logback

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

https://t.me/zufarexplained

License:MIT License


Languages

Language:Java 87.6%Language:Shell 10.6%Language:Dockerfile 1.8%