What are we building?
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.
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.
Alright, LFG! 🔥