Sol.College

Structure lesson (licence does not allow quoting code)

Civitas-SOL

Original
MeetCivitas/Civitas-SOL
SuperStack fork
Blockchains/Civitas-SOL @ 0dbcb5e
Stars
4
Last push (original)
2026-06-19
Languages
TypeScript, JavaScript, HTML, Rust, Shell, Circom
Detected stack
AnchorNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

185 source files. By extension: .ts ×88, .tsx ×69, .rs ×17, .js ×8, .py ×3.

Top-level directorySource files
frontend146
programs17
marketing-video12
workload4
circuits3
client1
scripts1
tests1

On-chain programs: programs/civitas-ephemeral, programs/civitas-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
deposit_usdcDepositUsdcprograms/civitas-payroll/src/lib.rs:59
pay_invoicePayInvoiceprograms/civitas-payroll/src/lib.rs:133
close_vaultCloseVaultprograms/civitas-payroll/src/lib.rs:139
handlerInitializeVaultprograms/civitas-payroll/src/instructions/initialize_vault.rs:51
handlerCloseVaultprograms/civitas-payroll/src/instructions/close_vault.rs:39
handlerPayInvoiceprograms/civitas-payroll/src/instructions/pay_invoice.rs:66
handlerDepositUsdcprograms/civitas-payroll/src/instructions/deposit_usdc.rs:52
shield_fundsShieldFundsprograms/civitas-ephemeral/src/lib.rs:144
emergency_unshieldEmergencyUnshieldprograms/civitas-ephemeral/src/lib.rs:280

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
client/civitas-disburse.tsPublicKey, AnchorProvider, Transaction, Program, Keypair, SystemProgram
frontend/lib/civitas-ephemeral-client.tsPublicKey, getAssociatedTokenAddressSync, Connection, SystemProgram, findProgramAddressSync, getAccountInfo
frontend/app/employees/page.tsxPublicKey, Connection, transfer, getAssociatedTokenAddressSync, findProgramAddressSync, Transaction
frontend/lib/server/magicblock-auth.tstransfer, PublicKey, Keypair, Connection, Transaction, getLatestBlockhash
programs/civitas-ephemeral/src/lib.rsPubkey, transfer, Program, seeds, CpiContext, has_one
frontend/lib/server/magicblock-private-payments.tsPublicKey, Connection, transfer, Transaction, getLatestBlockhash, getAssociatedTokenAddressSync
frontend/lib/solana-program.tsPublicKey, findProgramAddressSync, Connection, Program, getAccountInfo
frontend/lib/solana-wallet.tsxTransaction, VersionedTransaction, signTransaction, Connection
tests/civitas.test.tsPublicKey, findProgramAddressSync, Keypair, Program, AnchorProvider, SystemProgram
frontend/app/api/payroll/commit/route.tsPublicKey, SystemProgram, TransactionMessage, VersionedTransaction, findProgramAddressSync, Connection
frontend/app/api/payroll/dispatch-claim/route.tsPublicKey, transfer, Connection, findProgramAddressSync, getAssociatedTokenAddressSync, getAccountInfo
frontend/lib/server/magicblock-rest-dispatch.tstransfer, Connection, PublicKey, Transaction, VersionedTransaction, Keypair

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/civitas-sol/. 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
workloadnpm run start
frontendnpm run dev
frontendnpm run start
frontendnpm run build
frontendnpm run lint
social-launch/x-posts-may-2026npm run test
social-launch/x-posts-noonnpm run test
.anchor build
.anchor test
.anchor run test
.cargo build
.cargo test

What you could build from it