Skip to content
/ yas Public
forked from nashtech-garage/yas

YAS: Yet Another Shop, a sample microservices project in Java

License

Notifications You must be signed in to change notification settings

0xjavad/yas

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YAS: Yet Another Shop

YAS is a pet project aim to practice building a typical microservice application in Java

storefront-ci storefront-bff-ci backoffice-ci backoffice-bff-ci product-ci media-ci cart-ci customer-ci rating-ci location-ci order-ci inventory-ci tax-ci search-ci promotion-ci payment-ci payment-paypal-ci webhook-ci

Tentative technologies and frameworks

  • Java 21
  • Spring boot 3.2
  • Testcontainers
  • Next.js
  • Keycloak
  • Kafka
  • Elasticsearch
  • K8s
  • GitHub Actions
  • SonarCloud
  • OpenTelemetry
  • Grafana, Loki, Prometheus, Tempo

Local development architecture

Yas - local development architecture

Getting started with Docker Compose

  1. Get the latest source code
  2. Add the following records to your host file:
127.0.0.1 identity
127.0.0.1 api.yas.local
127.0.0.1 pgadmin.yas.local
127.0.0.1 storefront
127.0.0.1 backoffice
127.0.0.1 loki
127.0.0.1 tempo
127.0.0.1 grafana
127.0.0.1 elasticsearch
127.0.0.1 kafka
127.0.0.1 akhq
  1. Open terminal of your choice, go to yas directory, run docker compose up, wait for all the containers up and running

Warning: To run all the containers, you need a minimum of 16GB of RAM. Otherwise, you can only run the core services with this command docker compose -f docker-compose.yml up

  1. All the containers up and running then we start source connectors by run script, open any terminal window... go to the YAS root folder and type: ./start-source-connectors.sh
  2. Open your browser, now you can access the websites via https://storefront/; https://backoffice/ login with admin/password

Note: For the first run, the storefront and the backoffice might not work as expected. Stop all the containers (Ctrl + C) and run docker compose up again.

You might also want to explore:

  1. https://pgadmin.yas.local/. Account login: [email protected] / admin. Register a server: postgres, port 5432, username admin, password admin. The Postgresql server is also exposed to the host machine: servername: localhost, port: 5432, username: admin, password: admin
  2. https://api.yas.local/swagger-ui/ for all the REST API document of all the services
  3. https://identity/ for Keycloak console, account admin/admin
  4. https://grafana/ for observability: log, trace, matrix
  5. https://elasticsearch/ for calling Elasticsearch APIs

About docker-compose files

  1. docker-compose.yml for all core services
  2. docker-compose.search.yml for search service
  3. docker-compose.o11y.yml for observability services

Deploy to Kubernetes

https://github.com/nashtech-garage/yas/tree/main/k8s/deploy

Documentation

Contributing

By contributing, you agree that your contributions will be licensed under MIT License.

Screenshots

Backoffice & Storefront Observability
Yas Backoffice Yas Grafana Tracing
Yas Storefront Yas Grafana Metrics

About

YAS: Yet Another Shop, a sample microservices project in Java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 51.0%
  • TypeScript 30.4%
  • CSS 13.7%
  • Smarty 2.6%
  • Shell 1.3%
  • FreeMarker 0.6%
  • Other 0.4%