Sol.College

Structure lesson (licence does not allow quoting code)

devite

Original
WayLearnLatam/devite
SuperStack fork
Blockchains/devite @ 781e7a0
Stars
0
Last push (original)
2024-04-09
Languages
Rust, TypeScript, CSS, JavaScript
Detected stack
Native RustNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

151 source files. By extension: .rs ×123, .tsx ×22, .js ×3, .ts ×3.

Top-level directorySource files
backend123
components13
app12
(root)3

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
PostMessagenative instruction variantbackend/chat/program/src/instruction.rs:31
IncorrectAuthoritynative instruction variantbackend/test-sdk/src/tools.rs:11
PrivilegeEscalationnative instruction variantbackend/test-sdk/src/tools.rs:14
CreateRealmnative instruction variantbackend/program/src/instruction.rs:61
CreateRealmnative instruction variantbackend/program/src/state/realm.rs:554
Nonenative instruction variantbackend/program/src/state/enums.rs:228
Orderednative instruction variantbackend/program/src/state/enums.rs:234
UseTransactionnative instruction variantbackend/program/src/state/enums.rs:240
SetupVoterWeightRecordnative instruction variantbackend/addin-mock/program/src/instruction.rs:29

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/program/src/instruction.rsPubkey, seeds, Program, Transaction
backend/program/tests/program_test/mod.rsKeypair, Pubkey, transfer
backend/program/src/state/governance.rsPubkey, AccountInfo, seeds
backend/program/src/tools/spl_token.rsAccountInfo, Pubkey, invoke, invoke_signed, seeds, transfer
backend/program/src/state/token_owner_record.rsPubkey, AccountInfo, seeds, getProgramAccounts
backend/program/src/state/realm.rsPubkey, AccountInfo, seeds
backend/tools/src/account.rsAccountInfo, Pubkey, invoke, invoke_signed, seeds, transfer
backend/program/tests/program_test/cookies.rsPubkey, Keypair
backend/program/src/state/proposal.rsPubkey, AccountInfo, seeds
backend/test-sdk/src/lib.rsPubkey, Keypair, Transaction, Program, transfer
backend/program/src/state/proposal_transaction.rsPubkey, AccountInfo, Transaction, seeds
backend/chat/program/tests/program_test/mod.rsKeypair, Pubkey

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/devite/. 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

What you could build from it