Why use Moralis?
What is Moralis?
Think Firebase of crypto. Moralis provides managed backend for blockchain projects. Automatically syncing the balances of your users into the database, allowing you to set up on-chain alerts, watch smart contract events, build indexes, and so much more. All features are accessed through an easy-to-use SDK. All features Moralis provides are cross-chain by default 🤯.
Why use Moralis?
Moralis is the fastest way to build and deploy dApps on Ethereum, BSC, Polygon, Solana, and Elrond (more coming). All Moralis dApps are cross-chain by default. Building on Moralis ensures that your dApp is future-proof. Even if new blockchains are invented, your dApp will instantly work on any chain.
Whether you are building your first blockchain project or are already a seasoned developer - Moralis will make your projects easier to build, maintain and improve.
The video below explains more in-depth what Moralis is and how it helps your project.
{% embed url="https://www.youtube.com/watch?v=txHnWDRB728&ab_channel=MoralisWeb3" %} Short lecture explaining the value-proposition of Moralis. {% endembed %}
What are Moralis Servers?
At the core of every dApp built with Moralis is a Moralis Server. Together with the Moralis SDK, it's what allows you to quickly create a dApp with user authentication and blockchain data such as user token balances, NFTs, transactions, and events.
Let's quickly summarize the different components of a Moralis Server that you will be using.
Database
Here is where all of your data will be stored. For example, when a user signs in to your dApp using crypto wallet authentication, that wallet address will automatically be saved to your database together with any data you have configured, such as token balances, historical transactions, or events.
You can then use this data instantaneously in your dApp frontend.
You can read more under the sections: Moralis Server Database and User Authentication.
Cloud Code
If you need to execute backend code in your dApp, you can do so by using Moralis' Cloud Code feature. Maybe you need to do aggregation or filtering on data that requires computation on the backend. By using cloud code, you can write functions in JavaScript, which can then be triggered by either calling it from your dApp, when certain events happen or triggered by a scheduled job.
You can read more about this in the cloud code section.
The Moralis SDK
Moralis' SDK is how we tie all of this together. Our JavaScript SDK is how your dApp interacts with your Moralis Server. Using the SDK, you can authenticate users, either through username and password or through a crypto wallet like MetaMask You can also use the SDK to get and set user data to fetch balances, NFTs, events, or transactions.
You can read more about the SDK by clicking here.
Welcome to the Moralis Documentation
{% embed url="https://www.youtube.com/watch?v=TAJnP8SLVI4" %}
We're excited for you to discover all the cool things you can build using Moralis with just a few lines of code. Before we get started, let's go over some important information.
Expectations
- The docs assume that you have some programming knowledge.
- The docs are a work in progress and receive regular updates.
- If you find something confusing in the docs or have suggestions for improvements let us know by posting in the Moralis forum.
- If you find a bug in the Moralis SDK or server dashboard, please report it in this GitHub repo, along with a detailed description and steps to reproduce the issue. For technical questions, or if you need help with your code, then please create a post in the Moralis forum. If you're unsure where to post, then please ask by creating a post in the Moralis forum or on the FAQ & How to Get Help page.
Prerequisites
The documentation assumes that you have some type of knowledge with JavaScript, working with objects, querying databases, and some Web3 development. See the Prerequisites page for more details.
{% content-ref url="introduction/pre-requisites.md" %} pre-requisites.md {% endcontent-ref %}
If you're new to Web3 development, then please watch the following video:
{% embed url="https://youtu.be/hy7jCQdC2Wg" %}
For more experienced developers, then make sure to watch the following video on how to build a dApp with Moralis using Truffle and Ganache.
{% embed url="https://youtu.be/rd0TTLjQLy4" %}
Setup Your First dApp with Moralis
See the Getting Started section to guide you through setting up your first server with Moralis and how to integrate it with your dApp:
{% content-ref url="moralis-dapp/getting-started/" %} getting-started {% endcontent-ref %}
Or follow our guide on how to make a simple dApp in three minutes:
{% content-ref url="guides/build-a-simple-dapp-in-3-minutes.md" %} build-a-simple-dapp-in-3-minutes.md {% endcontent-ref %}