Sol.College

Structure lesson (licence does not allow quoting code)

Expaynse

Real-time private payroll on Solana Per-second salary streaming routed through Magicblock Private Ephemeral Rollups, so amounts and recipients stay off the public ledger

Original
shumhn/Expaynse
SuperStack fork
Blockchains/Expaynse @ 7cfff80
Stars
0
Last push (original)
2026-06-27
Languages
TypeScript, Rust, HTML, JavaScript, Shell, CSS
Detected stack
AnchorNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College
Homepage
https://www.expaynse.xyz/

Architecture

188 source files. By extension: .ts ×119, .tsx ×61, .rs ×6, .js ×2.

Top-level directorySource files
app80
components38
lib37
tests12
scripts12
programs6
(root)2
hooks1

On-chain programs: programs/payroll

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
create_employeeCreateEmployeeprograms/payroll/src/lib.rs:39
pay_salaryPaySalaryprograms/payroll/src/lib.rs:116
checkpoint_accrualCheckpointAccrualprograms/payroll/src/lib.rs:176
request_withdrawalRequestWithdrawalprograms/payroll/src/lib.rs:210
pause_streamUpdatePrivateTermsprograms/payroll/src/lib.rs:400
resume_streamUpdatePrivateTermsprograms/payroll/src/lib.rs:433
stop_streamUpdatePrivateTermsprograms/payroll/src/lib.rs:462
close_private_payrollClosePrivatePayrollprograms/payroll/src/lib.rs:490
close_employeeCloseEmployeeprograms/payroll/src/lib.rs:512
delegate_employeeDelegateEmployeeprograms/payroll/src/lib.rs:585
commit_employeeCommitEmployeeprograms/payroll/src/lib.rs:608
undelegate_employeeCommitEmployeeprograms/payroll/src/lib.rs:626

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
scripts/payroll/hybrid-payroll-transfer-worker.e2e.tsPublicKey, Connection, Transaction, VersionedTransaction, transfer, Keypair
scripts/payroll/hybrid-payroll-state.e2e.tsPublicKey, Program, Connection, Keypair, findProgramAddressSync, AnchorProvider
lib/magicblock-api.tsVersionedTransaction, Transaction, Connection, signTransaction, PublicKey, getLatestBlockhash
tests/app/payroll-realtime.e2e.tsPublicKey, Keypair, Connection, getBalance, Transaction, VersionedTransaction
tests/payroll/payroll.tsPublicKey, Keypair, Connection, Program, getAccountInfo, Transaction
tests/magicblock/api.e2e.tstransfer, getBalance, Transaction, VersionedTransaction, Keypair, Connection
tests/app/payroll-end-to-end.e2e.tsKeypair, getBalance, transfer, Connection, PublicKey, Transaction
scripts/payroll/test-crank.tsPublicKey, findProgramAddressSync, Keypair, Program, SystemProgram, AnchorProvider
tests/app/route-smoke.tsKeypair, transfer, Connection, getBalance, PublicKey, Transaction
programs/payroll/src/contexts.rsseeds, AccountInfo, Program
lib/server/payroll-program-client.tsTransaction, PublicKey, Connection, Program, Keypair, getLatestBlockhash
app/api/streams/restart/route.tsPublicKey, Connection, Transaction, getAccountInfo, Program, AnchorProvider

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/expaynse/. 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 lint
.anchor build
.anchor test
.anchor run test
.cargo build
.cargo test

What you could build from it