Sol.College

Structure lesson (licence does not allow quoting code)

aegis12-gateway

Original
yogami/aegis12-gateway
SuperStack fork
Blockchains/aegis12-gateway @ 5ef7474
Stars
0
Last push (original)
2026-05-12
Languages
TypeScript, Makefile, JavaScript, Python, HTML, Rust
Detected stack
AnchorNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

304 source files. By extension: .ts ×201, .js ×37, .tsx ×30, .rs ×22, .py ×14.

Top-level directorySource files
apps57
src49
(root)40
tests32
scripts29
video-gen29
packages17
aegis_onchain11

On-chain programs: aegis-enforcer/programs/aegis-enforcer, aegis12-registry/programs/aegis12-registry, aegis_onchain/programs/aegis_onchain

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
handlerInitializeaegis_onchain/programs/aegis_onchain/src/instructions/initialize.rs:6
initializeInitializeaegis-enforcer/programs/aegis-enforcer/src/lib.rs:18
handlerInitializeaegis-enforcer/programs/aegis-enforcer/src/instructions/initialize.rs:6

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
src/infrastructure/SquadsRouter.tsConnection, Keypair, PublicKey, Transaction, TransactionMessage, getLatestBlockhash
tests/integration/SquadsRouter.integration.spec.tsKeypair, Connection, PublicKey, getBalance, requestAirdrop, getLatestBlockhash
src/infrastructure/AegisRegistryClient.tsPublicKey, Program, Connection, findProgramAddressSync, SystemProgram, AnchorProvider
src/tee/PolicyEnclave.tsKeypair, Transaction, PublicKey, Connection, SystemProgram, sendAndConfirmTransaction
src/infrastructure/SolanaTransactionExecutor.tsKeypair, Transaction, Connection, PublicKey, SystemProgram, sendAndConfirmTransaction
src/infrastructure/SwitchboardLiveOracle.tsPublicKey, Keypair, Connection, Transaction, sendTransaction
src/infrastructure/SolanaAnchor.tsKeypair, Connection, Transaction, sendAndConfirmTransaction, getBalance, requestAirdrop
src/infrastructure/SimulationEngine.tsSystemProgram, Connection, PublicKey, Transaction, transfer, VersionedTransaction
tests/e2e/Temporal_Decay_Nonces.test.tsKeypair, Connection, Transaction, SystemProgram, PublicKey, transfer
scripts/setup_squads_vault.tsKeypair, Transaction, Connection, SystemProgram, sendAndConfirmTransaction, Pubkey
scratch.jsConnection, Keypair, SystemProgram, Transaction, sendAndConfirmTransaction, requestAirdrop
apps/dashboard/app/api/enclave/execute/route.tsConnection, Keypair, PublicKey, SystemProgram, Transaction, sendAndConfirmTransaction

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/aegis12-gateway/. 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 start
.npm run build
.npm run test
.npm run lint
apps/dashboardnpm run dev
apps/dashboardnpm run start
apps/dashboardnpm run build
apps/dashboardnpm run test
apps/dashboardnpm run lint
apps/institutional-agentnpm run test
apps/aegis-dao-guardiannpm run test
aegis_onchainnpm run lint
aegis-enforcernpm run lint
packages/aegis12-sdknpm run build
packages/telemetry-shieldnpm run build
packages/telemetry-shieldnpm run test

What you could build from it