Blockchain for Complete Beginners: Your Journey to Becoming a Solana Developer

Frontend Engineer & Technical Writer building scalable, user-focused web applications with TypeScript, React, and Next.js. I enjoy turning complex ideas into clean interfaces and clear documentation. Currently exploring blockchain development with Rust on the Solana network, focusing on smart contracts and decentralised applications.
Hi there, if you are reading this, I believe you are curious about blockchain technology or want to learn how to build decentralised applications. Well, this is right for you.
In this article, we will take a look at blockchain and how you can build applications that interact with the blockchain using the Solana network.
This article is great for everyone, as it teaches blockchain fundamentals and building a program that talks to a blockchain.
What Is a Blockchain
I’m sure you’ve searched for “what is a blockchain” on the internet, and you still don’t have a clue. Well, I used to be like that, but I was able to hack it and build fun apps with it.
It is a distributed database, free for everyone to use, and there is no central authority, meaning no government, company, or individual controls it.
This distributed approach allows for trust between users on the blockchain. For instance, sending $2 million dollars to someone without needing a bank or a third party like PayPal to do so.
Think of it as a massive digital notebook shared across thousands of computers worldwide.
Anyone can add an entry. like transferring money or saving data, but once it's written, no one, not even the "owner," can erase or secretly change it without the whole network noticing and rejecting the tamper.
This changes the internet big time! Instead of renting space on someone else's server (where they can delete your posts or lock your account), you get true ownership of your data and value.
History of Blockchain
It all started in 2008 when Satoshi Nakamoto released a paper outlining Bitcoin, a digital value that runs without banks. A simple ledger tracking who owns what.
And it went live in 2009, becoming the first working blockchain. A digital store for value.
In 2015, Ethereum launched and brought smart contracts, a program that executes deals, like a digital escrow that pays out on its own. That’s like playing and winning a lottery without a lottery company.
Other chains launched, but they were either sluggish or expensive to use. Then, Solana launched in 2020. It was built to power everyday app speed.
Although it experienced outages in its early years. But major upgrades - including Firedancer rolling out late 2025 made the network lightning fast and very reliable.
Why Choose Solana
Other blockchains were slow and costly, but Solana feels like a 5G Network.
It handles thousands of actions per second with fees often under ₦10(yes, pennies). Confirmations happen in under a second - no waiting around.
Thanks to clever tech like Proof of History (a built-in verifiable clock) and recent Firedancer upgrades, it’s now stable even during busy times.
Smart Contracts
Imagine a vending machine, you insert money, select a snack, and get the snack. No cashier needed. It just works because rules are built in.
A smart contract is an executable program on the blockchain that runs our application deals once a condition is met. like a digital promise that can’t break.
Cryptography and Transactions
Blockchain would not have been possible without cryptography; It is the magic that keeps transactions secure.
Everyone who uses blockchain has something called a key pair, which consists of a public key and a private key.
All users have a public key shown to everyone as a (wallet address), and a private key, which is like a secret pin.
Each transaction is you sending money from your public address and confirming the transaction with your private key.
The network checks the signature, writes the transaction to a block on the blockchain. where it is stored permanently.
Public Key
This is a public address (wallet address) that you can use to receive, send, and store data. It only lets other users send digital assets to you.
Private Key
A single, long, complex string of letters and numbers (64+ hexadecimal characters).
Most people use wallet apps (Phantom, Backpack) that hide it and ask for approval before signing anything.
How Transactions Work
Before a transaction can be recorded as complete on the blockchain, it has to pass certain steps. It is as simple as hitting send, but behind the scenes;
You sign the instruction with your private key → broadcast to the network → Validators (computers) check it's valid → add to a block → confirm fast on Solana.
It's instant, cheap, and visible to all.
Building a Smart Contract
You build a smart contract by writing code (usually in Rust). But tools like the Anchor framework and Solana Playground make it easy.
Even without coding experience, you can deploy one by copying and pasting code right in your browser using Solana Playground.
Learn How to Save, Update and Retrieve Data from the Blockchain, and How Signing Is Important
Data lives in accounts on the blockchain.
To save data, your program creates an account and writes changes to the blockchain using your signature.
To update, you sign in with your private key to prove ownership. And anyone can read it, but only the account with the key can update it.
Data stored in Program Derived Addresses
A PDA is a program's personal storage address. You pick a simple name (seed), the program calculates where to store data, and the data lives on-chain permanently, controlled by the program's logic, not a person's wallet.
In Solana, smart contracts can store additional data or addresses that are made from seeds.
Onchain Resume/Profile (The Program We Will Build)
We will write a program that lets us save, edit, and retrieve our resume on the blockchain using Solana Playground.
Tools used and why;
Solana Playground: Browser IDE, no install. Write, build, deploy, test instantly. Ideal for non-techies starting out.
Rust: The language Solana programs use—fast and safe.
Anchor Lang: Framework that makes Rust easier by handling security/boilerplate. Think "React for Solana."
Start Building on Playground
Head over to Solana Playground on your browser
Enter the project name onchain-resume and select Anchor(Rust) as the framework, then create.
Create a new Anchor project. It's like Google Docs for blockchain code.

