Sol.College

Structure lesson (licence does not allow quoting code)

Bloom

Original
niko1a4/Bloom
SuperStack fork
Blockchains/Bloom @ 4076bbb
Stars
0
Last push (original)
2026-05-11
Languages
TypeScript, Rust, JavaScript, HTML, CSS
Detected stack
Anchorweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

138 source files. By extension: .ts ×100, .rs ×19, .tsx ×17, .js ×2.

Top-level directorySource files
backend84
frontend34
bloom_program20

On-chain programs: bloom_program/programs/bloom_program

How it works: instructions and accounts

Each instruction handler and the accounts struct it validates, found by reading the Rust source. Links go to the exact line at the pinned commit.

InstructionAccountsSource
initializeInitializebloom_program/programs/bloom_program/src/lib.rs:21
buy_tokensBuyTokensbloom_program/programs/bloom_program/src/lib.rs:63
release_fundingReleaseFundingbloom_program/programs/bloom_program/src/lib.rs:73
deposit_revenueDepositRevenuebloom_program/programs/bloom_program/src/lib.rs:84
settleSettlebloom_program/programs/bloom_program/src/lib.rs:100
withdrawWithdrawbloom_program/programs/bloom_program/src/lib.rs:113
close_positionClosePositionbloom_program/programs/bloom_program/src/lib.rs:122
handlerBuyTokensbloom_program/programs/bloom_program/src/instructions/buy_tokens.rs:96
handlerWithdrawbloom_program/programs/bloom_program/src/instructions/withdraw.rs:29
handlerDepositRevenuebloom_program/programs/bloom_program/src/instructions/deposit_revenue.rs:20
handlerClosePositionbloom_program/programs/bloom_program/src/instructions/close_position.rs:18
handlerSettlebloom_program/programs/bloom_program/src/instructions/settle.rs:32
handlerReleaseFundingbloom_program/programs/bloom_program/src/instructions/release_funding.rs:18

Where the Solana code lives

Source files that import a Solana SDK, ranked by how many Solana APIs they use, with the APIs each one calls. Read them in this order to see how the app talks to the chain.

FileSolana APIs used
backend/src/blockchain/blockchain.service.spec.tsKeypair, PublicKey, getAssociatedTokenAddressSync, findProgramAddressSync, getLatestBlockhash, getAccountInfo
backend/src/blockchain/blockchain.service.tsPublicKey, SystemProgram, getAssociatedTokenAddressSync, Connection, getAccountInfo, Transaction
bloom_program/programs/bloom_program/tests/setup.rsPubkey, Keypair, Transaction, Program
bloom_program/programs/bloom_program/src/events.rsPubkey
frontend/src/hooks/useTransaction.tsTransaction, signTransaction, VersionedTransaction, useWallet
bloom_program/programs/bloom_program/src/instructions/create_listing.rsseeds, CpiContext, transfer, Program
bloom_program/programs/bloom_program/src/instructions/buy_tokens.rsseeds, CpiContext, init_if_needed, Pubkey, Program
frontend/src/pages/InvestPage.tsxuseConnection, PublicKey, useWallet, Transaction
bloom_program/programs/bloom_program/src/instructions/withdraw.rsseeds, CpiContext, Program
bloom_program/programs/bloom_program/src/instructions/settle.rsCpiContext, seeds, Program
bloom_program/programs/bloom_program/src/instructions/release_funding.rsseeds, CpiContext, Program
bloom_program/programs/bloom_program/src/state/business_listing.rsPubkey

Dapp: devnet deploy pending

⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/bloom/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

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.

DirectoryCommandRuns
backendnpm run start
backendnpm run build
backendnpm run test
backendnpm run lint
frontendnpm run dev
frontendnpm run build
bloom_programnpm run lint
bloom_programanchor build
bloom_programanchor test
bloom_programanchor run test

What you could build from it