Sol.College

Structure lesson (licence does not allow quoting code)

Contribo

A platform for investing in Web3 project contributions, where investors fund development and management. In return, they receive tokens proportional to their investment upon project completion, with the option to trade their contribution shares.

Original
ContriboFi/Contribo
SuperStack fork
Blockchains/Contribo @ 4670ad2
Stars
0
Last push (original)
2025-07-02
Languages
TypeScript, Rust, SCSS, Solidity, CSS, JavaScript
Detected stack
AnchorNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

74 source files. By extension: .tsx ×45, .ts ×24, .rs ×3, .sol ×2.

Top-level directorySource files
website54
programs18
contracts2

On-chain programs: programs/Contribute/programs/contribute, programs/Marketplace/programs/marketplace, programs/claim-refund/programs/claim-refund

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
initialize_admin_registryInitializeAdminRegistryprograms/claim-refund/programs/claim-refund/src/lib.rs:86
add_adminAdminRegistryUpdateprograms/claim-refund/programs/claim-refund/src/lib.rs:103
remove_adminAdminRegistryUpdateprograms/claim-refund/programs/claim-refund/src/lib.rs:134
execute_max_cap_changeUpdateConfigprograms/claim-refund/programs/claim-refund/src/lib.rs:432
cancel_max_cap_changeUpdateConfigprograms/claim-refund/programs/claim-refund/src/lib.rs:470
initialize_admin_registryInitializeAdminRegistryprograms/Contribute/programs/contribute/src/lib.rs:88
execute_super_admin_changeUpdateAdminRegistryprograms/Contribute/programs/contribute/src/lib.rs:124
cancel_super_admin_changeUpdateAdminRegistryprograms/Contribute/programs/contribute/src/lib.rs:164
add_adminUpdateAdminRegistryprograms/Contribute/programs/contribute/src/lib.rs:188
remove_adminUpdateAdminRegistryprograms/Contribute/programs/contribute/src/lib.rs:216
contributeContributeprograms/Contribute/programs/contribute/src/lib.rs:344
add_adminManageAdminWhitelistprograms/Marketplace/programs/marketplace/src/lib.rs:23
remove_adminManageAdminWhitelistprograms/Marketplace/programs/marketplace/src/lib.rs:43
buy_from_seller_offerBuyFromSellerOfferprograms/Marketplace/programs/marketplace/src/lib.rs:150
accept_buyer_bidAcceptBuyerBidprograms/Marketplace/programs/marketplace/src/lib.rs:243
deactivate_marketplaceDeactivateMarketplaceprograms/Marketplace/programs/marketplace/src/lib.rs:337
cancel_seller_offerCancelSellerOfferprograms/Marketplace/programs/marketplace/src/lib.rs:528
cancel_buyer_bidCancelBuyerBidprograms/Marketplace/programs/marketplace/src/lib.rs:573

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
programs/Marketplace/programs/marketplace/src/lib.rsseeds, transfer, Program, CpiContext, Pubkey, init_if_needed
programs/Contribute/programs/contribute/src/lib.rsPubkey, seeds, Program, CpiContext, transfer, init_if_needed
programs/claim-refund/programs/claim-refund/src/lib.rsPubkey, seeds, Program, transfer, CpiContext, init_if_needed
website/src/app/helpers/contribute.tsPublicKey, findProgramAddressSync, SystemProgram, getAssociatedTokenAddress, Transaction, Connection
programs/claim-refund/scripts/setup-pool.tsPublicKey, findProgramAddressSync, Keypair, SystemProgram, Transaction, sendAndConfirmTransaction
programs/Contribute/scripts/contribute.tsPublicKey, Transaction, sendAndConfirmTransaction, getAssociatedTokenAddress, Keypair, SystemProgram
website/src/app/type/SolanaPool.tsPublicKey, Connection, AnchorProvider, Program
programs/claim-refund/tests/types.tsPublicKey
programs/claim-refund/tests/claim_refund.tsPublicKey, SystemProgram, Program, createMint, mintTo, Connection
programs/Contribute/scripts/create-pool.tsPublicKey, Program, Keypair, findProgramAddressSync, SystemProgram, getAssociatedTokenAddress
programs/Contribute/scripts/checkWalletContributionDirect.tsPublicKey, Connection, Program, AnchorProvider, findProgramAddressSync
website/src/app/explore/project/Contribute.tsxPublicKey, getBalance, useConnection, useWallet, WalletMultiButton, Connection

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/contribo/. 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
websitenpm run dev
websitenpm run start
websitenpm run build
websitenpm run lint
programs/claim-refundnpm run lint
programs/Contributenpm run lint
programs/Marketplacenpm run lint
programs/claim-refundanchor build
programs/claim-refundanchor test
programs/claim-refundanchor run test
programs/claim-refundanchor run setup-pool
programs/Contributeanchor build
programs/Contributeanchor test
programs/Contributeanchor run test
programs/Marketplaceanchor build
programs/Marketplaceanchor test

What you could build from it