You should see a starter file. We'll delete the starter code and build the program step-by-step from scratch.
Also. If you'd prefer to jump ahead, you can skip to the finished code section and follow the deployment instructions.

Starter File
Import the core Anchor framework functionality
Create a placeholder for your program's unique blockchain address (Solana playground auto-fills it)
Create a constant (unchanging value) to remind you that Anchor adds 8 bytes of metadata to all stored data
// Import all the essential Anchor tools into our workspace.
use anchor_lang::prelude::*;
// Reserve a spot for our program's unique ID (will be auto-filled).
declare_id!("");
// Anchor adds an 8-byte label to everything we store.
pub const ANCHOR_DISCRIMINATOR_SIZE: usize = 8;
Program Macro
Anchor uses macros (like shortcuts) to define your program. The #[program] macro is Anchor's way of marking "this is the main logic of your smart contract.”
It transforms your Rust code into a Solana program automatically. We add the block below, which performs the functions below;
Create a public Rust module named profile that will contain all our program's instructions (functions).
Declares a public function named set_profile that returns a Result<()> (either success or error).
// Program macro
#[program]
// rust program
pub mod profile {
// use what we imported from anchor
use super::*;
pub fn set_profile() -> Result<()> {
// set profile function body
}
}
Create a data storage template
This block creates a Profile data structure that can be saved to a user's account on the Solana blockchain.
Think of this as creating a digital resume form that gets permanently stamped onto the blockchain
// Marks this struct as a storable blockchain account
#[account]
// Ensures you allocate enough space when creating accounts
#[derive(InitSpace)]
// Defines the data fields for user profiles
pub struct Profile {
#[max_len(40)]
pub full_name: String,
#[max_len(80)]
pub bio: String,
pub years_of_experience: u64,
#[max_len(40)]
pub portfolio: String,
#[max_len(5, 50)]
pub skills: Vec<String>,
}
Create account validation logic
This block defines which accounts are needed and what permissions they have for the set_profile instruction. It's like a security checklist that Anchor verifies before running your code.
Think of this as a bank account opening form. When someone calls set_profile(), Anchor automatically;
Checks if the user signed the transaction
Creates (if needed) a PDA using "profile" + user_pubkey
Allocates exact storage space
Charges the user for storage rent
Gives your function safe access to the profile account
// adds account validation logic to the struct
#[derive(Accounts)]
pub struct SetProfile<'info> {
// Creates a container named SetProfile that holds all accounts needed for the set_profile instruction.
// 'info indicates that these items will live for the lifetime of a Solana account info object
#[account(mut)] // set signer to mutable because they will pay to create a profile on the blockchain
pub user: Signer<'info>, // the transaction must be signed by this account
#[account(
init_if_needed, // create an account if it does not exist
payer = user, // specify the payer as the person who signs to create an account on the blockchain
space = ANCHOR_DISCRIMINATOR_SIZE + Profile::INIT_SPACE, // specify the space(every account has about 8bits + profile struct)
seeds = [b"profile", user.key().as_ref()], // seed as the text 'profile' and the user's public key. (Seeds are what are used to give the account an address; it is a program-derived address.)
bump // Finds a valid Solana address
)]
// The new account is being created with the seeds and allocated space required
pub profile: Account<'info, Profile>,
pub system_program: Program<'info, System>, // Passes a reference to Solana's built-in System Program (needed to create new accounts).
}
Modify Instruction Handler
This block creates the main logic for updating a user's on-chain profile. It takes user profile data (name, bio, skills, etc.), logs it to the blockchain, and saves it permanently to a PDA storage account.
When someone calls this function with their profile info, it gets permanently recorded on the Solana blockchain in their personal profile storage slot (PDA).
// Program macro
#[program]
// rust program
pub mod profile {
// use what we imported from anchor
use super::*;
// pass in arguments for context
pub fn set_profile(
context: Context<SetProfile>, full_name: String, bio: String, years_of_experience: u64, portfolio: String, skills: Vec<String>) -> Result<()> {
// set profile function body
msg!("Greetings from {}", context.program_id); //the message macro to print out a message to the user
let user_public_key = context.accounts.user.key();
msg!("User {}, is a {}, with {} years on experience. skills include {:?}. You can visit their portfolio to learn more {}",
full_name,
bio,
years_of_experience,
skills,
portfolio
); // format message
//Write the information into the profile account provided.
context.accounts.profile.set_inner( Profile {
full_name,
bio,
years_of_experience,
skills,
portfolio
});
Ok(())
}
}
Final code
// Import all the essential Anchor tools into our workspace.
use anchor_lang::prelude::*;
// Reserve a spot for our program's unique ID (will be auto-filled).
declare_id!("");
// Anchor adds an 8-byte label to everything we store.
pub const ANCHOR_DISCRIMINATOR_SIZE: usize = 8;
// Program macro
#[program]
// rust program
pub mod profile {
// use what we imported from anchor
use super::*;
// pass in arguments for context
pub fn set_profile(
context: Context<SetProfile>, full_name: String, bio: String, years_of_experience: u64, portfolio: String, skills: Vec<String>) -> Result<()> {
// set profile function body
msg!("Greetings from {}", context.program_id); //the message macro to print out a message to the user
let user_public_key = context.accounts.user.key();
msg!("User {}, is a {}, with {} years on experience. skills include {:?}. You can visit their portfolio to learn more {}",
full_name,
bio,
years_of_experience,
skills,
portfolio
); // format message
//Write the information into the profile account provided.
context.accounts.profile.set_inner( Profile {
full_name,
bio,
years_of_experience,
skills,
portfolio
});
Ok(())
}
}
// Marks this struct as a storable blockchain account
#[account]
// Ensures you allocate enough space when creating accounts
#[derive(InitSpace)]
// Defines the data fields for user profiles
pub struct Profile {
#[max_len(40)]
pub full_name: String,
#[max_len(80)]
pub bio: String,
pub years_of_experience: u64,
#[max_len(40)]
pub portfolio: String,
#[max_len(5, 50)]
pub skills: Vec<String>,
}
#[derive(Accounts)]
pub struct SetProfile<'info> {
// Creates a container named SetProfile that holds all accounts needed for the set_profile instruction.
// 'info indicates that these items will live for the lifetime of a Solana account info object
#[account(mut)] // set signer to mutable because they will pay to create a profile on the blockchain
pub user: Signer<'info>, // the transaction must be signed by this account
#[account(
init_if_needed, // create an account if it does not exist
payer = user, // specify the payer as the person who signs to create an account on the blockchain
space = ANCHOR_DISCRIMINATOR_SIZE + Profile::INIT_SPACE, // specify the space(every account has about 8bits + profile struct)
seeds = [b"profile", user.key().as_ref()], // seed as the text 'profile' and the user's public key. (Seeds are what are used to give the account an address; it is a program-derived address.)
bump // Finds a valid Solana address
)]
// The new account is being created with the seeds and allocated space required
pub profile: Account<'info, Profile>,
pub system_program: Program<'info, System>, // Passes a reference to Solana's built-in System Program (needed to create new accounts).
}
Build
Click "Build" on the side panel, and the button compiles to Solana bytecode in seconds.

