cambiatus / backend

Cambiatus GraphQL API
GNU Affero General Public License v3.0
21 stars 18 forks source link

Create Shop orders 🧽 #198

Open lucca65 opened 3 years ago

lucca65 commented 3 years ago

Is your feature request related to a problem? Please describe. Today we have products and a very basic structure called orders. Before it was called sale_history because it was really only a registration of buying something from the shop. This proposal suggests a new structure to make the order abstraction more powerful and more useful.

Describe the solution you'd like First we need to make the order have status. Orders always relate to trying to buy products from the same seller, or user. An order looks like this:

Another change is that today, orders are created by listening to this contract call. We should change this to make the creation of an Order to be an GraphQL call. After the order is created we can update it with the transaction ID to link it with the payment. This process can later be expanded to include several payments, until the oder is completed.

With that we can completely remove the transfer_sale call and properly using the order abstraction.

Orders will also need to be approved by the creator of the offer/product. This is because change is to be expected and orders must be accepted

We will need the following screens:

The new features users may gain

Describe alternatives you've considered We could start working on the idea of expanding possible statuses. We could choose to track partial payments (useful for payments with fiat and crypto). We could add tracking capabilities to allow users to inform delivering/posting information and also add stuff like canceled or other abstractions

Additional context Add any other context or screenshots about the feature request here.

muguika commented 3 years ago

Love this evolution of our shop! This new "order" abstraction seems the perfect next step towards creating a more robust experience and better information for both the seller and the client buying.

Apart from what you already suggested, we may need to think on a way to give admin users a reading version of the total list of orders... so the teams behind each community can see what is happening and help users that get lost. Eventually, this general view can be available to anyone in the community, when we move to a more decentralized decision making process.

great improvement @lucca65 thanks for suggesting this new path!

lucca65 commented 2 years ago

Entity and abstractions

Product

Orders

Categories

References

Mutations

lucca65 commented 2 years ago

It could also have slugs and slug lookup:

lucca65 commented 2 years ago

About the Categories implementation:

lucca65 commented 2 years ago

@juramos-2020 pra você dar uma olhada, que estamos começando a trabalhar nisso!

juramos-2020 commented 2 years ago

Olá pessoal, @lucca65 @NeoVier @MatheusBuss @muguika

Com base nas informações dessa Issue, comecei a desenhar o mapa mental com as principais frentes das Orders ( vendedor, comprador, pedido e produto) para termos algo mais visual sobre o caminho que estamos traçando.

https://www.figma.com/file/7i222dvmbckzXfQsRlfoNB/Orders?node-id=0%3A1

Fiquem a vontade para contribuir ou deixar suas dúvidas. Ainda não ta nada gravado em pedra, pois ainda temos muito o que decidir.

Eu e a @rafachadud vamos começar a desenhar a jornada do usuário para termos uma visão mais clara de cada passo que ele vai dar com esse novo recurso. Quando tivermos tudo pronto vamos convidar a todos para definirmos essa jornada juntos 👌

lucca65 commented 2 years ago

👏

MatheusBuss commented 2 years ago

Show @juramos-2020! :rocket:

ethtop90 commented 1 month ago

good