Sol.College

Structure lesson (licence does not allow quoting code)

0xPrimesh-demo

Original
0xPrimesh/demo
SuperStack fork
Blockchains/0xPrimesh-demo @ 26f91fd
Stars
0
Last push (original)
2026-10-12
Languages
TypeScript, Rust, CSS, HTML
Detected stack
Anchorweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

27 source files. By extension: .ts ×21, .rs ×4, .tsx ×2.

Top-level directorySource files
backend18
frontend9

On-chain programs: backend/programs/darkpool, backend/programs/settlement

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
init_poolInitPoolbackend/programs/settlement/src/lib.rs:53
settleSettlebackend/programs/settlement/src/lib.rs:153
cancelCancelbackend/programs/settlement/src/lib.rs:210
init_match_orders_comp_defInitMatchOrdersCompDefbackend/programs/darkpool/src/lib.rs:58
register_marketRegisterMarketbackend/programs/darkpool/src/lib.rs:67

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/programs/settlement/src/lib.rsPubkey, seeds, Program, init_if_needed, transfer, CpiContext
backend/scripts/lib/settlement.tsPublicKey, getAssociatedTokenAddressSync, findProgramAddressSync, SystemProgram, Keypair, Transaction
backend/programs/darkpool/src/lib.rsPubkey, seeds, Program, CpiContext, init_if_needed
backend/scripts/lib/arcium.tsPublicKey, findProgramAddressSync, SystemProgram, getAccountInfo
backend/scripts/lib/tokens.tsPublicKey, createMint, SystemProgram, Transaction, mintTo, Keypair
backend/server/index.tsPublicKey, Transaction, getBalance, Connection
frontend/src/App.tsxsignTransaction, useWallet, WalletMultiButton, Transaction, getBalance
backend/scripts/lib/markets.tsPublicKey
backend/scripts/lib/price.tsPublicKey, getAccountInfo
backend/tests/darkpool.tsKeypair, requestAirdrop, PublicKey
backend/server/tradebook.tsPublicKey, getProgramAccounts
backend/scripts/setup-tokens.tsPublicKey, getBalance

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/0xprimesh-demo/. 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 lint
frontendnpm run dev
frontendnpm run build
backendanchor build
backendanchor test
backendanchor run test

What you could build from it