Create a Solana dApp from scratch

What are we building?

Episode 1
6 months ago
3 min read

Before we dive into this series, let's start by having a quick overview of what we are trying to achieve. I'll also list a few prerequisites that should help following the series but, no worries, nothing too drastic — we are building "from scratch" after all.

A decentralised Twitter

By the end of this series, we'll have a fully functional Twitter-like application where anyone can use their wallet to connect and start publishing tweets.

Note that I've already deployed this project on devnet so you can have a little play around.

Demo on Solana devnet

Screenshot of the Twitter Solana dApp

Here's a quick overview of the features it will have:

  • It will be able to integrate with any of the wallets in this list.
  • Users will connect their wallet to log in to the application.
  • Logged in users will be able to send tweets up to 280 characters.
  • They will also be able to add an optional "topic" field to help search for tweets.
  • Users will be able to read tweets without needing the be logged in.
  • Users will be able to view all tweets (from everyone) or filter their search by author or topics.

Regarding the implementation:

  • Tweets will be stored as their own Solana account, therefore, making them public on the blockchain.
  • When sending new tweets, users will pay for the transaction and the storage required to hold their tweet on the blockchain.
  • We'll use the Anchor framework to improve our developer's experience.
  • We'll make RPC calls to the Solana blockchain — via Anchor's JavaScript library — to fetch and filter tweets on the blockchain.

Don't worry if not all of the points above make sense to you yet, we will go through them in this series.

Additionally, once we've implemented all of these features, we'll likely build on top of them as additional follow-up articles. For instance, we could allow users to edit their tweets or even delete them so they can get their rent-exempt money back — again, we'll explain what "Rent" is and how it works in Solana in this series.

Are you excited? I'm excited! Alright, let's go through a few prerequisites and get started.

Prerequisites

There aren't many prerequisites for this series as we're going to build everything from scratch. However, some acquired knowledge might make your journey smoother and therefore is worth mentioning.

  • Some programming experience. It might go without saying but we're going to create an application from scratch and if you've got no or very little programming experience, then you might want to start with a simpler tutorial before embarking on this journey.
  • High-level blockchain knowledge. Whilst I'm going to try my best to explain all Solana concepts that we come across, having some high-level knowledge on how blockchains work will greatly help. If you're still very new to the world of web 3, you might benefit from reading "My journey into web 3".
  • Rust experience not required. Solana programs are written in Rust. Whilst Rust has some pretty unique features, if you've got some programming experience, you should be able to understand what Rust code does without much problem. I'll be sure to briefly explain some of its quirks when we go through them and provide links to additional documentation if you're interested.
  • JavaScript. On top of building our Solana program, we will build a JavaScript client that interacts with it. More precisely, we will build a Vue 3 Single-Page Application (SPA) for our frontend. Now, this course isn't about building a frontend app so I'll go through the frontend scaffolding very quickly but having some JavaScript / Vue 3 knowledge will be a valuable asset for you to have.

Conclusion

Demo... check! Prerequisites... check! In the next episode, we'll make sure our local machine has everything it needs to start working with Solana and its most popular framework: Anchor.

One last important note: the project we are building is open source and already available on GitHub. So, if you can't wait to have a look around the code, here's the link.

View Solana Twitter on GitHub

Alright, LFG! 🔥

Discussions

Author avatar
Andrii
5 months ago

Wow, these are amazing articles, that explain how to work with anchor! Thank you for your work!

💖 3

Discussion

What are we building?
Author avatar
Andrii
5 months ago

Wow, these are amazing articles, that explain how to work with anchor! Thank you for your work!

💖 3
Author avatar
Loris Leiva
5 months ago

Thanks for the kind words Andrii! 🥰

💖 1

Would you like to chime in?

You must be a member to add a reply to a discussion.

Fortunately, it only takes two click to become one. See you on the other side! 🌸

Become a Member
Author avatar
Ben Siewert
4 months ago

this is awesome

💖 0

Discussion

What are we building?
Author avatar
Ben Siewert
4 months ago

this is awesome

💖 0

Would you like to chime in?

You must be a member to add a reply to a discussion.

Fortunately, it only takes two click to become one. See you on the other side! 🌸

Become a Member
Author avatar
Rikyknwn
3 months ago

Nice

💖 0

Discussion

What are we building?
Author avatar
Rikyknwn
3 months ago

Nice

💖 0

Would you like to chime in?

You must be a member to add a reply to a discussion.

Fortunately, it only takes two click to become one. See you on the other side! 🌸

Become a Member
Author avatar
powellgranger
3 months ago

This is awesome. This article helped me to get directive understanding about web3.

💖 1

Discussion

What are we building?
Author avatar
powellgranger
3 months ago

This is awesome. This article helped me to get directive understanding about web3.

💖 1

Would you like to chime in?

You must be a member to add a reply to a discussion.

Fortunately, it only takes two click to become one. See you on the other side! 🌸

Become a Member
Author avatar
Craig Moss
3 months ago

So awesome seeing more vue.js articles and tuts these days...LFG

💖 0

Discussion

What are we building?
Author avatar
Craig Moss
3 months ago

So awesome seeing more vue.js articles and tuts these days...LFG

💖 0

Would you like to chime in?

You must be a member to add a reply to a discussion.

Fortunately, it only takes two click to become one. See you on the other side! 🌸

Become a Member
Author avatar
Rixiao Zhang
2 months ago

respect!

💖 0

Discussion

What are we building?
Author avatar
Rixiao Zhang
2 months ago

respect!

💖 0

Would you like to chime in?

You must be a member to add a reply to a discussion.

Fortunately, it only takes two click to become one. See you on the other side! 🌸

Become a Member
Author avatar
King Map
2 months ago

this tutorial is amazing!! next step would be to either add a "like" function or a "add picture" function, but a bit worried about the cost of rent on the account... maybe through NFTs stored in phantom? also not sure if the "like" should be an account in itself or if we should add a "like count" on the tweet account.

💖 0

Discussion

What are we building?
Author avatar
King Map
2 months ago

this tutorial is amazing!! next step would be to either add a "like" function or a "add picture" function, but a bit worried about the cost of rent on the account... maybe through NFTs stored in phantom? also not sure if the "like" should be an account in itself or if we should add a "like count" on the tweet account.

💖 0

Would you like to chime in?

You must be a member to add a reply to a discussion.

Fortunately, it only takes two click to become one. See you on the other side! 🌸

Become a Member
Author avatar
Philip Lee
3 weeks ago

Thank you for this tutorial, I made a video recommending it as best Ive found on net so far! Please keep releasing more! :)

Video - https://youtu.be/4HQslBYqnL8 Create a Decentralized Twitter for Solana Tutorial Review & Bug Fixes | BEST FOUND SO FAR

💖 0

Discussion

What are we building?
Author avatar
Philip Lee
3 weeks ago

Thank you for this tutorial, I made a video recommending it as best Ive found on net so far! Please keep releasing more! :)

Video - https://youtu.be/4HQslBYqnL8 Create a Decentralized Twitter for Solana Tutorial Review & Bug Fixes | BEST FOUND SO FAR

💖 0

Would you like to chime in?

You must be a member to add a reply to a discussion.

Fortunately, it only takes two click to become one. See you on the other side! 🌸

Become a Member

Would you like to chime in?

You must be a member to start a new discussion.

Fortunately, it only takes two click to become one. See you on the other side! 🌸

Become a Member