You should get a success message in your terminal.

Deploy (Solana airdrop)
Think of deploying your smart contract as publishing a book. to a list in a global library (the blockchain). You need to pay a small printing fee to ensure your book is published.
On the Solana playground, we have access to some free SOL(fake SOL), which we will use to cover the cost of deploying our smart contract.
We will be using the Solana Faucet to airdrop free SOL to our wallet address.
Copy your wallet address at the bottom of your code space.

Head over to Solana Faucet and paste the address, choose the amount of SOL, and click Confirm Airdrop.

You should get a confirmation message, and the SOL will be sent to your wallet. Now, in your Solana playground, click on deploy.

You should see a success message in your terminal

Testing the program
The Solana playground test tab is like your private digital workshop, with all the tools you need.
It simulates the real blockchain perfectly; you can build programs, instantly run, and interact with it. all in your web browser.
On the sidebar, in the Solana playground. Click on the test tube icon to open the test panel.

Once the test panel is open, you have access to a program console where you can interact with the program you deployed.
This allows you to instantly test your program’s logic by simulating a real user interaction.

Fill in the fields accordingly, and make sure to select the custom type after every input.
For the skills field, enter the data in this format [”skills-1”, “skills-2”, “skills-3”], and select the custom type.

After providing the data needed to create or save data on the blockchain, we need to provide our wallet address to sign the transaction.
In the user field, select Current wallet

