• About
  • Landing Page
  • Buy JNews
SB Crypto Guru News- latest crypto news, NFTs, DEFI, Web3, Metaverse
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • GENERAL
    • ALTCOINS
    • ETHEREUM
    • CRYPTO EXCHANGES
    • CRYPTO MINING
  • BLOCKCHAIN
  • NFT
  • DEFI
  • WEB3
  • METAVERSE
  • REGULATIONS
  • SCAM ALERT
  • ANALYSIS
No Result
View All Result
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • GENERAL
    • ALTCOINS
    • ETHEREUM
    • CRYPTO EXCHANGES
    • CRYPTO MINING
  • BLOCKCHAIN
  • NFT
  • DEFI
  • WEB3
  • METAVERSE
  • REGULATIONS
  • SCAM ALERT
  • ANALYSIS
No Result
View All Result
SB Crypto Guru News- latest crypto news, NFTs, DEFI, Web3, Metaverse
No Result
View All Result

The best way to Construct a Web3 Medium Clone » Moralis » The Final Web3 Growth Platform

SB Crypto Guru News by SB Crypto Guru News
June 24, 2022
in Web3
0 0
0
The best way to Construct a Web3 Medium Clone » Moralis » The Final Web3 Growth Platform


Medium is a platform the place readers can learn inspirational ideas and forward-thinking concepts from passionate content material creators. There’s an ideal risk that you just might need learn articles from this common platform and in addition printed compositions there. Nonetheless, though Medium has its professionals, one of many cons is its centralized nature. That’s not simply the case for Medium however many different common platforms. Thus, programmers are beginning to create decentralized choices, reminiscent of a Web3 various to Medium, a Web3 Twitter clone, and so on. If you need to discover find out how to construct a Web3 Medium clone, you’ll discover this information massively helpful!

This tutorial on making a Web3 Medium clone will profit those that determine to get their arms soiled by taking actionable steps. If you find yourself constructing a Web3 Medium clone, you’ll learn to publish weblog articles to the blockchain. The printed articles might be within the type of NFTs (non-fungible tokens), which might be minted utilizing a wise contract. Therefore, you’ll be taught Solidity fundamentals. Additionally, we’ll present you find out how to use Hardhat to compile, deploy, and confirm good contracts simply. Additionally, you will learn to add NFT metadata to IPFS. Plus, you’ll see find out how to take advantage of out of your JavaScript abilities and create a neat Web3 UI utilizing React. Lastly, you’ll learn to make the most of Moralis – the final word Web3 improvement platform. So, create your free Moralis account earlier than shifting on.

Web3 Medium Demo

Like most Web3 purposes, our Web3 Medium clone additionally begins with Web3 authentication:

By clicking on the “Join Pockets” button, customers get to pick their favourite Web3 pockets to finish their Web3 login. Since MetaMask continues to be the most well-liked crypto pockets, our instance consumer determined to authenticate with MetaMask. So, after clicking on “Metamask”, this pockets’s browser extension pops up asking to pick an account:

As soon as the consumer selects an account and clicks on “Subsequent”, they should full the authentication by clicking on the “Join” button:

Then, the consumer lands on the homepage of our Web3 Medium clone:

Trying on the screenshot above, you’ll be able to see that our Medium clone for Web3 has three sections. On the edges, there are sidebars, and within the center is the “Advisable Blogs” part (homepage). That is the place the newest blogs are displayed. These blogs are NFTs saved on the Polygon testnet (Mumbai). So, if the customers determine to learn one of many blogs, they should click on on it. By doing so, the Web3 Medium clone shows the chosen submit within the central part:

As you’ll be able to see within the picture above, every weblog submit incorporates a title and content material. To return to the homepage (the place all weblog posts are listed), customers have to click on on the “house” icon within the left sidebar. The icon under “house” takes customers to the web page that shows their weblog posts:

To create new weblog posts, customers have to click on on the “write” icon:

Now, let’s check out what publishing a weblog submit utilizing our Web3 Medium clone appears like.

Publishing Posts with Web3 Medium – Demo Continuation

As soon as customers are on the “write submit” web page, they will kind their submit’s title and content material. Then, they will publish it by clicking on the “Publish” button: 

Nonetheless, since our Web3 Medium posts blogs within the type of NFTs, customers additionally want to verify the associated on-chain transaction. As such, a MetaMask immediate will present the small print (see the screenshot above). Thus, customers can see that they might want to pay one MATIC plus the fuel charge to publish their posts. Furthermore, in the event that they agree with the required particulars, they should scroll down their MetaMask extension and click on on “Verify”:

