Sol.College

Structure lesson (licence does not allow quoting code)

DMANDATE

Original
DMANDATE/DMANDATE
SuperStack fork
Blockchains/DMANDATE @ 55d79e6
Stars
0
Last push (original)
2025-10-24
Languages
TypeScript, Rust
Detected stack
Anchorweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

25 source files. By extension: .rs ×14, .ts ×11.

Top-level directorySource files
programs14
backend5
cli4
tests2

On-chain programs: programs/dmandate

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
cancel_mandateCancelMandateprograms/dmandate/src/lib.rs:24
execute_paymentExecutePaymentprograms/dmandate/src/lib.rs:28
register_userRegisterUserprograms/dmandate/src/lib.rs:32
get_user_subscriptionsGetUserSubscriptionsprograms/dmandate/src/lib.rs:36
reapprove_mandateReapproveMandateprograms/dmandate/src/lib.rs:40
close_payment_historyClosePaymentHistoryprograms/dmandate/src/lib.rs:44

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
tests/dmandate.tsPublicKey, SystemProgram, findProgramAddressSync, Keypair, mintTo, requestAirdrop
cli/src/index.tsPublicKey, findProgramAddressSync, Keypair, SystemProgram, getAssociatedTokenAddress, Transaction
backend/src/mandate-processor.tsProgram, AnchorProvider, getAssociatedTokenAddress, PublicKey, Keypair, Connection
cli/src/utilities.tsPublicKey, Keypair, findProgramAddressSync
programs/dmandate/src/instructions/execute_payment.rsseeds, Program, init_if_needed, transfer, CpiContext
programs/dmandate/src/instructions/cancel_mandate.rsseeds, has_one, Program, CpiContext
programs/dmandate/src/instructions/create_mandate.rsseeds, Program, CpiContext
programs/dmandate/src/instructions/reapprove_mandate.rshas_one, seeds, CpiContext
programs/dmandate/src/state/mandate.rsPubkey
programs/dmandate/src/instructions/close_payment_history.rsseeds, Program
programs/dmandate/src/instructions/register_user.rsseeds, Program
programs/dmandate/src/instructions/get_user_subscriptions.rsseeds, has_one

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/dmandate/. 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 lint
clinpm run dev
clinpm run start
clinpm run build
clinpm run test
backendnpm run start
.anchor build
.anchor test
.anchor run test
.cargo build
.cargo test

What you could build from it