TokenForge Core Backend
Last updated
Last updated
The Core Backend is divided into two separate sections:
Administration
Shop
The Administration section provides a variety of administrative and management settings and configurations, while the Shop-Level covers everything that happens on the frontend for a marketplace, a store or even a simple minting site.
Therefor, we have two different Levels for Authentication. On both levels, the authentication requires a JSON-Web-Token (JWT), but different user accounts are required here.
Administrators can be created in the Admin-Dashboard and also via API. Shop-Users (”Customers”) can be created only via API, let’s say via a Registration- or SignUp-Page which triggers the corresponding API-Request.
On the Shop-Level we distinguish between Customers and Users:
A customer is someone who buys a product without signing up. It is meant for Checkouts (Old-economy) or Mints (New-Economy) without having to sign up for a user account.
A User-account is the next level of a customer that also has an account to sign in with email and a password.
Every single item a customer can buy, be it an NFT or a software license or a physical product like clothing, is handled with a Product and at least one corresponding product variant to which the final price is linked. Every product can have different variations and attributes.
Variants may be created out of Options of the product, but you are also able to use product variations system without the options at all.
ProductVariant represents a unique kind of product and can have its own pricing configuration, inventory tracking etc.
The main and only mandatory properties of a Product are:
code (something like an ID)
main category
title
description
According to our multi lingual capabilities, the title and description needs to be available for all required locales and languages (which can be enabled and disabled in the Administration Panel).
Other attributes you may want to attach are:
media files (gallery image, further images, audio files, video files)
additional categories
metadata
royalties
The concept of Media files are discussed in detail in this article (link).
In order to display a product properly in any UI, we support different types of images:
gallery image
banner images
other images
The gallery image is displayed as a thumbnail in the product search, in the category listings or on the artist page, which contains a list of items by a specific creator. Also, this is the right candidate for the actual image that will be displayed on the details page.
It is possible to add multiple gallery images. Therefore, your user interface is responsible for displaying the "right" image (or even creating a slideshow or something similar).
Banner images can be used to display as a banner. Multiple banner images will be supported in order to support Slide shows.
Other image files belonging to the product can be managed under "Other images".
We distinguish between two different concepts of “metadata”:
SEO related metadata for Web2
Marketplace related metadata for Web3 according to OpenSea’s metadata standard.
TokenForge supports "meta keywords" and "meta description" with a strong reference to the corresponding HTML attributes. This allows any user interface to display both meta tags appropriately on a detail page to increase the SEO capabilities of your marketplace.
Providing asset metadata allows other marketplace applications like OpenSea to pull in rich data for digital assets and easily display them in-app. Digital assets on a given smart contract are typically represented solely by a unique identifier (e.g., the token_id in ERC721), so metadata allows these assets to have additional properties, such as a name, description, and image.
Warning:
While metadata for Web2 will be used to render detail pages accordingly, the metadata for Web3 will be used once in the minting process or the preparation process for Lazy-minting. Warning: thanks to immutability, once these metadata has been saved on-chain (e.g. on IPFS), they can’t be changed any more. However, this restriction does not apply to Web2 metadata, which can be changed at any time and will be applied the next time our API retrieves this data.
API: Submission of a Product / Item (WIP/DRAFT!)
API: Obtain JWT / Sign In as a Customer
API: Prepare an Image for Uploading
API: Fetching Category-Tree (”Taxon”)