This is a main repo of YetAnotherMarketplace project. YetAnotherMarketplace is a marketplace website currently it has only a few features: Register and login, Basket linked to user, Products sorting and filtering. This project has short video overview.
To deploy an app do following steps:
- Run
git clone https://github.com/NotIlya4/YetAnotherMarketplaceor if you want to download all services source code rungit clone --recursive https://github.com/NotIlya4/YetAnotherMarketplace. - Run
cd YetAnotherMarketplace. - Write in console
docker-compose up.
Now application fully deployed and you can navigate:
http://localhost:4200Frontend.http://localhost:5003/swagger/index.htmlGateway swagger docs.
Frontend is written using Angular. I tried to make it modular so i extracted some components to make them presentational components. It has several pages:
ShopThis is a products list page that contains sorting, filtering, searching and pagination for products.Login/RegisterThis is just a login/register form.BasketThis is a basket overview page. There you can increase, decrease or delete product from basket.
Frontend repository has github actions workflow that publishes angular image to dockerhub.
Backend consists of several REST API Services that work behind a gateway. Some transient or not very important data stores in redis (refresh tokens and user's baskets). All services contain unit and integration tests. Services:
GatewayGenerates request id and authorizes several endpoints.AccountServiceAuthorizes users by jwt and refresh tokens.BasketServiceManages baskets that bound to users.ProductServiceProvides products, brands and product types.
Services use serilog + seq for logging. Gateway generates request id and propagates it when forwarding request in x-request-id header thus you can track logs for same request among services.
Service repositories have github actions workflows for build application, run unit and integration tests and publish image to dockerhub.
Authorization is done by AccountService that utilize jwt and refresh tokens. Gateway expects jwt token in Authorization header.
You can observe shrink swagger documentation of each service in gateway swagger documentation at http://localhost:5003/swagger/index.html. Each service has its own swagger docs but services are not exposed by default. Before observing swagger docs of specific service you need to expose its port in docker-compose file. Example:
ports:
- 5002:80
All services contains folowing variables:
SerilogYou can override serilog configuration for any service.AutoMigrate=true/falseControls sql server migration on startup.AutoSeed=true/falseControls sql server seeding with sample data on startup.


