## 5 Research Results
### Case Study: Development of the Blockchain-Based NFT Trading Web 3.0 Application
This microservice was responsible for user-related operations and account-related create, read, update, and delete (CRUD) operations. The second microservice was responsible for  
\begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline  
managing NFTs listed for sale on the platform. Its aim was to create, update, and remove listings, closely interacting with the blockchain registry of NFTs. The third microservice handled interactions related to buying, selling, and bidding, serving as the transactional layer of the platform [46; 47]. For each microservice, the following deliverables were presented: an API overview, RESTful design principles were highlighted, security mechanisms were elaborated, examples of endpoints were provided, and snippets of Swagger documentation were delivered. As an example, the deliverables for the Marketplace Service API were presented, which handled the purchase, bidding, and sale of NFTs. This microservice integrated with blockchain-based smart contracts to facilitate secure, decentralized transactions between buyers and sellers. RESTful Design Principles Highlighted:  
Resource Identification: marketplace transactions are treated as resources accessible via /marketplace/transactions. Separation of Concerns: this API strictly manages the transactional aspects of the marketplace, separate from the NFT listing and user management services. Statelessness: each transaction request includes the necessary information, and there is no session state maintained on the server. Security Mechanisms:  
Smart Contract Integration: the marketplace API interacts directly with smart contracts on the blockchain to handle ownership transfer and payment verification. JWT Authentication: buyers and sellers must authenticate using JWT tokens before initiating any transactions. Example Endpoints:  
POST/marketplace/transactions  
Description: initiates the purchase of an NFT. Request Body:  
[\"nftId\": \"xyz789\", \"buyerId\": \"12345\", \"price\": \"2 ETH\", \"contractAddress\": \"0 xContractAddress\"]  
Response: 201 created with the transaction details. [\"transactionId\": \"tx67890\", \"status\": \"completed\", \"buyer\": \"johndoe\", \"nftId\": \"xyz789\"]  
GET/marketplace/transactions/{transactionId}  
Description: retrieves details of a specific NFT transaction. Response: 200 OK  
[\"transactionId\": \"tx67890\", \"status\": \"completed\", \"buyer\": \"johndoe\", \"nftId\": \"xyz789\", \"amount\": \"2 ETH\"]  
The final deliverable for this sprint is the architecture diagram shown in Figure 3. This diagram illustrates the relationships and interactions between microservices, which are the basic building blocks of the proposed NFT marketplace. Each microservice is responsible for specific roles, and every single microservice interacts with other microservices through APIs. Here is an example of the one developed microservices and an explanation of their relationships given in diagram:  
NFT Listing Service: Manages the creation, update, and deletion of NFT listings and interacts with blockchain smart contracts to verify NFT ownership. Communicates with Smart Contract (Blockchain) to verify and record NFT ownership when NFTs are listed, updated, or sold. Marketplace Service: to provide NFT metadata and listings for purchase and bidding operations. API Interaction: exposes NFT-related endpoints (e.g., /nfts, /nfts/(nftId)) to manage listings and retrieve NFT details. Blockchain Interaction: interacts with the deployed smart contract on the blockchain to ensure decentralized ownership of NFTs. For the second sprint, students decided to use WordPress and PHP as the server-side scripting language. In this way, they took advantage of the WordPress REST API infrastructure. They implemented the user management API by leveraging the WordPress REST API and custom PHP code for handling CRUD operations, pagination, and versioning. All the logic for user management was implemented as a custom WordPress plugin.