Flexible E-Commerce Framework on top of Flamingo. Used to build E-Commerce "Portals" and connect it with the help of individual Adapters to other services.

Flamingo Commerce

Go Report Card Tests Release

With "Flamingo Commerce" you get your toolkit for building fast and flexible commerce experience applications.

A demoshop using the standalone adapters is online here https://demoshop.flamingo.me - you can also try the GraphQL support

What problems does Flamingo Commerce solve?

  • Modern Architecture: Break monolithic e-commerce architeture to allow scaling and maintainability.
  • Modern Architecture: Use it to build commerce for headless commerce solutions
  • Real time commerce: Build personalized experiences - without the need to cache rendered pages

What are the main design goals of Flamingo Commerce?

  • Performance: We do not want to rely on any frontend caching. Instead it is no problem to show every customer an individual experience.
  • Clean architecture: We use "domaind driven design" and "ports and adapters" to build a maintainable and clean application.
  • Suiteable for Microservice architectures: Adapters concept and various resilience concepts makes it easy to connect to other (micro) services.
  • Decoupled and flexible frontend development: Frontend development is decoupled from the "Backend for Frontend" - so that it is possible to use "any" frontend technology.
  • Testability: By providing "Fake Adapters" that provide test data, it is possible to test your application without external dependencies.
  • Great Developer Experience: :-)
  • Open Source: Flamingo Commerce and Flamingo is Open Source and will be.

Whats does Flamingo Commerce provide?

  • Different e-commerce Flamingo Modules for typical e-commerce domains: Each providing a separated bounded context with its „domain“, „application“ and „interface“ logic.

  • Using „ports and adapters“ to separate domain from technical details, all these modules can be used with your own „Adapters“ to interact with any API or microservice you want.

  • Some of the major Flamingo Commerce modules (bounded contexts) are:

    • product: Offering domain models for different product types. Supporting multiple prices (including loyalty prices) etc..
    • cart: Powerful cart domain model. Supporting multi delivery, multiple payment transactions, and a lot more.
    • search: Generic search service and features
    • checkout: Offering logic and interfaces for an example (default) checkout.
  • Each of the modules provide graphql support that you can use.

Flamingo Commerce is build on top of the Flamingo Framework so it makes sense that you read through the Flamingo docs also

Read more under docs.flamingo.me

Commerce Modules:

  • price:

    • Offers value objects for prices and charges - supporting calculations, rounding and splitting
    • GoDoc
    • Readme
  • product:

    • Offers domain models and interface logic for handling different product types
    • GoDoc
    • Readme
  • category:

    • Offers domain models and interface logic for category tree and category views
    • GoDoc
    • Readme
  • cart:

    • The cart module is one of the main modules in Flamingo Commerce. It offers domain models and logic for multi delivery, multi payment carts.
    • GoDoc
    • Readme
  • payment:

    • Offers a generic payment value objects as well as a generic web payment interface and comes with the "offlinepayment" gateway.
    • GoDoc
    • Readme
  • search:

    • Offers domain models and interface logic for generic search and search filters.
    • GoDoc
    • Readme
  • checkout:

    • Offers a default checkout implementation that can be used.
    • GoDoc
    • Readme
  • customer:

    • Offers domain models for customer
    • GoDoc
    • Readme
  • order:

    • Offers domain models for orders. For example to use it on a "My Orders" page.
    • GoDoc
    • Readme
  • w3cdatalayer:

    • Offers interface logic to render a Datalayer that can be used for e-commerce tracking
    • Readme

Flamingo Commerce Release Status

Flamingo Commerce API is Beta because we will still change the API (models and methods). You are encourages to use it but if you update you might need to adjust your code to the latest changes.

Setup

We recommend to use go modules, so you just need to add Flamingo Commerce to your main go file as import:

e.g. to use the product module add

import (
  "flamingo.me/flamingo-commerce/v3/product"
)

And then load the Module in your application bootstrap:

// main is our entry point
func main() {

	flamingo.App([]dingo.Module{
	    ...
		//flamingo-commerce modules
		new(product.Module),
		
	}, nil)
}

To update the dependency in go.mod run

go get flamingo.me/flamingo-commerce/v3

Demo

There is a demo: https://demoshop.flamingo.me

And the code is also published: https://github.com/i-love-flamingo/commerce-demo-carotene

