Lädt...


🔧 Web3 Made Simple: Exploring Solana for Beginners


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Over the past few months, I've maintained a routine of working from libraries and coffee shops, seeking inspiration in familiar and vibrant surroundings. Today, I chose my go-to spot at a nearby Starbucks, equipped with a plan to tackle a variety of tasks, including exploring a unique Upwork opportunity in B2B development using Vue.js. But a more exciting project caught my attention: building a standout resume website.

Revamping My Resume Website

My previous attempt at a resume site, hosted at resume.ddp.life, felt too simplistic. It lacked a compelling design or unique features. Determined to create something better, I scoured GitHub and discovered a web3-focused project that stood out: web3-resume-ui.

This project integrates Next.js, Solana, and Supabase, and offers exciting possibilities for blockchain-backed functionality. Here's how I set it up and adapted it for my needs.

project preview

What’s in the Stack?

Next.js

As a React framework, Next.js provides server-side rendering and static site generation, ideal for building fast and SEO-friendly websites.

Solana

Solana is a high-performance L1 blockchain, known for its speed and low transaction costs. It’s the backbone for smart contract integration in this project.

Supabase

Supabase is an open-source alternative to Firebase. In this project, it handles user authentication via GitHub and database management.

Integrating Solana Smart Contracts

What is Solana?

Solana enables developers to deploy smart contracts on its blockchain, allowing for the creation of decentralized applications (DApps) like wallets, exchanges, and more.

Setting Up a Devnet Wallet

  1. Visit Solana Faucet to receive SOL tokens for the devnet environment.
  2. Create and manage wallets easily within the project interface.

Implementing Solana in React

Using Solana’s SDK, you can connect your application to the blockchain. Below are snippets to illustrate signing messages and initiating transactions.

Connecting to Solana

import { ConnectionProvider, WalletProvider } from '@solana/wallet-adapter-react';

const endpoint = useMemo(() => clusterApiUrl(WalletAdapterNetwork.Devnet), []);
const wallets = [new PhantomWalletAdapter(), new SolflareWalletAdapter()];

return (
  <ConnectionProvider endpoint={endpoint}>
    <WalletProvider wallets={wallets}>
      <ReactUIWalletModalProvider>{children}</ReactUIWalletModalProvider>
    </WalletProvider>
  </ConnectionProvider>
);

React Providers

Signing Messages

const { publicKey, signMessage } = useWallet();

try {
  const message = new TextEncoder().encode('Hello, world!');
  const signature = await signMessage(message);
  console.log('Signature:', signature);
} catch (error) {
  console.error('Sign message failed:', error);
}

Signing Messages

Sending Transactions

import { SystemProgram, Transaction } from '@solana/web3.js';

const transaction = new Transaction().add(
  SystemProgram.transfer({
    fromPubkey: publicKey,
    toPubkey: Keypair.generate().publicKey,
    lamports: 1,
  })
);

const signature = await sendTransaction(transaction, connection);
await connection.confirmTransaction(signature, 'confirmed');

Sending Transactions

Using Supabase for Authentication

Supabase simplifies user management. Here's a quick overview:

  1. Create a GitHub OAuth App.
  2. Configure the app credentials in your Supabase project.
  3. Use Supabase’s SDK to handle sign-in and user data management.

Sample Integration

import { createClient } from '@supabase/supabase-js';

const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);

const { user, error } = await supabase.auth.signInWithOAuth({
  provider: 'github',
});
console.log(user, error);

Sample Integration

Final Thoughts and Next Steps

Integrating web3 technologies like Solana and Supabase into a Next.js project not only elevates a resume website but also showcases skills in blockchain and modern web development. My next steps are to:

  • Polish the UI and add interactive elements.
  • Explore hosting options for scalability.
  • Dive deeper into Solana’s ecosystem for advanced features.

Building this project has been an enlightening journey into the capabilities of web3. I’m excited to refine it further and create a platform that stands out.

What’s your next personal project? Let’s discuss in the comments below!

...

🔧 Web3 Made Simple: Exploring Solana for Beginners


📈 60.16 Punkte
🔧 Programmierung

🔧 Introduction to Solana: A fledging's guide on Web3 development on Solana


📈 44.99 Punkte
🔧 Programmierung

🔧 Exploring Salesforce Web3 Exploring Salesforce Web3 and Blockchain Integration in 2024


📈 42.79 Punkte
🔧 Programmierung

🔧 Learn To Become a Web3 Developer by Exploring the Web3 Stack


📈 34.31 Punkte
🔧 Programmierung

🔧 Learn To Become a Web3 Developer by Exploring the Web3 Stack


📈 34.31 Punkte
🔧 Programmierung

🔧 Write and Deploy Your First Solana Program on Solana Playground


📈 32.08 Punkte
🔧 Programmierung

🔧 Solana Account Model: How your data and program are stored on Solana


📈 32.08 Punkte
🔧 Programmierung

🕵️ Solana BBP: Public and secret api key leaked via Solana BBP github repo


📈 32.08 Punkte
🕵️ Sicherheitslücken

📰 Supply-Chain-Attacke: Solana web3.js-Bibliothek war mit Schadcode verseucht


📈 28.95 Punkte
📰 IT Nachrichten

📰 Supply-Chain-Attacke: Solana web3.js-Bibliothek war mit Schadcode verseucht


📈 28.95 Punkte
📰 IT Security Nachrichten

📰 Supply-Chain-Attacke: Solana web3.js-Bibliothek war mit Schadcode verseucht


📈 28.95 Punkte
📰 IT Security Nachrichten

📰 Solana blockchain's popular web3.js npm package backdoored to steal keys, funds


📈 28.95 Punkte
📰 IT Security Nachrichten

📰 Solana Web3.js library backdoored to steal secret, private keys


📈 28.95 Punkte
📰 IT Security Nachrichten

📰 Solana’s popular web3.js library backdoored in supply chain compromise


📈 28.95 Punkte
📰 IT Security Nachrichten

📰 Researchers Uncover Backdoor in Solana's Popular Web3.js npm Library


📈 28.95 Punkte
📰 IT Security Nachrichten

🔧 How to Use Solana Web3 in Unity


📈 28.95 Punkte
🔧 Programmierung

🔧 Riding the Waves of #Solana #Web3: An Adventure for Developers


📈 28.95 Punkte
🔧 Programmierung

🔧 Solana Saga: Ein Smartphone fürs Web3?


📈 28.95 Punkte
🔧 Programmierung

📰 Web3, NFTs: "Solana Saga" soll das Smartphone für Krypto-Enthusiasten werden


📈 28.95 Punkte
📰 IT Nachrichten

🔧 Bitcoin vs Ethereum vs Solana: Trendsetters in the Web3 Revolution ✨⚛✨


📈 28.95 Punkte
🔧 Programmierung

📰 Blockchain: Solana stellt Web3-Smartphone vor


📈 28.95 Punkte
📰 IT Nachrichten

🎥 Solana's Web3.js Library Was Backdoored! Here's How 🚨


📈 28.95 Punkte
🎥 IT Security Video

📰 Solana Launches Web3-Focused Smartphone Saga To Improve Crypto-Mobile Relationship


📈 28.95 Punkte
📰 IT Security Nachrichten

🎥 Solana's Web3.js Library Was Backdoored! Here's How 🚨


📈 28.95 Punkte
🎥 IT Security Video

🔧 Web3 explained for Web2 Developers: My Personal Journey from SQL to Solana


📈 28.95 Punkte
🔧 Programmierung

🔧 Web3 explained for Web2 Developers: My Personal Journey from SQL to Solana


📈 28.95 Punkte
🔧 Programmierung

🔧 Introducing More Python for Beginners | More Python for Beginners [1 of 20] | More Python for Beginners


📈 27.75 Punkte
🔧 Programmierung

🔧 web3.js vs ethers.js: a Comparison of Web3 Libraries


📈 25.83 Punkte
🔧 Programmierung

🔧 web3.js vs ethers.js: a Comparison of Web3 Libraries


📈 25.83 Punkte
🔧 Programmierung

🔧 What is Web3 Development? 3 Key Web3 Job Types


📈 25.83 Punkte
🔧 Programmierung

🔧 HTML Canvas Made Simple: A Guide for Beginners.


📈 22.73 Punkte
🔧 Programmierung

matomo