As soon as the transaction goes by means of, our Medium clone returns the next message:

We are able to additionally affirm that the above transaction was executed correctly in a number of methods. As an example, customers can make the most of their MetaMask to see their newest transactions:

After all, they will additionally see their newest submit on the homepage:

Moreover, for these of you who need further affirmation, you may also use blockchain scanners (PolygonScan in our case):

Nonetheless, since our Web3 Medium’s weblog posts come within the type of NFTs, you may also view them on OpenSea:

Construct a Web3 Medium Clone with Hardhat, React, and Moralis

After seeing what a wonderful dapp we constructed, you most likely can’t wait to create your personal occasion of a Web3 Medium clone. In that case, it’s best to put aside about 70 minutes. Furthermore, along with our directions and screenshots, make the most of the video on the backside of this text. That is additionally the place our timestamps all through this text level to. Nonetheless, listed below are the steps you’ll need to finish if you wish to construct a Web3 Medium clone rapidly and simply:

  • Arrange Hardhat
  • Create, compile, and deploy your NFT-minting good contract
  • Initialize a React mission and connect with Moralis’ SDK
  • Arrange Web3 authentication
  • Use React to construct the Web3 frontend of your dapp:
    • Create sidebars
    • Create a listing of blogs (your homepage)
    • Create a weblog web page
    • Create a publishing web page
  • Add to IPFS (storing NFTs’ metadata in a decentralized method)
  • Arrange the minting performance of your Web3 Medium clone
  • Querying NFTs utilizing the final word Web3 API 

After all, you don’t have to start out from scratch. You’ll be able to entry our “starter” code and our “last” code on GitHub. 

Word: The next directions and the video tutorial assume you begin with the “starter” code. In any case, that is the trail it’s best to take if you wish to get essentially the most out of this instance mission.    

Set Up Hardhat

Word: If you’re used to working with Remix, you’ll be able to take that route as an alternative of deploying your good contract with Hardhat.

Use your favourite code editor (we use Visible Studio Code [VSC]) and open a brand new folder. Then, use VSC’s terminal to put in Hardhat utilizing the “npm i -D hardhat” command:

Subsequent, use the “npx hardhat” command to create a brand new Hardhat mission. Then, use the terminal and choose the apparent choices to finish the Hardhat setup. Primarily, it is advisable to click on on “enter” 4 instances. Lastly, you’ll additionally wish to set up all dependencies:

  • “npm i @openzeppelin/contracts” to make use of Web3 contract templates from OpenZeppelin
  • “npm i -D dotenv” to work with the “.env” file that can maintain the atmosphere keys
  • “npm i -D @nomiclabs/hardhat-etherscan” to confirm your good contract

Web3 Medium Good Contract

When you’ve put in all dependencies, you’re able to create your Web3 Medium good contract (4:17). You’ll begin by renaming the good contract template (“Greeter.sol”):

Subsequent, you’ll write the right strains of code. In case you aren’t able to be taught the fundamentals of Solidity, you may also copy the code from GitHub (“Medium.sol“). At this level, you recognize that our Web3 Medium clone wants to have the ability to take the metadata and convert it into NFTs. As such, your good contract might be minting ERC-721 tokens utilizing an ERC-721 contract.

Compile and Deploy Your ERC-721 Contract

Together with your occasion of our “Medium” good contract prepared, you will need to make the most of Hardhat to compile, deploy, and confirm it (11:04). That is the place the “sample-script.js” file will make issues loads less complicated for you. You’ll rename it to “deployMedium.js” and exchange “Greeter” and “greeter” with “Medium” and “medium”:

Additionally, you will add correct parameters inside “.deploy”:

Then, you’ll make the mandatory tweaks to the “hardhat.config.js” file (12:31). You’ll use this file to compile and confirm your good contract. On the prime of the file, you’ll add the next strains of code:

require(“@nomiclabs/hardhat-etherscan”); 
	const dotenv=require(“dotenv”);
	
	dotenv.config();

Additionally, you will have to tweak “module.exports” on the backside of the file:

The above-market variables are those you’ll retailer in your “.env” file:

After all, additionally, you will have to populate the above variables with acceptable values. For detailed steerage on discovering these values, use the video under, beginning at 14:48. So far as “Polygon_Mumbai” goes, you employ the “Beginning with Moralis – New Admin UI” part under. With these values in place, you’ll be able to compile, deploy, and confirm your good contract (16:40). As soon as your good contract is reside, you can begin interacting with it utilizing PolygonScan (18:47). Nonetheless, our aim is to create a neat UI for that goal. As such, it’s time you create the frontend to your Web3 Medium clone. 

