Skip to content

RichoKD/GalaxyRend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

99 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GalaxyRend

Decentralized Blender Rendering Platform on Starknet

GalaxyRend is a blockchain-powered platform that enables users to submit Blender rendering jobs and have them processed by a distributed network of workers. Built on Starknet, it provides a trustless and verifiable way to handle 3D rendering tasks with automatic payment distribution.

🎯 Overview

GalaxyRend connects job creators who need Blender rendering services with workers who provide computational resources. The platform uses smart contracts to escrow payments, verify job completion, and automatically distribute rewards.

Key Features

  • Decentralized Rendering: Submit .blend files for distributed processing
  • IPFS Storage: Decentralized file storage for assets and results
  • Smart Contract Escrow: Automatic payment handling via Starknet
  • Worker Network: Distributed processing nodes
  • Web Interface: Easy-to-use frontend for job management
  • Verifiable Results: Cryptographically verified job completion

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    
| Backend(Fastapi)|    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Frontend     β”‚    β”‚  Smart Contract β”‚    β”‚     Worker      β”‚
β”‚   (Next.js)     │◄──►│   (Starknet)    │◄──►│   (Python)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚                       β”‚
         β”‚                       β”‚                       β”‚
         β–Ό                       β–Ό                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      IPFS       β”‚    β”‚   STRK Token    β”‚    β”‚     Blender     β”‚
β”‚   (Storage)     β”‚    β”‚   (Payment)     β”‚    β”‚   (Rendering)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • Node.js v22.15.1+
  • Python 3.12.3+
  • Blender 4.0.2+
  • Cairo/Scarb 2.11.4+
  • IPFS node
  • Docker

Installation

  1. Clone the repository

    git clone https://github.com/RichoKD/GalaxyRend.git
    cd GalaxyRend
  2. Install dependencies (Local) or you can use docker

    # Frontend
    cd frontend
    npm install
    
    # Backend
    cd ../backend
    python3 -m venv venv
    pip install -r requirements.txt
    
    # Worker
    cd ../worker
    python3 -m venv venv
    pip install -r requirements.txt
    
    # Contracts
    cd ../contracts/job_registry
    scarb build

  3. Configure environment

    # configure snfoundry.toml with your sepolia account
    # Worker configuration is auto-generated by deployment script
    ./scripts/deploy_job_registry.sh sepolia <account> true
    # Or manually create worker/src/.env with:
    # STARKNET_RPC=https://api.cartridge.gg/x/starknet/sepolia
    # JOB_REGISTRY_ADDRESS=0x03103f3d37047b8bd0680c22a9b8d9502d5d1e34ab12259659dea2f6354ad7e8
  4. Start services (Backend, DB, Worker node, Ipfs node)

     cd infra
     docker compose up --build
    
    # Start frontend
    cd frontend
    npm run dev
    

πŸ“– Usage

For Job Creators

  1. Access the Web Interface

    • Navigate to http://localhost:3000
    • Connect your Starknet wallet
  2. Submit a Rendering Job

    • Upload your .blend file to IPFS
    • Set reward amount in STRK tokens
    • Specify deadline
    • Submit job to the contract
  3. Monitor Progress

    • Track job status in the dashboard
    • View completed renders
    • Download results from IPFS

For Workers

  1. Setup Worker Environment

    cd worker
    cp src/.env.example src/.env
    # Edit .env with your configuration
  2. Start Worker

    python3 src/main.py
  3. Worker automatically:

    • Checks for available jobs
    • Downloads .blend files from IPFS
    • Renders using Blender
    • Uploads results to IPFS
    • Submits completion to contract

πŸ”§ Development

Smart Contract Development

cd contracts/job_registry

# Build contracts
scarb build

# Run tests
scarb test

# Deploy to testnet
./scripts/deploy_job_registry.sh sepolia <account>

Frontend Development

cd frontend

# Development server
npm run dev

# Build for production
npm run build

# Type checking
npm run lint

Worker Development

cd worker

# Install development dependencies
pip install -r requirements.txt

# Make sure blender is in path

# Run with debug output
PYTHONPATH=src python3 src/main.py

πŸ§ͺ Testing

Contract Tests

cd contracts/job_registry
scarb test create_job  # Test specific function
scarb test            # Run all tests

Integration Tests

# Test contract deployment
./scripts/deploy_job_registry.sh sepolia <account>

# Test worker functionality
cd worker
python3 src/main.py

πŸ“ Project Structure

GalaxyRend/
β”œβ”€β”€ contracts/          # Cairo smart contracts
β”‚   └── job_registry/   # Main job registry contract
β”œβ”€β”€ frontend/           # Next.js web interface
β”œβ”€β”€ worker/             # Python worker nodes
β”œβ”€β”€ scripts/            # Deployment and utility scripts
β”œβ”€β”€ docs/               # Documentation
β”œβ”€β”€ infra/              # Infrastructure configuration
└── shared/             # Shared utilities and types

πŸ”— Contract Addresses

Sepolia Testnet

  • Job Registry: 0x03103f3d37047b8bd0680c22a9b8d9502d5d1e34ab12259659dea2f6354ad7e8
  • STRK Token: 0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d

Network Configuration

  • RPC: https://api.cartridge.gg/x/starknet/sepolia
  • Block Explorer: StarkScan

πŸ› οΈ Tools & Dependencies

See TOOL_VERSIONS.md for complete version information.

Core Technologies

  • Starknet: Smart contract platform
  • Cairo: Smart contract language
  • IPFS: Decentralized storage
  • Next.js: Frontend framework
  • Blender: 3D rendering engine

πŸ“š Documentation

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow Cairo style guide for contracts
  • Use TypeScript for frontend development
  • Write tests for new functionality
  • Update documentation for changes

πŸ”’ Security

Smart Contract Security

  • Contracts are tested with comprehensive unit tests
  • Access controls implemented for sensitive functions
  • Reentrancy protection where applicable

Worker Security

  • File validation before processing
  • Sandboxed rendering environment
  • Resource limits to prevent abuse

πŸ› Troubleshooting

Common Issues

  1. Contract not found error

    • Ensure you're using the correct network
    • Verify contract address in configuration
  2. IPFS connection failed

    • Check IPFS daemon is running
    • Verify IPFS API endpoint
  3. Blender rendering failed

    • Ensure Blender is installed and in PATH
    • Check .blend file compatibility
  4. Worker not finding jobs

    • Verify contract address configuration
    • Check network connectivity

Getting Help

πŸ“„ License

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

πŸŽ‰ Acknowledgments

  • Starknet team for the robust L2 platform
  • IPFS team for decentralized storage
  • Blender Foundation for the open-source 3D suite
  • Cairo community for development resources

GalaxyRend v0.2.0 - Democratizing 3D rendering through blockchain technology

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •