Full lesson
getblink.fun
getblink.fun is a no-code platform that lets anyone create shareable Blinks—simple links that trigger on-chain DeFi actions on Solana—making crypto more accessible and user-friendly for everyone.
What it does
From the project README:
getblink.fun is a no-code platform designed to make decentralized finance (DeFi) on Solana accessible to everyone. It allows users to create and share "Blinks"-simple, shareable links that trigger on-chain DeFi actions directly from platforms like Twitter.
- Original
- shubhiscoding/getblink.fun
- SuperStack fork
- Blockchains/getblink.fun @
08bfbac - Stars
- 1
- Last push (original)
- 2025-08-05
- Languages
- TypeScript, CSS, JavaScript
- Detected stack
- MetaplexNext.jsSolana Actionsweb3.js
- Categories
- DeFi
- Licence
- MIT
Architecture
52 source files. By extension: .tsx ×31, .ts ×18, .js ×3.
| Top-level directory | Source files |
|---|---|
components | 25 |
app | 17 |
(root) | 5 |
lib | 3 |
server | 2 |
Dapp: deploying
This fork is queued for its own live dapp on Sol.College, with a Devnet/Mainnet switch. It appears here, at /dapps/getblink-fun/, once it is deployed and checked on devnet. Until then, run it locally with the commands below.
Key code, explained
Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.
app/api/actions/tokens/[uniqueid]/route.ts L1–24 @ 08bfbac · MIT · originalimport { ObjectId } from 'mongodb';import { NextRequest, NextResponse } from 'next/server';import clientPromise from '@/lib/mongodb';import { ActionGetResponse, ACTIONS_CORS_HEADERS, ActionPostRequest, createPostResponse, ActionPostResponse,} from "@solana/actions";import { AddressLookupTableAccount, clusterApiUrl, Connection, LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction, TransactionInstruction, TransactionMessage, VersionedTransaction,} from "@solana/web3.js";import { TOKEN_PROGRAM_ID } from "@solana/spl-token";import { getAssociatedTokenAddress, createAssociatedTokenAccountInstruction } from "@/lib/constant";- Line 5
ActionGetResponse,: The metadata a Blink client renders (title, icon, buttons). - Line 8
createPostResponse,: Returns the serialized transaction the wallet will sign.
app/api/actions/donate/[uniqueid]/route.ts L1–24 @ 08bfbac · MIT · originalimport { ObjectId } from 'mongodb';import { NextRequest, NextResponse } from 'next/server';import clientPromise from '@/lib/mongodb';import { TREASURY_PUBKEY } from "@/lib/constant";import { ActionGetResponse, ACTIONS_CORS_HEADERS, ActionPostRequest, createPostResponse, ActionPostResponse,} from "@solana/actions";import { clusterApiUrl, Connection, LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction,} from "@solana/web3.js"; export const GET = async (req: NextRequest, { params }: { params: { uniqueid: string } }) => { try { const { uniqueid } = params; console.log('uniqueid', uniqueid);- Line 6
ActionGetResponse,: The metadata a Blink client renders (title, icon, buttons). - Line 9
createPostResponse,: Returns the serialized transaction the wallet will sign.
app/api/actions/lp/[uniqueid]/route.ts L1–23 @ 08bfbac · MIT · originalimport { ObjectId } from 'mongodb';import { NextRequest, NextResponse } from 'next/server';import clientPromise from '@/lib/mongodb';import { TREASURY_PUBKEY } from "@/lib/constant";import { ActionGetResponse, ACTIONS_CORS_HEADERS, ActionPostRequest, createPostResponse, ActionPostResponse,} from "@solana/actions";import { clusterApiUrl, Connection, Keypair, LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction,} from "@solana/web3.js";import DLMM, { LbPosition, StrategyType } from '@meteora-ag/dlmm';import { BN } from '@coral-xyz/anchor';import { getMint } from '../../../../../node_modules/@solana/spl-token';- Line 6
ActionGetResponse,: The metadata a Blink client renders (title, icon, buttons). - Line 9
createPostResponse,: Returns the serialized transaction the wallet will sign.
How to run, build and test
These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.
| Directory | Command | Runs |
|---|---|---|
. | npm run dev | next dev |
. | npm run start | next start |
. | npm run build | next build |
What you could build from it
- Fork the SuperStack copy and extend it within the DeFi gaps listed on the idea page.
- Learn the pattern first: Program Derived Addresses (PDAs)
- Learn the pattern first: Cross-Program Invocations (CPIs)
- Learn the pattern first: SPL Tokens: mints, accounts and transfers