Web3 Medium Clone Frontend

In the case of constructing the Web3 frontend, issues are fairly just like Web2. Once you deal with utilizing React, you begin by initializing a React mission (22:04). That is the place it’s best to clone the “starter” code if you happen to haven’t achieved so but. Moreover, earlier than you progress one, ensure to stick your Moralis dapp’s particulars into the “index.js” file. Use the “Beginning with Moralis – New Admin UI” part for assist with the brand new admin UI. Then, utilizing the “yarn begin” command, you need to be wanting on the clean canvas with our Web3 Medium construction set in place:

Beginning at 23:39, you’ll first deal with Web3 authentication. Utilizing Moralis’ web3uikit, you’ll have a totally purposeful “Join Pockets” button prepared in underneath two minutes. Subsequent, you’ll create each sidebars (25:24), the checklist of blogs (29:36), a weblog web page (38:41), and the “publish weblog” web page (44:53). 

Web3 Medium Clone Backend

One of many key elements of your Web3 Medium’s backend is your ERC-721 good contract, which is already reside. Nonetheless, to make sure that your dapp runs as offered within the demo above, it is advisable to implement the suitable code. As such, ensure to make use of the video tutorial under to automate the importing of metadata to IPFS (48:05). That is the place you’ll use the “NewStory.js” file. Because of the ability of the Moralis SDK, which incorporates IPFS integration, “saveFile” will do a lot of the heavy lifting. Furthermore, with the metadata in place, you should utilize your good contract to mint internet Medium posts as NFTs (53:35). That is the place our in-house skilled will present you find out how to use PolygonScan to acquire your contract’s particulars:

Lastly, you’ll additionally learn to use Moralis’ Web3 API to question on-chain information (58:57). That is how you’ll populate your Medium clone’s homepage and the “Your Blogs” web page. You’ll use the “homeAuth.js” and the “MyBlogs.js” information. Because of the “fetchAllNfts” operate and the “getNFTOwners” hook, you’ll effortlessly entry all of the on-chain data you want.

Beginning with Moralis – New Admin UI 

Word: Our in-house skilled within the video tutorial under makes use of the Moralis admin legacy UI. As such, you’ll be able to comply with his lead and swap to the previous UI:

Nonetheless, under are additionally the directions that will help you navigate the up to date UI:

  1. Log in to your Moralis admin space. In case you haven’t created your free Moralis account but, use the hyperlink acknowledged at the start of this text.  
  1. Inside your Moralis admin panel, create a brand new dapp:
  1. Choose your atmosphere – go along with “Testnet”:
  1. Select “Polygon Mumbai” and click on on “Proceed”:
  1. Choose town closest to you:
  1. Identify your dapp and full the method by clicking on the “Create Your Dapp” button:

As soon as your dapp is up and operating, you’ll be able to acquire the Mumbai testnet’s endpoints and your dapp’s particulars (URL and ID):

  1. Click on on “Setting” to your newly created dapp:
  1. Choose “Chains” on the suitable aspect after which click on on “Settings” subsequent to “Polygon Mumbai”:
  1. Copy Mumbai’s endpoint:
  • Accessing Dapp ID and URL:
  1. Click on on “Settings” to your newly created dapp:
  1. Copy your dapp’s URL and ID:

Right here’s the video tutorial we’ve been referencing above:

The best way to Construct a Web3 Medium Clone – Abstract

By following our lead and the above video tutorial, you had an opportunity to construct your personal Web3 Medium clone. You additionally discovered find out how to create, compile, deploy, and confirm an ERC-721 good contract. Additionally, you had an opportunity to refresh your React abilities by making a user-friendly frontend. Most significantly, you discovered find out how to make the most of the top of the present Web3 tech stack – Moralis. In consequence, you now have the power to make use of this final Web3 backend platform for all of your future Web3 endeavors. 

In the event you loved in the present day’s instance mission, we encourage you to take a look at our different “clone” tutorials:

Ensure to discover different blockchain improvement subjects on the Moralis YouTube channel and the Moralis weblog. A few of our newest articles embody constructing a Web3 role-playing sport, making a social media dapp, exploring a Binance dapp API, the Ethereum Merge, an Ethereum NFT API, and a Polygon NFT API, and so on. Nonetheless, you may additionally wish to take a look at the Moralis Academy. In any case, this is among the finest locations to develop into a Web3 developer quick and with confidence.





Source link