We also need to provide the address that is stored in the seed; the seed is the string profile + the signer's wallet address.
In the profile field. You select From seed -> string -> You type the string "profile" and choose custom type.

We also need to append our wallet address to the string we just provided.
Click on Add Seed -> Choose publicKey -> Choose Current wallet

To generate and test on the Solana Playground means you can build and prove your blockchain application entirely within your browser, from start to finish.
Click on Generate -> Click on Test


If your tests are successful, the terminal will display a confirmation that all conditions have passed.
A pop-up notification will also appear, providing a direct link to view the transaction details on the Solana Explorer.
For a full history, you can also click your wallet address at the bottom of the Playground interface.

You can also retrieve data from the blockchain when you click on fetch all in the Accounts section.

The Takeaway: Web3 is not just crypto coins and airdrops, it's a new way to trust.
Through this article, you’ve learned some blockchain fundamentals and how to build and test a Solana program in a safe, simulated environment.
You’ve seen how smart contracts can automate agreements, but these are not just features; they are tools that will reshape the way we interact with the internet.
Let’s bring these concepts home to a real-world example. Imagine a local petty trader who engages in “ajo”. A local savings circle where a trusted member collects, saves, and disburses contributions from other members.
In some situations, the trusted member carts away with the contributions, leaving other members at a loss. What if that trust could be built in code?.
A smart contract could automatically collect the contributions, secure them, and disburse funds to the members on a set schedule. No risk of mismanagement or delays.
A DAO (Decentralised Autonomous Organisation) could let all members vote on rule changes or emergency withdrawals, making the Ajo truly community-run and transparent for everyone.
Whether it's global finance or a local savings group, the principles are the same. transparency, automation, and community governance.
I hope this article was helpful in explaining some of the blockchain concepts. You can follow me on different platforms through the social links provided.
In case you run into any issues while building. Send a screenshot to my Email or Discord, and I’ll be happy to assist you.



