Bilup Project Structure
Understanding Bilup's project structure is essential for effective development. This guide explains how the codebase is organized and how different components interact.
Repository Overview
Bilup consists of several interconnected repositories:
Bilup Ecosystem
├── scratch-gui/ # Main GUI application (React-based editor)
├── scratch-vm/ # Virtual machine and runtime engine
├── scratch-render/ # WebGL-based rendering engine
├── scratch-blocks/ # Visual block editor (Blockly-based)
├── scratch-paint/ # Costume and backdrop editor
├── scratch-audio/ # Web Audio API implementation
├── packager/ # Web-based project packager
└── docs/ # Documentation site (this site)
scratch-gui Structure
The main GUI repository contains the React-based editor interface:
scratch-gui/
├── src/ # Source code
│ ├── components/ # React UI components
│ │ ├── gui/ # Main GUI component
│ │ ├── blocks/ # Block editor integration
│ │ ├── stage/ # Stage display component
│ │ ├── sprite-selector/ # Sprite management UI
│ │ ├── menu-bar/ # Top menu bar
│ │ └── ... # Other UI components
│ ├── containers/ # Redux-connected containers
│ │ ├── gui.jsx # Main GUI container
│ │ ├── blocks.jsx # Blocks editor container
│ │ ├── stage.jsx # Stage container
│ │ └── ... # Other containers
│ ├── lib/ # Utility libraries
│ │ ├ ── themes/ # Theme system
│ │ ├── storage.js # Project storage
│ │ ├── vm-manager-hoc.jsx # VM integration
│ │ └── ... # Other utilities
│ ├── reducers/ # Redux reducers
│ │ ├── gui.js # Main GUI state
│ │ ├── project-state.js # Project loading state
│ │ ├── targets.js # Sprite/stage state
│ │ └── ... # Other reducers
│ ├── addons/ # Addon system
│ │ ├── api.js # Addon API implementation
│ │ ├── hooks.js # Integration hooks
│ │ ├── generated/ # Generated addon files
│ │ └── addons/ # Individual addon implementations
│ ├── css/ # Global stylesheets
│ │ ├── colors.css # Color definitions
│ │ ├── units.css # Size and spacing units
│ │ └── ... # Other global styles
│ └── index.js # Application entry point
├── static/ # Static assets
│ ├── favicon.ico # Site favicon
│ ├── blocks-media/ # Block icons and media
│ └── example-extensions/ # Example extension files
├── test/ # Test files
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ └── fixtures/ # Test data and mocks
├── webpack.config.js # Webpack build configuration
├── package.json # NPM dependencies and scripts
└── README.md # Repository documentation
Component Architecture
Component Hierarchy
App