Tags: Bitcoin NewsBuildCloneCrypto NewsCrypto UpdatesDevelopmentLatest News on CryptoMediumMoralisplatformSB Crypto Guru NewsUltimateWeb3
Previous Post

KPMG Joins Metaverse for Crypto, Web3 Journey

Next Post

Ought to You Copyright Your NFTs?

Next Post
Ought to You Copyright Your NFTs?

Ought to You Copyright Your NFTs?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Trending
  • Comments
  • Latest
Meta Pumps a Further  Million into Horizon Metaverse

Meta Pumps a Further $50 Million into Horizon Metaverse

February 24, 2025
The Metaverse is Coming Back! – According to Meta

The Metaverse is Coming Back! – According to Meta

February 7, 2025
How to Get Token Prices with an RPC Node – Moralis Web3

How to Get Token Prices with an RPC Node – Moralis Web3

September 3, 2024
AI & Immersive Learning: Accelerating Skill Development with AI and XR

AI & Immersive Learning: Accelerating Skill Development with AI and XR

June 4, 2025
NFT Rarity API – How to Get an NFT’s Rarity Ranking – Moralis Web3

NFT Rarity API – How to Get an NFT’s Rarity Ranking – Moralis Web3

September 6, 2024
Samsung Unveils ‘Moohan’ to Compete with Quest, Vision Pro

Samsung Unveils ‘Moohan’ to Compete with Quest, Vision Pro

January 29, 2025
Bitcoin Enters New Era: Derivatives Dominate As Futures Volume Hits 0 Trillion

Bitcoin Enters New Era: Derivatives Dominate As Futures Volume Hits $650 Trillion

0
Why Liquidity Matters More Than Ever For Bitcoin

Why Liquidity Matters More Than Ever For Bitcoin

0
Crypto Investor Fought Attackers, Dodged Kidnapping Plot

Crypto Investor Fought Attackers, Dodged Kidnapping Plot

0
Bitcoin Gains as Altcoins Falter in June 2025 Amid Institutional Inflows

Bitcoin Gains as Altcoins Falter in June 2025 Amid Institutional Inflows

0
Comment | Now is the time to fight for US arts funding – The Art Newspaper

Comment | Now is the time to fight for US arts funding – The Art Newspaper

0
Bitcoin Bullish MACD, Monthly Close Fuel Bullish Outlook

Bitcoin Bullish MACD, Monthly Close Fuel Bullish Outlook

0
Bitcoin Enters New Era: Derivatives Dominate As Futures Volume Hits 0 Trillion

Bitcoin Enters New Era: Derivatives Dominate As Futures Volume Hits $650 Trillion

July 5, 2025
Bitcoin Bullish MACD, Monthly Close Fuel Bullish Outlook

Bitcoin Bullish MACD, Monthly Close Fuel Bullish Outlook

July 5, 2025
Amber International Raises .5M to Boost 0M Crypto Reserve

Amber International Raises $25.5M to Boost $100M Crypto Reserve

July 5, 2025
WLFI Token Could Soon Be Tradable—Early Supporters Set for Partial Unlock

WLFI Token Could Soon Be Tradable—Early Supporters Set for Partial Unlock

July 5, 2025
Bitcoin Gains as Altcoins Falter in June 2025 Amid Institutional Inflows

Bitcoin Gains as Altcoins Falter in June 2025 Amid Institutional Inflows

July 5, 2025
Bitcoin Sees Profit‑Taking As Lawmakers Gear Up For ‘Crypto Week’

Bitcoin Sees Profit‑Taking As Lawmakers Gear Up For ‘Crypto Week’

July 5, 2025
SB Crypto Guru News- latest crypto news, NFTs, DEFI, Web3, Metaverse

Find the latest Bitcoin, Ethereum, blockchain, crypto, Business, Fintech News, interviews, and price analysis at SB Crypto Guru News.

CATEGORIES

  • Altcoin
  • Analysis
  • Bitcoin
  • Blockchain
  • Crypto Exchanges
  • Crypto Updates
  • DeFi
  • Ethereum
  • Metaverse
  • Mining
  • NFT
  • Regulations
  • Scam Alert
  • Uncategorized
  • Web3

SITE MAP

  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us
  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • GENERAL
    • ALTCOINS
    • ETHEREUM
    • CRYPTO EXCHANGES
    • CRYPTO MINING
  • BLOCKCHAIN
  • NFT
  • DEFI
  • WEB3
  • METAVERSE
  • REGULATIONS
  • SCAM ALERT
  • ANALYSIS

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.