An open API service indexing awesome lists of open source software.

https://github.com/mgthetrain/e-commerce-service

Web front- and backend for an e-commerce platform utilizing DDD principles based on an existing cookiecutter template
https://github.com/mgthetrain/e-commerce-service

angular backend domain-driven-design dotnet-8 dotnet-core e-commerce-project frontend spa web-api web-ui

Last synced: about 2 months ago
JSON representation

Web front- and backend for an e-commerce platform utilizing DDD principles based on an existing cookiecutter template

Awesome Lists containing this project

README

          

# e-commerce-service

## Table of Contents

- [Summary](#summary)
- [Features](#features)
- [Getting Started](#getting-started)
- [Documentation](#documentation)

## Summary

Web front- and backend for an e-commerce platform utilizing DDD principles based on an [existing cookiecutter template](https://github.com/MGTheTrain/dotnet-ddd-web-api-starter) for [the web backend](./backend/Mgtt.ECom/)

## Features

- **User Management**
- User Registration & Authentication
- [x] Securely handle user sign-up, login, and role management.
- [x] Communicate with IAM provider APIs like Auth0.
- [ ] Configuring authorization URLs with Auth0 as the central IAM system for external IdPs (e.g. Apple, Microsoft, Google).

- **Product Management**
- Product Catalog
- [x] Create, read, update, and delete (CRUD) operations for products.

- **Order Management**
- Order Processing
- [x] Manage customer orders from creation to completion.
- [x] Incorporate payment APIs like PayPal or Stripe
- Order Items
- [x] Handle individual items within an order, including quantity and price details.

- **Shopping Cart**
- Cart Functionality
- [x] Allow users to add products to their cart, view cart contents and update quantities.
- Cart Persistence
- [x] Ensure cart contents persist across user sessions.

- **Review Management**
- Product Reviews
- [x] Enable users to write reviews for products, rate them and provide feedback.
- Review Moderation
- [ ] Manage and moderate user reviews to maintain quality and trustworthiness. Therefore leverage OpenAI APIs.

- **Optimizations**
- [ ] Reduce the number of web backend calls from the web frontend by providing HTTP endpoints that perform multiple logical backend operations
- [ ] Decompose monolith web backend into µServices
- [x] Implement filtering and pagination for specific list calls in web backend
- [ ] Increase and measure code coverage
- [x] Enable uploading of product images
- [ ] Deployment of Auth0 resources using Terraform required by web backend and web frontend
- [x] Continuous Integration workflows considering Docker image builds and pushing them to a Docker registry
- [ ] Continuous Deployment workflow for creating public cloud infrastructure including storage solutions and a Kubernetes cluster or deploying Kubernetes manifests to the Kubernetes cluster

**NOTE:** Also consider checking out the [entity relationship diagram](./docs/diagrams/entity-relationship-diagram.mmd)

## Getting Started

### Preconditions

- [Install Docker Engine](https://docs.docker.com/engine/install/)
- Auth0 instance and expertise in creating necessary resources (roles, permissions, applications, APIs).
- PayPal Developer Account with Dashboard Access. Checkout following [link](https://developer.paypal.com/api/rest/)

### Backend

You can find instructions on applicable commands for the backend source code in the following [README.md](./backend/Mgtt.ECom/README.md)

### Frontend

You can find instructions on applicable commands for the frontend source code in the following [README.md](./frontend/e-commerce-service/README.md)

### Local docker compose setup

**Precondition**: Update the values in [Mgtt.ECom.Web.env](./Mgtt.ECom.Web.env) and [environment.ts](./frontend/e-commerce-service/environments/environment.ts)

You can start the web front-end and back-end using the command:

```sh
docker-compose up -d --build
```

To view the web backend, open a browser and go to `localhost:5000/swagger/index.html`. Results should resemble:

![Swagger UI trough Docker](./docs/api-design/v1/swagger-ui-trough-docker.PNG "Swagger UI trough Docker")

To view the web frontend, open a browser and go to `localhost:4200`. After manually creating or adding resources (such as products, reviews, orders, order items and cart items) the results should resemble:

---

**Products**
![Products](./docs/results/web-frontend-I.PNG "Products")

---

**Shopping cart**
![Shopping cart](./docs/results/web-frontend-II.PNG "Shopping Cart")

---

**Paypal checkout link**
![Paypal checkout link](./docs/results/web-frontend-III.PNG "Paypal checkout link")

---

**User Order**
![User Order](./docs/results/web-frontend-IV.PNG "User Order")

---

**Order Details**
![Order Details](./docs/results/web-frontend-V.PNG "Order Details")

---

**Product Reviews**
![Product Reviews](./docs/results/web-frontend-VI.PNG "Product Reviews")

---

**Auth0 Login**
![Auth0 Login](./docs/results/web-frontend-VII.PNG "Auth0 Login")

---

**Product Creation**
![Product Creation](./docs/results/web-frontend-VIII.PNG "Product Creation")

---

You can remove all Docker resources with:

```sh
docker-compose down -v
```

## Documentation

Explore the initial Web API structure [here](./docs/api-design/v1/web-api-structure.md). For more details on the use case overview [checkout following diagram](./docs/diagrams/use-case-overview.mmd). For more details on user roles and permissions required for RBAC [checkout following diagram](./docs/diagrams/user-roles-and-permissions-mapping.mmd).

Optionally copy contents of the [swagger.json](./docs/api-design/swagger.json) to the [Swagger Online editor](https://editor.swagger.io/) to view the available HTTP/s endpoints.