Simple outline for decentralized webshop marketplace

To further our plans of enabling worldwide decentralized marketplace through the FIMKrypto blockchain and Mofowallet, I opted for leveraging my limited e-commerce project experience here in public, describing a simple database schema and the outline of a basic webshop configuration. Mind you about the complete absence of novelty factor; The roots of this knowledge are around 20 years ago when I started to enter the mysterious realms of internet! So this is not gonna be the most advanced piece of pseudocode you’ve seen laying around, but the basic building blocks should still apply.

What we at FIMK already have, inherited from NXT, is the Digital Marketplace on the server level enabling listing and purchase of digital goods. But that’s too limited for our purposes, and we don’t have an user interface for it yet, so we start fresh from the ground up by designing a system from scratch. Then we can possibly increase our efficiency by picking any suitable parts from the existing Digital Marketplace crypto platform implementation.

The first part of any functional e-commerce application database is listing the items for sale. When we start thinking about a single webshop, we should have a generalized product_data table with at least the following db fields to start with:

* index_num
* created_time
* updated_time
* product_name
* price
* currency
* description
* image_data_or_link
* group
* weight
* dimensions
* amount_in_stock
* delivery_type
* shop_id (for multiple shops)

groups table is needed to categorize products into different groups for display purposes etc. It should consist of at least the following:

* index_num (group_id)
* group_name
* group_description

Another delivery_types table is required to specify the product delivery related terms, costs and specifics. It can be for instance like this:

* index_num
* delivery_type (physical, digital)
* delivery_fee (constant, by weight)
* weight_lower_limit

When we set up all applicable delivery types for our particular shop we may get an example of the following alternative combinations for a single item:

* physical delivery with constant fee
* physical delivery with low weight cost
* physical delivery with medium weight cost
* physical delivery with high weight cost
* digital delivery, fee not applicable

With this data from three tables we can carry out most product related display operations and also shopping cart tracking if applicable. I must to admit I haven’t been revising my e-commerce tech knowledge for at least the past decade or so, but I’d imagine workable shopping cart applications still use cookies or html5 local storage for session based shopping cart tracking. The exact best method to be chosen depends on the details of the system designed and the security level desired, ie. whether and how the purchase process is encrypted. This part needs extra attention when interfacing to an existing client-server crypto system such as FIMKrypto.

When we have the product listing and tracking in place, we have to design the orders backend database. It could be a single table like this:

* order_id
* created_time
* shop_id (or FIMK account)
* buyer_id (or FIMK account)
* name
* email
* street
* postcode
* city
* country
* total_price
* currency
* total_fee
* product_1
* product_2
* comments
* payment_status
* delivery_status

Now that we can write and monitor orders, change their payment status and delivery status, we have pretty much a barebones webshop system in place!

Add a few extra features like coupons table:

* index_num
* date_valid_start
* date_valid_stop
* code
* shop_id
* percentage_rebate
* FIMK_rebate
* limited_to_buyer_accounts
* limited to_products

And product_comments table:

* index_num
* datetime
* shop_id
* product_id
* sender_id (or FIMK account)
* comment
* rating

And feedback table:

* index_num
* datetime
* receiver (shop_id or FIMK account)
* sender
* comment
* rating

Add shops table to host a marketplace of multiple web shops:

* index_num
* shop_id
* FIMK_account
* shop_name
* shop_description
* allow_listing_on_association_marketplace
* special_requirements
Voila! A crude, unoptimized database for e-commerce application. Now tie all that to the FIMK decentralized crypto ledger, that’s easier said than done for an oldschool Mysql dude! And that’s why we have a dedicated full time (or should I say overtime) lead developer working his magic for the benefit of the whole FIMKrypto ecosystem.

When entering the cryptocurrency side armed with functional e-commerce application basics, the benefits of decentralized platform become obvious –

– Direct web shopping and payment processing capability within the FIMKrypto application (Mofowallet)
– Direct order processing with the FIMKrypto application
– Automatic decentralized, encrypted archiving
– Possibility for instant automatic delivery of digital content through the blockchain / external links
– Numerous separate markets with different properties: Public or private (encrypted, accessible only for authenticated users)

To conclude our little design exercise let me quote the lead developer for some inspirational thoughts:

Encrypted market works the exact same way as the unencrypted (through specially formatted Arbitrary messaging) with this exception: Any normal FIMK installation which doesn’t have the key can’t build up its internal database by scanning the blockchain. Only if you provide the secret key in your config file could the server (java) code decrypt the AMs that hold the instructions, from which we can build up the tables of e-commerce data (the so called model).

Share Your Thoughts

Leave a Reply