Sol.College

Structure lesson (licence does not allow quoting code)

VaultX

Original
SpiderNitt/VaultX
SuperStack fork
Blockchains/VaultX @ 8fe3a32
Stars
0
Last push (original)
2024-12-16
Languages
JavaScript, CSS, Rust, HTML, TypeScript
Detected stack
Anchorweb3.js
Categories
DeFi
Licence
none detected: code not quoted on Sol.College

Architecture

70 source files. By extension: .js ×46, .rs ×18, .jsx ×4, .tsx ×1, .ts ×1.

Top-level directorySource files
Frontend50
smartcontract18
Backend2

On-chain programs: smartcontract/recurring_schedule_payment/programs/monthly_subscription_solana

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_enterpriseCreatesmartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/lib.rs:18
use_suscriptionUseSussmartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/lib.rs:22
suscribe_businessSuscribesmartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/lib.rs:26
renew_suscriptionRenewsmartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/lib.rs:30
delete_accountDeletesmartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/lib.rs:34
suscribeSuscribesmartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/instructions/suscribe.rs:10
createCreatesmartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/instructions/create.rs:7
use_susUseSussmartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/instructions/use_sus.rs:4

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
Frontend/src/screens/Payback/Main_Payback/Main_Content_Payback/Main_Content_Payback.jsTransaction, Connection, SystemProgram, PublicKey, sendTransaction, transfer
smartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/instructions/suscribe.rsPubkey, transfer, invoke, seeds, AccountInfo, Program
Backend/server.jsrequestAirdrop, Connection, Keypair, Transaction
smartcontract/recurring_schedule_payment/src/functions/suscribe.rsKeypair, Pubkey, Program
smartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/instructions/renew.rsseeds, AccountInfo, Pubkey, Program
smartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/instructions/create.rsPubkey, seeds, Program
smartcontract/recurring_schedule_payment/src/functions/create.rsKeypair, Program
smartcontract/recurring_schedule_payment/src/functions/use_sus.rsPubkey, Program
smartcontract/recurring_schedule_payment/src/functions/delete.rsPubkey, Program
smartcontract/recurring_schedule_payment/src/functions/renew.rsPubkey, Program
smartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/instructions/use_sus.rsseeds, Pubkey, Program
smartcontract/recurring_schedule_payment/programs/monthly_subscription_solana/src/instructions/delete.rsseeds, Pubkey, Program

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/vaultx/. 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 start
Backendnpm run test
Frontendnpm run start
Frontendnpm run build
Frontendnpm run test
Frontend/Eth_transnpm run dev
Frontend/Eth_transnpm run build
Frontend/Eth_transnpm run lint
smartcontract/recurring_schedule_paymentnpm run lint
smartcontract/recurring_schedule_paymentanchor build
smartcontract/recurring_schedule_paymentanchor test
smartcontract/recurring_schedule_paymentanchor run create
smartcontract/recurring_schedule_paymentanchor run suscribe
smartcontract/recurring_schedule_paymentanchor run use
smartcontract/recurring_schedule_paymentanchor run renew
smartcontract/recurring_schedule_paymentanchor run close

What you could build from it