Skip to content

ProdevappOFFICIAL/SIMUSOL

Repository files navigation

SIMULSOL

A comprehensive Electron-based desktop application for testing, simulating, and managing Solana programs through IDL (Interface Description Language) files. Built with React, TypeScript, and the latest Solana development tools.

πŸš€ Features

Core Functionality

  • IDL Management: Upload, validate, and manage Anchor IDL files with comprehensive validation
  • Program Simulation: Execute real Solana program simulations with account state tracking
  • Test Framework: Build and run automated test suites for your Solana programs
  • Project Management: Organize your work with full project lifecycle management
  • Real Blockchain Integration: Connect to devnet, testnet, and mainnet for live testing

Advanced Features

  • Wallet Integration: Connect with popular Solana wallets using @solana/wallet-adapter
  • Account State Management: Track and visualize account changes over time
  • TypeScript Generation: Generate TypeScript interfaces from IDL definitions
  • Import/Export: Comprehensive project and data export capabilities
  • Performance Monitoring: Real-time performance metrics and optimization tools

πŸ›  Technology Stack

  • Frontend: React 18 with TypeScript
  • Desktop Framework: Electron with Vite
  • Solana Integration: @solana/web3.js, @coral-xyz/anchor
  • Styling: Tailwind CSS with custom Solana theme
  • Storage: electron-store, IndexedDB, File System APIs
  • Testing: Jest with comprehensive test utilities
  • Build System: Electron Builder with multi-platform support

πŸ“‹ Prerequisites

  • Node.js 18.x or higher
  • npm or yarn package manager
  • Git

πŸ”§ Installation

  1. Clone the repository

    git clone https://github.com/yourusername/solana-test-hub.git
    cd solana-test-hub
  2. Install dependencies

    npm install
  3. Run in development mode

    npm run dev
  4. Build for production

    npm run build

πŸ— Project Structure

solana-test-hub/
β”œβ”€β”€ electron/
β”‚   β”œβ”€β”€ main/              # Electron main process
β”‚   └── preload/           # Preload scripts for secure IPC
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/        # React components
β”‚   β”‚   β”œβ”€β”€ features/      # Feature-specific components
β”‚   β”‚   └── ui/           # Reusable UI components
β”‚   β”œβ”€β”€ contexts/         # React context providers
β”‚   β”œβ”€β”€ services/         # Business logic and API services
β”‚   β”œβ”€β”€ types/           # TypeScript type definitions
β”‚   └── utils/           # Utility functions
β”œβ”€β”€ tests/               # Test files and utilities
└── docs/               # Documentation

🎯 Key Components

IDL Management

  • IDL Uploader: Drag-and-drop interface for IDL file uploads
  • IDL Validator: Comprehensive validation of Anchor IDL structure
  • IDL Viewer: Interactive exploration of program definitions
  • IDL Parser: Extract and process instruction and account definitions

Simulation Engine

  • Program Simulation: Execute instructions against simulated Solana runtime
  • Account State Tracking: Monitor account changes across simulations
  • Transaction Building: Create complex multi-instruction transactions
  • PDA Derivation: Automatic Program Derived Address calculation

Testing Framework

  • Test Case Builder: Visual interface for creating test scenarios
  • Test Runner: Execute tests with parallel processing and timeout handling
  • Result Analysis: Detailed reporting with performance metrics
  • Test Templates: Pre-built test patterns for common scenarios

πŸ“– Usage

Getting Started

  1. Create a New Project

    • Launch the application
    • Click "New Project" and select a template
    • Choose your project directory
  2. Upload IDL Files

    • Navigate to the IDL Manager
    • Drag and drop your Anchor IDL JSON files
    • Review validation results
  3. Run Simulations

    • Go to the Simulation Lab
    • Select your program and instruction
    • Fill in account and parameter data
    • Execute the simulation
  4. Create Tests

    • Use the Test Suite to build test cases
    • Define assertions for account states
    • Run tests and review results

Configuration

