AECTech 2025 - Grasshopper on the Web - lets gooo
A web-based visual programming interface inspired by Grasshopper 3D, with real-time multiplayer collaboration powered by Liveblocks. Multiple users can work on the same Grasshopper script simultaneously in the browser.
- 🎨 Visual Node Editor - Drag-and-drop node-based programming
- 🤝 Real-Time Collaboration - Multiple users can edit simultaneously
- 👥 User Presence - See who's online and working
- 🔗 Shareable Workspaces - Share workspace IDs to collaborate
- 🧮 Geometry Computation - Python/Flask backend for geometry processing
- 🎯 3D Visualization - Three.js viewer for geometry preview
- 🔷 Node Parser Component - Reusable graph visualization system with 2,868+ Grasshopper components
- React (Create React App)
- React Flow - Node graph editor
- Material-UI (MUI) - UI components
- Zustand - State management
- Liveblocks - Real-time collaboration
- Three.js - 3D visualization
- Python 3.x
- Flask - Web framework
- rhino3dm - Geometry computation
- Node.js (v14 or higher)
- npm or yarn
- Python 3.x
- pip
git clone <repository-url>
cd GH-Web-Appcd frontend
npm install- Sign up for a free account at https://liveblocks.io
- Go to your dashboard and copy your Public API Key (starts with
pk_) - Create a
.envfile in thefrontenddirectory:
cd frontendCreate .env file with:
REACT_APP_LIVEBLOCKS_PUBLIC_KEY=pk_your_public_api_key_here
REACT_APP_API_URL=http://localhost:5000Important:
- Replace
pk_your_public_api_key_herewith your actual public API key - No quotes around the value
- No spaces around the
=sign - The key should start with
pk_
cd backend
# Create virtual environment (recommended)
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtThe app will open at [http://localhost:3000](http://localhost:3000)
### Start Backend (Optional - for compute)
```bash
cd backend
python app.pyBackend runs on http://localhost:5000
- Open http://localhost:3000
- Click "Create Workspace"
- Add nodes from the sidebar
- Connect nodes together
- Check connection status (should show "Connected")
Option 1: Same Computer
- Open two browser windows
- Create workspace in window 1
- Copy workspace ID from window 1
- Join workspace in window 2 using the workspace ID
- Make changes in one window → See them appear in the other!
Option 2: Different Computers
- User 1: Create a workspace and copy the workspace ID (click the workspace ID chip to copy)
- User 2:
- Open the app on their computer
- Click "Join Workspace"
- Paste the workspace ID
- Start collaborating!
- ✅ Add nodes in one window → Appears in other windows
- ✅ Move nodes → Syncs in real-time
- ✅ Connect nodes → Edges appear everywhere
- ✅ Update node parameters → Updates sync
- ✅ User presence → See who's online
- ✅ Connection status → Shows "Connected"
The reusable NodeParser component provides visual node-based graph editing:
Features:
- Search and add from 2,868+ Grasshopper components
- Create/delete connections between nodes
- Import/Export graph data as JSON
- Drag to reposition with auto-save
- Keyboard shortcuts (Delete, Ctrl+drag)
Quick Start:
import { NodeParser } from './components/NodeParser';
<NodeParser
graphData={graphData}
onConnectionsChange={handleConnectionsChange}
onNodesChange={handleNodesChange}
componentsDatabase={components}
/>📖 Full Documentation
💡 Example Usage
GH-Web-App/
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Canvas/ # React Flow canvas
│ │ │ ├── Collaboration/ # User presence, status
│ │ │ ├── Layout/ # App layout
│ │ │ ├── nodes/ # Custom node components
│ │ │ ├── Sidebar/ # Component library
│ │ │ ├── Viewer3D/ # Three.js viewer
│ │ │ └── NodeParser/ # Reusable node parser component
│ │ │ ├── NodeParser.js # Main canvas component
│ │ │ ├── GrasshopperNode.js
│ │ │ ├── ComponentSearch.js
│ │ │ ├── examples/ # Usage examples
│ │ │ ├── README.md # Full documentation
│ │ │ └── index.js # Easy imports
│ │ ├── hooks/ # Custom React hooks
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ ├── utils/
│ │ │ ├── nodeParser.js # Parsing utilities
│ │ │ └── connectionManager.js # Connection management
│ │ └── store/ # Zustand stores
│ ├── .env # Environment variables (create this!)
│ └── package.json
├── backend/
│ ├── app.py # Flask server
│ ├── compute/ # Geometry computation
│ └── requirements.txt
└── README.md
- Make sure you've added the API key to
frontend/.env - Restart the dev server after creating/updating
.env
- Check that your API key is correct in
.env - Verify the key starts with
pk_ - Make sure there are no quotes or spaces in
.envfile - Restart the dev server
- Verify both users are using the same workspace ID
- Check connection status (should show "Connected")
- Refresh both windows if needed
- Make sure backend is running on port 5000
- Check
REACT_APP_API_URLin.envmatches your backend URL
- Environment variables are loaded at server startup - restart after changing
.env - Liveblocks public API key is safe to share (it's public!)
- Workspace IDs are shareable - use them to collaborate
- Free tier supports up to 20,000 monthly active users
- NodeParser component is self-contained in
frontend/src/components/NodeParser/ - All dependencies are clearly documented with integration examples
This is a hackathon project for AECTech 2025. Feel free to contribute!
[Add your license here]
Happy Collaborating! 🚀