DocsVisual Builder Reference
SolStudio

Start the Visual Builder learning path

Connect nodes for a vault or escrow graph, run a check, and learn why each Program, Instruction, Account, State, Constraint, and Logic node belongs there.

Open Visual Builder path

Visual Builder

The visual builder is the best first place to learn SolStudio. It runs at /editor and lets you model a Solana program as connected nodes before generating Rust for Anchor, Pinocchio, or Quasar.

Want the full step-by-step path instead of only reading? Open the Visual Builder Learning Path and build the Vault or Escrow exercises.


Reference Map

The Visual Builder reference owns the deeper Solana-program docs. These are not separate products; they are the detailed parts of building programs visually.

SectionUse it forDetailed page
First editor walkthroughOpening the editor, adding first nodes, and generating earlyGetting Started
Node behaviorWhat each Program, Instruction, Account, State, Constraint, Logic, Error, Event, and Custom Code node meansNode Reference
Valid graph edgesWhat connects to what and why the editor rejects invalid handlesConnection Rules
Generated RustHow graph nodes become IR, Anchor, Pinocchio, and Quasar codeCode Generation Guide
Account validationmut, signer, init, close, token constraints, PDA seeds, and bump handlingFlags & Constraints

If you are building a Solana program in SolStudio, start here and use those sections as the detailed reference chapters.

What You Build

A visual builder project is a graph:

LayerNodeWhat it means
ProgramProgramThe root crate/module metadata and program id
Entry pointsInstructionCallable functions such as initialize, deposit, or claim_rewards
Runtime inputsAccountSolana accounts passed to each instruction
Stored dataStateStructs saved inside program-owned accounts
ValidationConstraintRules such as PDA seeds, owner checks, signer checks, or token checks
BehaviorLogicInstruction body operations such as transfers, math, require checks, and event emission

Start small: one Program, one Instruction, one Account, one State, and one Logic node.

Editor Surface

AreaWhat it controlsUse it when
CanvasNodes and edgesYou are modeling program structure
PaletteAvailable node typesYou need to add a program, instruction, account, state, constraint, event, error, logic, or custom code
Properties panelSelected node fieldsYou need to name nodes, set account flags, add state fields, configure constraints, or choose logic operations
Output panelGenerated code, warnings, and exportsYou need to verify what the graph produces
Connection handlesValid source and target edgesYou need to express ownership, runtime inputs, validation, or execution order

The canvas is the source of truth. If a node is missing from the graph, the generator cannot infer it safely. Add the node explicitly, connect it, then inspect generated code.

First Flow

  1. 1Open /editor/new.
  2. 2Add a **Program** node named vault_program.
  3. 3Add an **Instruction** node named initialize.
  4. 4Connect Program -> Instruction.
  5. 5Add an **Account** node named vault.
  6. 6Connect Instruction -> Account.
  7. 7Add a **State** node named Vault.
  8. 8Add fields such as authority: Pubkey and total_deposits: u64.
  9. 9Connect State -> Account.
  10. 10Generate code and inspect the output panel.

How To Connect Nodes

Use the handles on each node. The editor rejects invalid edges, so a failed connection usually means the source and target handles represent different concepts.

Build intentConnection
Add an instruction to a programProgram -> Instruction
Make an instruction receive an accountInstruction -> Account
Bind account data to a structState -> Account
Validate an accountAccount -> Constraint
Add executable behaviorInstruction -> Logic
Chain behavior in orderLogic -> Logic

Read Connection Rules when a handle does not connect.

Node Palette At A Glance

NodeJobCommon connection
ProgramRoot metadata and generated moduleProgram -> Instruction
InstructionCallable entry pointInstruction -> Account, Instruction -> Logic, Instruction -> Event, Instruction -> Error
AccountRuntime account passed into an instructionInstruction -> Account, Account -> Constraint
StateStored data structState -> Account
ConstraintValidation on an accountAccount -> Constraint
LogicHandler body operationInstruction -> Logic, Logic -> Logic
EventStructured emitted outputInstruction -> Event
ErrorCustom error enum variantInstruction -> Error
Custom CodeEscape hatch for unsupported snippetsUsually attached where generated logic needs a manual block

Detailed property rules live in Node Reference. Use that page when you need exact field names, data types, defaults, and framework-specific behavior.

Properties Panel

Select a node to edit its properties.

  • Program names become crate and module names.
  • Instruction names become Rust function names.
  • Account names become fields in generated account structs.
  • State fields become serialized data in generated state structs.
  • Flags such as isMut, isSigner, isInit, and isClose become framework-specific validation code.

Account Flags And Constraints

Account flags are for common account behavior. Constraint nodes are for explicit validation rules.

NeedUseExample
Account must be writableAccount flagmut
Transaction must include signerAccount flagsigner
Account is created by the instructionAccount flaginit
Account closes after the instructionAccount flagclose
Account must derive from seedsConstraint nodePDA seeds and bump
Account must match another account fieldConstraint nodehas_one = authority
Token account must match mint or authorityConstraint nodetoken mint and token authority

Read Flags & Constraints when you are modeling PDAs, token accounts, close behavior, or validation that should be visible in generated Rust.

Code Generation

The same graph can generate different Rust styles:

TargetUse when
AnchorYou want the most common Solana framework, IDL support, and familiar account validation
PinocchioYou want low-level, compute-focused, dependency-light programs
QuasarYou want zero-copy performance with a more ergonomic framework surface

Generation flow:

  1. 1The editor reads React Flow nodes and edges.
  2. 2Nodes become SolStudio IR.
  3. 3The selected framework adapter turns IR into Rust files.
  4. 4Warnings are shown when the graph is incomplete or cannot safely map to the target framework.

Read Code Generation Guide when you need exact IR mapping, framework differences, generated file structure, or deterministic output behavior.

Visual Builder Reference Chapters

Use these chapters while building:

TaskOpen
Learn the first editor workflowGetting Started
Check what each node property doesNode Reference
Debug why a connection is rejectedConnection Rules
Understand generated RustCode Generation Guide
Model account validation correctlyFlags & Constraints

Visual Builder Checklist

  • Use exactly one Program node.
  • Connect every Instruction to the Program.
  • Give every Instruction the accounts it reads or writes.
  • Bind State nodes to program-owned Account nodes.
  • Use Account flags for simple validation.
  • Use Constraint nodes for explicit or advanced validation.
  • Generate early and inspect warnings before the graph grows.