The application supports extensive configuration through the Settings panel:

  • Network Settings: Choose between devnet, testnet, and mainnet
  • Wallet Configuration: Set up wallet connections
  • Performance Tuning: Adjust simulation and test execution parameters
  • UI Preferences: Customize themes and layout options

πŸ”Œ API Integration

Solana RPC Integration

// Example: Connecting to Solana networks
import { SolanaRPCService } from './services/blockchain/solanaRPC';

const rpcService = new SolanaRPCService('devnet');
await rpcService.connect();
const accountInfo = await rpcService.getAccountInfo(publicKey);

Wallet Adapter Integration

// Example: Wallet connection
import { WalletAdapter } from './services/blockchain/walletAdapter';

const wallet = new WalletAdapter();
await wallet.connect('phantom');
const signature = await wallet.signTransaction(transaction);

πŸ§ͺ Testing

The project includes comprehensive testing capabilities:

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage

# Run specific test suites
npm run test:unit
npm run test:integration

Test Structure

  • Unit Tests: Component and service testing
  • Integration Tests: Full workflow testing
  • E2E Tests: Electron application testing
  • Performance Tests: Load and stress testing

πŸš€ Building and Distribution

Development Builds

npm run build:dev

Production Builds

npm run build:prod

Cross-Platform Distribution

# Build for all platforms
npm run dist

# Build for specific platforms
npm run dist:win
npm run dist:mac
npm run dist:linux

πŸ”§ Development Workflow

Phase-Based Development

The project follows a structured 10-phase development approach:

  1. Foundation Setup: Project initialization and configuration
  2. Data Management: Context providers and storage services
  3. IDL Processing: Parser, validator, and management components
  4. Simulation Engine: Core simulation functionality
  5. Testing Framework: Test creation and execution
  6. Project Management: Project lifecycle and organization
  7. Blockchain Integration: Live network connectivity
  8. Production Features: Import/export and settings
  9. Performance & Quality: Optimization and error handling
  10. Production Deployment: Build system and CI/CD

Code Quality Standards

  • TypeScript: Strict typing throughout the application
  • ESLint: Consistent code formatting and best practices
  • Prettier: Automated code formatting
  • Husky: Pre-commit hooks for quality assurance

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

Code Standards

  • All code must be fully implemented (no placeholder code)
  • Real functionality only (no mock data in production features)
  • Comprehensive error handling
  • Full TypeScript typing
  • Test coverage for new features

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

  • Documentation: Check the docs/ directory
  • Issues: Report bugs via GitHub Issues
  • Discussions: Join our GitHub Discussions
  • Discord: Join our community Discord server

πŸ—Ί Roadmap

Upcoming Features

  • Advanced program debugging capabilities
  • Integration with Solana program libraries
  • Enhanced visualization tools
  • Multi-program testing scenarios
  • Cloud-based project synchronization
  • Plugin system for custom extensions

Recent Updates

  • βœ… Core IDL management system
  • βœ… Basic simulation engine
  • βœ… Project management framework
  • βœ… Wallet integration
  • βœ… Cross-platform builds

πŸ“Š Performance

The application is optimized for real-world usage with:

  • Code Splitting: Lazy loading for optimal startup times
  • Memory Management: Efficient cleanup and garbage collection
  • Caching: Intelligent caching of simulation and parsing results
  • Performance Monitoring: Real-time performance metrics

πŸ”’ Security

Security is a top priority:

  • Secure IPC: Proper context isolation in Electron
  • Wallet Security: Integration with secure wallet adapters
  • Data Validation: Comprehensive input validation
  • Error Handling: Secure error reporting without data leakage

πŸ‘₯ Team

πŸ™ Acknowledgments

  • Solana Foundation for the excellent development tools
  • Anchor framework team for IDL standards
  • Electron team for the desktop framework
  • React and TypeScript communities

Built with ❀️ for the Solana developer community

About

SIMUSOL is an open-source Solana smart contract testing and simulation platform designed to accelerate development cycles, reduce deployment risks, and enhance team collaboration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors