Sol.College

Structure lesson (licence does not allow quoting code)

Heres-Protocol

Original
HeresProtocol/Heres-Protocol
SuperStack fork
Blockchains/Heres-Protocol @ 429b6b8
Stars
2
Last push (original)
2026-10-28
Languages
TypeScript, CSS, Rust, JavaScript, Kotlin
Detected stack
@solana/kitAnchorNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College
Homepage
https://www.heresprotocol.com/

Architecture

239 source files. By extension: .ts ×125, .tsx ×78, .rs ×32, .js ×4.

Top-level directorySource files
components73
lib60
app44
heres_program35
hooks11
(root)5
utils5
types2

On-chain programs: heres_program/programs/heres_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
arm_capsuleArmCapsuleheres_program/programs/heres_program/src/lib.rs:101
depositDepositheres_program/programs/heres_program/src/lib.rs:106
cancel_capsuleCancelCapsuleheres_program/programs/heres_program/src/lib.rs:111
execute_intentExecuteIntentheres_program/programs/heres_program/src/lib.rs:116
update_activityUpdateActivityheres_program/programs/heres_program/src/lib.rs:121
distribute_nftDistributeNftheres_program/programs/heres_program/src/lib.rs:133
complete_payoutCompletePayoutheres_program/programs/heres_program/src/lib.rs:138
finalize_capsuleFinalizeCapsuleheres_program/programs/heres_program/src/lib.rs:143
recover_vaultRecoverVaultheres_program/programs/heres_program/src/lib.rs:148
delegate_capsuleDelegateCapsuleInputheres_program/programs/heres_program/src/lib.rs:153
delegate_beneficiariesDelegateBeneficiariesInputheres_program/programs/heres_program/src/lib.rs:158
crank_undelegateCrankUndelegateInputheres_program/programs/heres_program/src/lib.rs:163
handlerUpdateActivityheres_program/programs/heres_program/src/instructions/update_activity.rs:26
handlerCompletePayoutheres_program/programs/heres_program/src/instructions/complete_payout.rs:66
handlerUpdateNftAssignmentsheres_program/programs/heres_program/src/instructions/update_nft_assignments.rs:27
handlerCancelCapsuleheres_program/programs/heres_program/src/instructions/cancel_capsule.rs:66
handlerUpdateFeeConfigheres_program/programs/heres_program/src/instructions/update_fee_config.rs:23
handlerUpdateIntentheres_program/programs/heres_program/src/instructions/update_intent.rs:34
handlerCrankUndelegateInputheres_program/programs/heres_program/src/instructions/crank_undelegate.rs:36
handlerCrankUndelegateBeneficiariesInputheres_program/programs/heres_program/src/instructions/crank_undelegate_beneficiaries.rs:56
handlerRecoverVaultheres_program/programs/heres_program/src/instructions/recover_vault.rs:51
handlerDistributeAssetsheres_program/programs/heres_program/src/instructions/distribute_assets.rs:60
handlerFinalizeCapsuleheres_program/programs/heres_program/src/instructions/finalize_capsule.rs:52
handlerExecuteIntentheres_program/programs/heres_program/src/instructions/execute_intent.rs:27
handlerDelegateCapsuleInputheres_program/programs/heres_program/src/instructions/delegate_capsule.rs:37
handlerDelegateBeneficiariesInputheres_program/programs/heres_program/src/instructions/delegate_beneficiaries.rs:93
handlerScheduleExecuteIntentheres_program/programs/heres_program/src/instructions/schedule_execute_intent.rs:48
handlerDepositheres_program/programs/heres_program/src/instructions/deposit.rs:115
handlerDistributeNftheres_program/programs/heres_program/src/instructions/distribute_nft.rs:49
handlerArmCapsuleheres_program/programs/heres_program/src/instructions/arm_capsule.rs:25

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
lib/solana.tsPublicKey, getAccountInfo, SystemProgram, signTransaction, Connection, Program
heres_program/tests/heres.test.tsKeypair, PublicKey, SystemProgram, createMint, mintTo
lib/crank.tsPublicKey, Connection, Keypair, Program, Transaction, getAccountInfo
heres_program/tests/utils.tsPublicKey, Keypair, findProgramAddressSync, SystemProgram, Program, seeds
lib/program.tsPublicKey, findProgramAddressSync, seeds, Program
lib/spl.tsPublicKey, Connection, transfer, SystemProgram, Program, getAccountInfo
lib/heartbeat.tsKeypair, PublicKey, Connection, Program, Transaction, AnchorProvider
lib/wallet-transfer.tsPublicKey, Connection, Transaction, SystemProgram, getAssociatedTokenAddressSync, getBalance
lib/mobile-tx.tsPublicKey, Transaction, Program, SystemProgram, AnchorProvider, signTransaction
hooks/useHeresWallet.tssignTransaction, Transaction, VersionedTransaction, PublicKey, useWallet
lib/dashboard.tsConnection, PublicKey, getProgramAccounts, getAccountInfo
lib/atomic-payout.tsPublicKey, Connection, SystemProgram, Program, Transaction, getAccountInfo

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/heres-protocol/. 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
.npm run dev
.npm run start
.npm run build
.npm run test
.npm run lint
heres_programnpm run test
heres_programanchor build
heres_programanchor test
heres_programanchor run test

What you could build from it