๐Ÿ”ฅ
Boilerplate Projects
Moralis Boilerplate starter projects to help you get started in different frameworks.

Web3 Vanilla Javascript Starter Project

This simple app logs in user, creates a user profile in Moralis Database and syncs user transactions into Moralis Database.
index.html
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<title>Vanilla Boilerplate</title>
5
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>
6
<script src="https://unpkg.com/moralis/dist/moralis.js"></script>
7
</head>
8
โ€‹
9
<body>
10
<button id="btn-login">Moralis Metamask Login</button>
11
<button id="btn-logout">Logout</button>
12
<script type="text/javascript" src="./main.js"></script>
13
</body>
14
</html>
Copied!
main.js
1
const serverUrl = "https://xxxxx.yourserver.com:2053/server";
2
const appId = "YOUR_APP_ID";
3
Moralis.start({ serverUrl, appId });
4
โ€‹
5
/** Add from here down */
6
async function login() {
7
let user = Moralis.User.current();
8
if (!user) {
9
try {
10
user = await Moralis.authenticate({ signingMessage: "Hello World!" });
11
console.log(user);
12
console.log(user.get("ethAddress"));
13
} catch (error) {
14
console.log(error);
15
}
16
}
17
}
18
โ€‹
19
async function logOut() {
20
await Moralis.User.logOut();
21
console.log("logged out");
22
}
23
โ€‹
24
document.getElementById("btn-login").onclick = login;
25
document.getElementById("btn-logout").onclick = logOut;
Copied!

Web3 React Boilerplate

This React Boilerplate has all the features to start your new dapp such as:
  1. 1.
    Authenticate user via their wallet
  2. 2.
    Full WalletConnect Support
  3. 3.
    Page for User Balances
  4. 4.
    Page for User NFTs
  5. 5.
    Page for User Transactions
  6. 6.
    Page or Wallet
  7. 7.
    Page for Decentralized Exchange (DEX)
GitHub - ethereum-boilerplate/ethereum-boilerplate: The ultimate full-stack Ethereum Dapp Boilerplate which gives you maximum flexibility and speed. Feel free to fork and contribute. Although this repo is called "Ethereum Boilerplate" it works with any EVM system and even Solana support is coming soon! Happy BUIDL!๐Ÿ‘ทโ€โ™‚๏ธ
GitHub
Cross-chain web3 boilerplate.

Web3 Unity Boilerplate

The Unity Boilerplate include C# Moralis SDK and has an example Unity scene allowing you to login your users via their wallets, read their tokens and NFTs, interact with smart contracts and much more.
GitHub - ethereum-boilerplate/ethereum-unity-boilerplate: Moralis / Unity3D Boilerplate project used to demonstrate how to integrate Moralis and Moralis Web3Api with Unity 3D.
GitHub
Web3 Unity Boilerplate

Web3 React Native Boilerplate (alpha)

This boilerplate is not for production use.
This React Native Boilerplate has all the features to start your new iOS or Android web3 app such as:
  1. 1.
    Authenticate user via their wallet
  2. 2.
    Full WalletConnect Support
  3. 3.
    Page for User Balances
  4. 4.
    Page for User NFTs
  5. 5.
    Page for User Transactions
  6. 6.
    Page or Wallet
  7. 7.
    Page for Decentralized Exchange (DEX)
GitHub - ethereum-boilerplate/ethereum-react-native-boilerplate: The ultimate full-stack Ethereum React Native Dapp Boilerplate which gives you maximum flexibility and speed. Feel free to fork and contribute. Although this repo is called "Ethereum Boilerplate" it works with any EVM system! Happy BUIDL!๐Ÿ‘ทโ€โ™‚๏ธ
GitHub
Cross-chain mobile web3 boilerplate

NFT Marketplace Boilerplate

A simple NFT Marketplace allowing user to do the following:
  1. 1.
    Search NFTs
  2. 2.
    Buy NFTs
  3. 3.
    Sell NFTs
  4. 4.
    Works cross-chain
GitHub - ethereum-boilerplate/ethereum-nft-marketplace-boilerplate
GitHub
NFT Marketplace Boilerplate