Complete Dapp developer guide + Free course to become a Cardano developer

So, I heard that you want to develop a Dapp.

If that's the case, you came to the right place. Here, I'll explain everything you need to know to start your journey as a Cardano Dapp/Web3 developer. I'll also provide a link to my free course, but read this before jumping in!

Ok, are you ready? Let's go! πŸ”₯

What is a Dapp?

A Dapp (Decentralized app) is a software application that runs on a

decentralized network
(click on the highlight for a pleasant surprise. All the highlights have it! πŸ˜ƒ). A Dapp is just like any other software application. It could be a website or an app on your phone or computer. What makes a Dapp different than a traditional app is that it's built on a decentralized network, like Cardano or Ethereum.

Running an app in a decentralized network gives you extra possibilities regarding what your app can do. A Dapp can:

  • Mint/burn NFTs
  • Charge, pay, and redistribute money.
  • Issue certificates.
  • Act as an escrow.
  • Provide loans.
  • Manage recurrent payments.
  • Provide a platform for trustless governance.
  • Manage identities.
  • And many other things.

And the best of all is that your Dapp will run in a system that is trustless, permissionless, and independent. (And if you use Cardano, it's cheap for your users, too 😜.)

It's not without sacrifices, though. A Dapp is a product of combining many software engineering disciplines. To write a Dapp, you have to:

  • Securely process and manage your user's data.
  • Securely interact with the blockchain.
  • And provide a beautiful and easy-to-use interface to make your users so happy that they'll never stop talking about your Dapp.

The components that constitute a Dapp.

Yeah yeah yeah... a Dapp is just an app that runs on a decentralized network... cool. The thing is, I also don't know how regular apps work.

β€” Said someone, probably.

I got you! Let's have a brief overview of the components that constitute a Dapp.

To create a Dapp, you need three things (two are a must):

  • A frontend.
  • A way to interact with the blockchain.
  • A backend (optional, but usually needed).

The frontend

The frontend is the component of a Dapp users interact with. The visual component. It can be a website, a mobile app, or a desktop app.

If you want to develop a mobile app, you have to take into account that each platform (mainly Android and iOS) has its own programming languages, set of technologies, and tools.

  • Android uses Java and Kotlin as
    programming languages
    and AndroidStudio as its main
    IDE
    .
  • iOS uses Objective-C and Swift as programming languages and XCode as the main IDE.

Personally, I develop my mobile apps in Flutter (

cross-platform framework
) using Dart programming language and VSCode/Vim as my IDEs. And I use the platform-specific technologies previously mentioned to write minor platform-specific code. I highly recommend the Flutter framework.

If it seems like a lot, it's because it is a lot. That's why most companies/projects start with the one that better fits its use-case and then add the rest when/if needed.

If you're unsure which one to pick, pick web (more reach and easier to access talent). Make sure that your frontend is mobile-friendly, beautiful, and fast, and you're golden!

Once your frontend is working, you have a beautiful Dapp that doesn't do anything. Let's add some functionality by interacting with the blockchain!

The interaction with the blockchain

Blockchains are just a bunch of nodes (servers/computers) that interact following a specific set of rules. If you want to talk to the blockchain, all you have to do is interact with one of its nodes, and the node will propagate your interaction with the rest of the nodes. That's it!

There are two main ways to interact with a node:

  • Spin up your own node: If you have your own node, your Dapp can talk with it directly! Anyone can do it (although I don't recommend it unless you know what you are doing).
  • Use a third-party API: Some companies will maintain Cardano nodes for you and provide an
    API
    so you can talk to them! (Way easier β€” and cheaper β€” than spinning up your own node!) Usually, you pay only for the request you made. So if no one uses your Dapp, you pay nothing, and if everyone uses it, you pay proportionally.

The Cardano blockchain runs something called "smart contracts" (I'll leave the details for the course). Smart contracts are automated digital agreements. They are self-executing, incorruptible, unalterable, and don't require any actions or the presence of third parties.

When you communicate with the Cardano blockchain, you can interact with smart contracts already present there. Now, if you only interact with smart contracts already present in the blockchain, you can only do so much. In most cases, you'll need to write your own smart contracts and deploy them in the blockchain. That's when Plutus comes in.

Plutus is the smart contract platform of the Cardano blockchain. It allows you to write applications that interact with the Cardano blockchain. To write Plutus contracts, you have to know:

  • Haskell: Haskell is the programming language for Plutus contracts. It's a functional programming language that very few can use. ("Haskell for complete beginners" is one of the free courses πŸ˜‰.)
  • Blockchain protocols: You have to know how the Cardano blockchain itself works under the hood (node communication, the eUTxO model, etc.).
  • How to use all the Cardano ecosystem and Plutus tools.

Done! That's enough to build a Dapp! Write a smart contract, deploy it, and create the frontend to interact with it. But, wait! There's more! For an extra $99, you get the exclusive... just kidding! πŸ˜† There really is more, though 🀣.

If you have to interact with the blockchain for everything your app does, some apps will be too expensive to use! An NFT project can get by with just a frontend and a smart contract to mint the NFTs. But, if you β€” for example β€” want to create a social media platform that logs everything into the blockchain, your users will have to pay transaction fees for everything they do! Publishing a post? Transaction! πŸ’Έ Commenting? Transaction! πŸ’Έ Hitting the like button? Transaction! πŸ’Έ

That's one of the main reasons β€” but not the only one β€” you'll still need a backend.

The backend

The back end of your Dapp is everything that happens under the hood (i.e., everything that isn't frontend).

Some call smart contracts "the backend of Dapps." Well, if you only use smart contracts, that's the case. But most often than not, smart contracts are just a part of what constitutes the backend.

Backends do most of the heavy lifting:

  • The database is the backend's component that stores users' data and other important information. When you leave β€” for example β€” a comment on a social network, everything is saved in a database. Who wrote it (you), in which post, at what time, how many likes did it get, etc. There are tons of databases, languages, and tools: SQL, MySQL, MongoDB, Oracle, Firebase Firestore, etc. Even though there are dozens of options, programmers usually pick a few and always use the same.
  • Business logic: Databases by themselves don't do much. That's why you need to write code that interacts with the database, the frontend, and the smart contract. Example (hover to zoom): backend logic
  • Communication with other backends.
  • Manage the identity and permissions of the user.
  • Other tasks like sending emails and notifications, periodically checking the state of the blockchain, or other information like stocks, the weather, etc.

That's a lot to code from scratch! 😱 Lucky us, we don't need to! 😁 There are tons of solutions that allow us to go from nothing to a fully functional backend in a matter of days!

Here are some tech/services that I use:

  • Firebase
  • Google Cloud
  • AWS (Amazon Web Services)

Those are highly performant and easy to set up and use. But there's a catch. Those are centralized backends, which depending on your needs (avoid censorship and stuff like that), may defeat the purpose of your Dapp. One way to combat this is to use a decentralized off-chain storage solution, like IPFS.

IPFS (InterPlanetary File System) is a distributed file system for storing and accessing data. So, rather than storing data in a centralized database, the IPFS system distributes and stores the data in a peer-to-peer network.

Putting everything together

Once you have all that, you have to connect everything together. Usually, your frontend and/or backend will communicate through HTTP requests. And your frontend and backend will communicate with the blockchain via a third-party API or via your node.

And that's it! With all those tools, you can build the Dapp for your dreams!

And now is when you go:

"And that's it? Are you kidding me? That's so much! It'll take ages to learn all that!"

β€” Every coder when starting their coding journey.

Yes. That's one of the main reasons most projects need several coders. The usual is that a coder specializes in one of those three components and works with others to build the Dapp.

You can learn all three (frontend, backend, blockchain) simultaneously. But, it'll take a lot of time and effort until you can produce production-quality code in all three.

A better approach would be: Choose one, become good at it, and advance to the next one, or partner up with your counterparts. There are virtually no cons, and the pros are obvious:

  • A significantly shorter period and effort until you become good enough to produce production-quality code.
  • Once you master one, you could get a job (full-time or part-time) and earn a lot of money while learning the other in your free time.
  • Once you master one, you can partner up with your counterparts. You'll be able to start building in 1/3 of the time (the time it takes you to learn just the one), and (because you'll be 3) it'll take ~1/3 of the time to finish.

Now, which one should you start with? That's like choosing a starter in Pokemon. They're all great options, and you can't go wrong with either one (except for Squirtle πŸ‘€).

The caveat is that if you don't have many technical skills, starting with backend development will be significantly harder. But not impossible.

If you pick frontend or backend, Frecodecamp is a good starting point. You can also search "web development for beginners" on YouTube.

If you want to start with blockchain development, well, that's why I'm here for! I'm creating many free courses just for that! I'll explain in detail in the final section.

Free course to become a Cardano developer

As we saw, most of what you need to learn is already out there and free to access. Except for Cardano and Plutus. The few available resources (Cardano official docs, the Plutus Pioneer Program, and such) are great resources. But only for experienced developers with substantial Haskell coding experience.

That's the current Achille's heel of the Cardano ecosystem. Few people have the skillset to even start learning about Plutus!

That's what I intend to fix. I want to fill the gap between people with zero coding experience and currently available resources.

And for that, I'm creating a few courses:

  1. Haskell for complete beginners: Haskell course for people that have never written a line of code before.
  2. Haskell for Plutus: Plutus developers utilize many tools and language extensions on top of the default programming language. I'll cover all those in this course.
  3. Cardano under the hood: This will be a theoretical course about how Cardano works under the hood and why. This information is critical to being a productive Cardano developer and/or community member.

Anyone that completes those courses will be able to go through current Cardano resources (like the Plutus Pioneer Program) without breaking a sweat.

Creating the courses will be challenging. It'll take a lot of time and effort, but we'll get there! πŸ’ͺ

I'm working in the Haskell for complete beginners course as I'm publishing this. And because I don't want to work in obscurity for months, I'll be releasing each lesson as soon as it's done. So you'll be able to go along and finish the courses as soon as I finish creating them πŸ˜‚.

The courses will be text-based. That way, I can create, update, and improve them faster. I also coded my own platform (the one you are using right now) to build all the features I want to use (like the clickable highlights and the tabs).

How do I get started?

You don't need to sign up or pay anything. But if you want to know each time I release a lesson, you can follow me on Twitter or sign up for the newsletter that I just created for this exact reason (below). Else, you can periodically check the course here.

Let's build some Cardano Dapps together!! πŸ˜„