Owner
Flamingo
Flamingo is a frontend framework made in go. It is especially useful for building web based sites and portals in a microservice oriented architecture.
Flamingo
Comments
  • checkout: Allow fully discounted carts to be placed.

    checkout: Allow fully discounted carts to be placed.

    Before, payment was always required even if the grand total of a cart was zero. Now, when no payment is required the order is being placed without payment processing. In the checkoutform, no payment selection is set in this case.

    • [x] Add changelog
    • [x] Fix float comparison issues (currently tests are failing)
    • [x] Move some code in tests to helper functions
    • [x] Move coupon logic from inmemory cart to integration test layer
    • [x] Check new standard place order
  • Different formatting of attribute values returned by Value() and Values() of Attribute of BasicProductData

    Different formatting of attribute values returned by Value() and Values() of Attribute of BasicProductData

    Hi. While investigating a bug which was caused by the fact that Value() returns the raw value of the attribute but with whitespaces trimmed on both ends, I noticed that the Values() method returns a list of attribute values but the values do not have the whitespaces removed.

    https://github.com/i-love-flamingo/flamingo-commerce/blob/bf76717aebb7d4ea1e81bdd8acbe70a307b2f520/product/domain/productBasics.go#L225-L227

    and

    https://github.com/i-love-flamingo/flamingo-commerce/blob/bf76717aebb7d4ea1e81bdd8acbe70a307b2f520/product/domain/productBasics.go#L264-L273

  • checkout: optional cart validation before place order

    checkout: optional cart validation before place order

    When using the place order state machine, one of the first steps during the process is already validating the cart. Afterwards the cart is closed and stored inside the context store. When then later placing the order the OrderService performs the cart validation again.

    At this time the cart is already closed and if a validator tries to fetch the cart from the session, an empty cart returns which can lead to invalid validation results.

  • Add integrationtest

    Add integrationtest

    Adding Integrationtest that start a flamingo app with required modules and calls the expected urls.

    This will test:

    • flamingo-commerce modules boots up
    • all fake adapters exists
    • and we can add blackbox test based on them (PDP, add to cart etc)
  • cart: Fix Cart Merging

    cart: Fix Cart Merging

    1. It is hard to test cartService because of Authentication and the problem to mock it => add Interfaces

    2. Cart Merge currently has problems:

    • No BillingAddress is merged
    • AdditionalInfos are missing in Delivery
    • its not handled as a "detached transaction" and a canceled context might kick in
  • cart: always reserve an order id if requested

    cart: always reserve an order id if requested

    The CartService must always reserve a (new) orderID fetched from the PlaceOrderService if requested.

    The reciever ReserveOrderIDAndSave must not check if an order ID is already set on the cart.

  • Add cart restrictors

    Add cart restrictors

    The Restriction Service provides a port for implementing product restrictions. By using Dingo multibinding to cart.MaxQuantityRestrictor, you can add your own restriction to the service. The Restrict function returns the remaining allowed quantity or math.MaxInt32 for infinity.

    The Service itself consolidates all bound restrictors and returns the most restricting rule (this is the smallest quantity allowed by any restrictor). If all restrictors return infinity or there is no restrictor bound at all, an error of type *ErrNoRestriction is returned.

  • go.mod: update runc to v1.0.0-rc92

    go.mod: update runc to v1.0.0-rc92

    Resolves #305

    Nancy output:

    go list -json -m all | docker run --rm -i sonatypecommunity/nancy:latest sleuth
    Checking for updates...
    Already up-to-date.
    pkg:golang/github.com/coreos/[email protected]
    3 known vulnerabilities affecting installed version
    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
    ┃ [CVE-2020-15114] In etcd before versions 3.3.23 and 3.4.10, the etcd gateway is a simple TCP prox...                                                                                                                           ┃
    ┣━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ Description        ┃ In etcd before versions 3.3.23 and 3.4.10, the etcd gateway is a simple TCP                                                                                                                               ┃
    ┃                    ┃ proxy to allow for basic service discovery and access. However, it is                                                                                                                                     ┃
    ┃                    ┃ possible to include the gateway address as an endpoint. This results in a                                                                                                                                 ┃
    ┃                    ┃ denial of service, since the endpoint can become stuck in a loop of                                                                                                                                       ┃
    ┃                    ┃ requesting itself until there are no more available file descriptors to                                                                                                                                   ┃
    ┃                    ┃ accept connections on the gateway.                                                                                                                                                                        ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ OSS Index ID       ┃ bba60acb-c7b5-4621-af69-f4085a8301d0                                                                                                                                                                      ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ CVSS Score         ┃ 7.7/10 (High)                                                                                                                                                                                             ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ CVSS Vector        ┃ CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H                                                                                                                                                              ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ Link for more info ┃ https://ossindex.sonatype.org/vuln/bba60acb-c7b5-4621-af69-f4085a8301d0?component-type=golang&component-name=github.com%2Fcoreos%2Fetcd&utm_source=nancy-client&utm_medium=integration&utm_content=1.0.15 ┃
    ┗━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
    ┃ [CVE-2020-15136] In ectd before versions 3.4.10 and 3.3.23, gateway TLS authentication is only ap...                                                                                                                           ┃
    ┣━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ Description        ┃ In ectd before versions 3.4.10 and 3.3.23, gateway TLS authentication is                                                                                                                                  ┃
    ┃                    ┃ only applied to endpoints detected in DNS SRV records. When starting a                                                                                                                                    ┃
    ┃                    ┃ gateway, TLS authentication will only be attempted on endpoints identified                                                                                                                                ┃
    ┃                    ┃ in DNS SRV records for a given domain, which occurs in the                                                                                                                                                ┃
    ┃                    ┃ discoverEndpoints function. No authentication is performed against                                                                                                                                        ┃
    ┃                    ┃ endpoints provided in the --endpoints flag. This has been fixed in versions                                                                                                                               ┃
    ┃                    ┃ 3.4.10 and 3.3.23 with improved documentation and deprecation of the                                                                                                                                      ┃
    ┃                    ┃ functionality.                                                                                                                                                                                            ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ OSS Index ID       ┃ d373dc3f-aa88-483b-b501-20fe5382cc80                                                                                                                                                                      ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ CVSS Score         ┃ 6.5/10 (Medium)                                                                                                                                                                                           ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ CVSS Vector        ┃ CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N                                                                                                                                                              ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ Link for more info ┃ https://ossindex.sonatype.org/vuln/d373dc3f-aa88-483b-b501-20fe5382cc80?component-type=golang&component-name=github.com%2Fcoreos%2Fetcd&utm_source=nancy-client&utm_medium=integration&utm_content=1.0.15 ┃
    ┗━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
    ┃ [CVE-2020-15115] etcd before versions 3.3.23 and 3.4.10 does not perform any password length vali...                                                                                                                           ┃
    ┣━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ Description        ┃ etcd before versions 3.3.23 and 3.4.10 does not perform any password length                                                                                                                               ┃
    ┃                    ┃ validation, which allows for very short passwords, such as those with a                                                                                                                                   ┃
    ┃                    ┃ length of one. This may allow an attacker to guess or brute-force users'                                                                                                                                  ┃
    ┃                    ┃ passwords with little computational effort.                                                                                                                                                               ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ OSS Index ID       ┃ 5def94e5-b89c-4a94-b9c6-ae0e120784c2                                                                                                                                                                      ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ CVSS Score         ┃ 5.8/10 (Medium)                                                                                                                                                                                           ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ CVSS Vector        ┃ CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N                                                                                                                                                              ┃
    ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
    ┃ Link for more info ┃ https://ossindex.sonatype.org/vuln/5def94e5-b89c-4a94-b9c6-ae0e120784c2?component-type=golang&component-name=github.com%2Fcoreos%2Fetcd&utm_source=nancy-client&utm_medium=integration&utm_content=1.0.15 ┃
    ┗━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
    
    1 Vulnerable Packages
    
    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
    ┃ Summary                       ┃
    ┣━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━┫
    ┃ Audited Dependencies    ┃ 291 ┃
    ┣━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━┫
    ┃ Vulnerable Dependencies ┃ 1   ┃
    ┗━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┛
    

    This is related to https://github.com/i-love-flamingo/flamingo/issues/182 I assume

    A workflow for Nancy on PR's is also provided.

  • product: New GraphQL Commerce_Product schema

    product: New GraphQL Commerce_Product schema

    The goal of this PR is to have a unified GraphQL schema for Commerce_Product that makes it easier for consumers to display data for product variants and their related "configurable products".

    This is the proposed schema we are trying to achieve:

    type Product {
        __typename: String!, # __typename
        marketPlaceCode: String! #variants.[sku].baseData.marketPlaceCode
        media: Media, # teaserData.media
        price: ProductPrice, # teaserData.teaserPrice
        loyalty: {
            price: ProductLoyaltyPrice, # teaserData.teaserLoyaltyPriceInfo
            earning: ProductLoyaltyEarning # teaserData.teaserLoyaltyEarningInfo
        },
        title: String!, # variants.[sku].baseData.title
        categories: {
            main: # variants.[sku].baseData.MainCategory with fallback to Categories[0]
            all: # variants.[sku].baseData.Categories
        }
        retailer: {
            id: String, # variants.[sku].retailer.id ?
            title: String, # variants.[sku].retailer.title ?
        }
        brand: {
            id: String, # variants.[sku].brand.id ?
            title: String, # variants.[sku].brand.title ?
        }
        description: String ! #variants.[sku].baseData.description
        meta: {
            description: String !, #variants.[sku].baseData.attributes.getAttribute(key: "metaDescription").label
            title: String !, #variants.[sku].baseData.attributes.getAttribute(key: "metaTitle").label
            keywords: [String !], #variants.[sku].baseData.keywords
        }
        urlSlug: String!, #variants.[sku].baseData.attributes.getAttribute(key: "urlSlug").label
        deliveryOptions: [String!], #variants.[sku].baseData.attributes.getAttribute(key: "deliveryOptions").values
        channel: String!: #getIdentifier.split('-')[2] -> could potentially derived from SP request
        locale: String!: #getIdentifier.split('-')[1] -> could potentially derived from SP request
        limitations: Om3_ProductLimitations_Result! #variants.[sku].productLimitations
        attributes: Attributes #variants.[sku].baseData.attributes
    
        ... on Commerce_ConfigurableProductWithActiveVariant {
            variantMarketPlaceCode: String!
            activeVariationSelection: [ActiveVariationSelection!]
            variationSelections: [VariationSelection]
            baseConfigurableProduct: Commerce_ConfigurableProduct!
        }
    
        ... on Commerce_ConfigurableProduct {
            # NO_MATCH for all options
            # use first-best combination for all attributes to determine variantMarketPlaceCode
            variationSelections: [VariationSelection]
        }
    };
    
    type VariationSelection {
        code: String!
        label: String!
        options: [VariationSelectionOption]
    }
    
    type ActiveVariationSelection {
        attributeLabel: String!
        optionLabel: String!
    }
    
    type VariationSelectionOption {
        code: String!
        label: String!
        state: VariationSelectionOptionState!
        variantMarketPlaceCode: String!,
    }
    
    enum VariationSelectionOptionState {
        ACTIVE
        MATCH
        NO_MATCH
    }
    
  • Potential collision and risk from indirect dependence

    Potential collision and risk from indirect dependence "github.com/gotestyourself/gotestyourself"

    Background

    Repo i-love-flamingo/flamingo-commerce used the old path to import gotestyourself indirectly. This caused that github.com/gotestyourself/gotestyourself and gotest.tools coexist in this repo: https://github.com/i-love-flamingo/flamingo-commerce/blob/master/go.mod (Line 35 & 58)

    github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect
    gotest.tools v2.2.0+incompatible
    

    That’s because the gotestyourself has already renamed it’s import path from "github.com/gotestyourself/gotestyourself" to "gotest.tools". When you use the old path "github.com/gotestyourself/gotestyourself" to import the gotestyourself, will reintroduces gotestyourself through the import statements "import gotest.tools" in the go source file of gotestyourself.

    https://github.com/gotestyourself/gotest.tools/blob/v2.2.0/fs/example_test.go#L8

    package fs_test
    import (
    	…
    	"gotest.tools/assert"
    	"gotest.tools/assert/cmp"
    	"gotest.tools/fs"
    	"gotest.tools/golden"
    )
    

    "github.com/gotestyourself/gotestyourself" and "gotest.tools" are the same repos. This will work in isolation, bring about potential risks and problems.

    Solution

    Add replace statement in the go.mod file:

    replace github.com/gotestyourself/gotestyourself => gotest.tools v2.2.0
    

    Then clean the go.mod.

  • Cart cleanup adapters

    Cart cleanup adapters

    Current problems:

    • there is no working emailadapter - name is misleading
    • the cart adpater has an inmemory storage - but the adapter itself is not "inmemory"

    Therefore this PR cleans this up and prepares at the same time that an additional module can provide a email adpater

  • chore(deps): update module github.com/swaggo/swag to v1.8.9

    chore(deps): update module github.com/swaggo/swag to v1.8.9

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/swaggo/swag | require | patch | v1.8.8 -> v1.8.9 |


    Release Notes

    swaggo/swag

    v1.8.9

    Compare Source

    Changelog

    a10fb9a Just optimize code about parsing extensions (#​1399) 4ccbeaf chore: increment version (#​1423) 8139731 chore: parse escaped double colon (\:) example struct tag (#​1402) 2c530ea chore: release candidate (#​1403) e3151c1 chore: release candidate (#​1404) e50db3e enhancement for enums (#​1400) 7c20f30 feat: parse only specific extension tag (#​1219) 80d5221 feat: support json tags in embedded structs (#​1396) 4519064 feat: use enums in request (#​1417) 9a4fa5d fix issue 1414 (#​1419) 30684a2 fix parsing bug affected by fmt (#​1398) 7867c24 fix: don't error on empty comment line (#​1415) dfce6c8 parse self-nested generic struct (#​1420) ba5df82 record token.FileSet for every file so that the position of parsing error can be acquired (#​1393) 3fe9ca2 revert docker login-action (#​1405)


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • chore(deps): update module github.com/go-test/deep to v1.1.0

    chore(deps): update module github.com/go-test/deep to v1.1.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/go-test/deep | require | minor | v1.0.8 -> v1.1.0 |


    Release Notes

    go-test/deep

    v1.1.0

    Compare Source


    v1.0.9

    Compare Source

    • Fixed issue #​45: Panic when comparing errors in unexported fields (PR #​54) (@​seveas)
    • Fixed issue #​46: Functions are handled differently from reflect.DeepEqual (PR #​55) (@​countcb)
    • Updated matrix to go1.17, go1.18, and go1.19 and moved testing to GitHub Actions

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • chore(deps): update module flamingo.me/graphql to v1.9.0

    chore(deps): update module flamingo.me/graphql to v1.9.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | flamingo.me/graphql | require | minor | v1.8.0 -> v1.9.0 |


    Release Notes

    i-love-flamingo/graphql

    v1.9.0

    Compare Source

    Features
    Fixes
    Ops and CI/CD
    Chores and tidying
    • deps: update module github.com/99designs/gqlgen to v0.17.21 (#​50) (8104cfd)
    • deps: update module flamingo.me/dingo to v0.2.10 (#​48) (a6b9ed5)
    • deps: update module flamingo.me/flamingo/v3 to v3.4.0 (#​47) (a169a56)
    • deps: update module github.com/spf13/cobra to v1.6.1 (#​46) (97c0f19)
    • deps: update module github.com/99designs/gqlgen to v0.17.20 (#​42) (c08c353)
    • bump to go 1.19 (5483683)
    • deps: update module github.com/99designs/gqlgen to v0.17.15 (#​40) (2b6063a)
    • deps: update module github.com/vektah/gqlparser/v2 to v2.4.8 (#​39) (5056b96)
    • deps: update module github.com/vektah/gqlparser/v2 to v2.4.7 (#​38) (4586516)
    • deps: update module github.com/99designs/gqlgen to v0.17.13 (#​36) (982ec0c)
    • deps: update module github.com/spf13/cobra to v1.5.0 (bf1bf6e)
    • deps: update module github.com/99designs/gqlgen to v0.17.12 (61f0127)
    • deps: update module github.com/vektah/gqlparser/v2 to v2.4.6 (200c5c6)
    • deps: update module github.com/99designs/gqlgen to v0.17.10 (#​30) (984798f)
    • deps: update module github.com/vektah/gqlparser/v2 to v2.4.5 (#​31) (604c232)
    • deps: update module github.com/99designs/gqlgen to v0.17.6 (#​28) (3826079)
    • deps: update module github.com/vektah/gqlparser/v2 to v2.4.3 (#​29) (c69f8af)
    • deps: update actions/checkout action to v3 (#​24) (de0e0a4)
    • deps: update actions/setup-go action to v3 (#​25) (64f0d69)
    Other

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • chore(deps): update module golang.org/x/text to v0.6.0

    chore(deps): update module golang.org/x/text to v0.6.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | golang.org/x/text | require | minor | v0.4.0 -> v0.6.0 |


    Release Notes

    golang/text

    v0.6.0

    Compare Source

    v0.5.0

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • chore(deps): update module github.com/99designs/gqlgen to v0.17.22

    chore(deps): update module github.com/99designs/gqlgen to v0.17.22

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/99designs/gqlgen | require | patch | v0.17.20 -> v0.17.22 |


    Release Notes

    99designs/gqlgen

    v0.17.22

    Compare Source

    a44685b2 Ability to return multiple errors from resolvers raise than add it to stack. (#​2454)
    • Remove DO NOT EDIT

    Sometimes vscode warn about this while editing resolvers code. Finally the resolver's code is editable and generated at the same time.

    • Ability to return multiple errors from resolver.

    • Multiple errors return example

    • Fix missing import

    • reformat

    • gofmt

    • go generate ./...

    • go generate ./...

    • Regenerate

    • remove trailing period

    db1e3b81 Implicit external check (#​2449)
    • Prevent entity resolver generation for stub types. In Federation 2 key fields are implicitly external

    • Add more comments to "isResolvable"

    • Check that no resolvers are set for stub "Hello"

    • Run generate with go 1.16

    • Simplify implicit external check

    • Add stricter federation version check. Update comment on expected behavior of the resolvable argument. Add comment to documentation about external directive.

    • Preallocate keyFields slice

    • Add non stub type to federation v2 test

    • Do not append to preallocated slice

    • Add test coverage for multiple fields in key

    • Fix typo in comment

    • 5065163 Re-generate and update release checklist to regenerate for new version

    • 5cfc22d Add v0.17.21 Release notes

    • 5d39046 v0.17.21 postrelease bump

    v0.17.21

    Compare Source

    5c083c79 use goField directive for getters generation (#​2447)
    • consider goField directive for getters generation

    • Re-generate to pass linting

    463d2134 fix: safe http error response (#​2438)
    • safe http error when parsing body

    • fix tests

    • fix linting

    • fix linting

    • Dispatch decoding errors so hook can present them

    • Revert test expectation to original

    86c144fc Bump decode-uri-component from 0.2.0 to 0.2.2 in /integration (#​2445)

    Bumps decode-uri-component from 0.2.0 to 0.2.2.


    updated-dependencies:

    • dependency-name: decode-uri-component dependency-type: indirect ...
    f28ffccd Bump minimatch from 3.0.4 to 3.1.2 in /integration (#​2435)

    Bumps minimatch from 3.0.4 to 3.1.2.


    updated-dependencies:

    • dependency-name: minimatch dependency-type: indirect ...
    efb31b54 Check if go.mod exists while init (#​2432)
    • Add check go.mod first to prevent cascade errors in "init" directive

    • Fix formatting

    • Fix formatting with gofmt

    This reverts commit c23d183.

    • Adjust go.mod file to look in parent directories as well
    89e91da1 Add resolver commit (#​2434)
    • Add resolver commit

    • Add version to comment and re-generate

    906c0dee optional return pointers in unmarshalInput (#​2397)
    • optional return pointers in unmarshalInput

    • add docs for return_pointers_in_unmarshalinput

    a9d06036 Add json.Number support to UnmarshalString (#​2396)
    • Add json.Number support to UnmarshalString

    • Add UnmarshalString tests

    • Remove trailing zeros when calling UnmarshalString with float64

    daa44079 Update README.md (#​2391)

    fix: execute gqlgen generate command error. eg: systems failed: unable to build object definition: unable to find type: github.com/99designs/gqlgen/graphql/introspection.InputValue. need import github.com/99designs/gqlgen/graphql/introspection .

    419dd96c Bump got and [@​graphql](https://togithub.com/graphql)-codegen/cli in /integration (#​2389)

    Removes got


    updated-dependencies:

    • dependency-name: got dependency-type: indirect dependency-type: direct:development ...
    265888c6 Bump jsdom and jest in /integration (#​2388)

    Bumps jsdom and jest. These dependencies needed to be updated together.

    Removes jsdom

    Updates jest from 24.9.0 to 29.0.3


    updated-dependencies:

    • dependency-name: jsdom dependency-type: indirect
    • dependency-name: jest dependency-type: direct:development ...
    56f6db04 Update module mitchellh/mapstructure to 1.5.0 (#​2111)
    • Update mitchellh/mapstructure

    • Avoid double pointer

    • ea9590a update changelog for v0.17.20

    • 4c06e6c v0.17.20 postrelease bump


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

GoAdmin Instruction - A golang framework help gopher quickly build a data visualization platform

GoAdmin Instruction - A golang framework help gopher quickly build a data visualization platform

Jan 21, 2022
The jin is a simplified version of the gin web framework that can help you quickly understand the core principles of a web framework.

jin About The jin is a simplified version of the gin web framework that can help you quickly understand the core principles of a web framework. If thi

Jul 14, 2022
Rocinante is a gin inspired web framework built on top of net/http.

Rocinante Rocinante is a gin inspired web framework built on top of net/http. ⚙️ Installation $ go get -u github.com/fskanokano/rocinante-go ⚡️ Quicks

Jul 27, 2021
Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.

Ponzu Watch the video introduction Ponzu is a powerful and efficient open-source HTTP server framework and CMS. It provides automatic, free, and secur

Dec 28, 2022
QOR is a set of libraries written in Go that abstracts common features needed for business applications, CMSs, and E-commerce systems.

QOR English Chat Room: 中文聊天室: For security issues, please send us an email to [email protected] and give us time to respond BEFORE posting as an iss

Jan 2, 2023
Nov 15, 2022
A secure, flexible, rapid Go web framework

A secure, flexible, rapid Go web framework Visit aah's official website https://aahframework.org to learn more News v0.12.3 released and tagged on Feb

Dec 24, 2022
A secure, flexible, rapid Go web framework
A secure, flexible, rapid Go web framework

A secure, flexible, rapid Go web framework Visit aah's official website https://aahframework.org to learn more News v0.12.3 released and tagged on Feb

Oct 26, 2021
Vektor - Build production-grade web services quickly
Vektor - Build production-grade web services quickly

Vektor enables development of modern web services in Go. Vektor is designed to simplify the development of web APIs by eliminating boilerplate, using secure defaults, providing plug-in points, and offering common pieces needed for web apps. Vektor is fairly opinionated, but aims to provide flexibility in the right places.

Dec 15, 2022
A REST framework for quickly writing resource based services in Golang.

What is Resoursea? A high productivity web framework for quickly writing resource based services fully implementing the REST architectural style. This

Sep 27, 2022
A Go framework for building JSON web services inspired by Dropwizard

Tiger Tonic A Go framework for building JSON web services inspired by Dropwizard. If HTML is your game, this will hurt a little. Like the Go language

Dec 9, 2022
A minimal framework to build web apps; with handler chaining, middleware support; and most of all standard library compliant HTTP handlers(i.e. http.HandlerFunc).
A minimal framework to build web apps; with handler chaining, middleware support; and most of all standard library compliant HTTP handlers(i.e. http.HandlerFunc).

WebGo v4.1.3 WebGo is a minimalistic framework for Go to build web applications (server side) with zero 3rd party dependencies. Unlike full-fledged fr

Jan 1, 2023
based on go lang build WEB development framework for go lang beginners .

based on go lang build WEB development framework for go lang beginners .

Oct 31, 2021
lightweight, idiomatic and composable router for building Go HTTP services

chi is a lightweight, idiomatic and composable router for building Go HTTP services. It's especially good at helping you write large REST API services

Jan 6, 2023
Golanger Web Framework is a lightweight framework for writing web applications in Go.

/* Copyright 2013 Golanger.com. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except

Nov 14, 2022
laravel for golang,goal,fullstack framework,api framework
laravel for golang,goal,fullstack framework,api framework

laravel for golang,goal,fullstack framework,api framework

Feb 24, 2022
package for building REST-style Web Services using Go

go-restful package for building REST-style Web Services using Google Go Code examples using v3 REST asks developers to use HTTP methods explicitly and

Jan 1, 2023
Implementing back-end services for blog application

Go Blog API Real-world examples implementing back-end services for blog application using Go programming language to build RESTful API, all routes and

Jan 5, 2023