# Install dependencies
npm run install:all
# Start development server
npm run start:app # or cd noodles-editor && npm start- Local:
http://localhost:5173/examples/nyc-taxis - Specific Project: Replace
nyc-taxiswith project name fromnoodles-editor/src/examples/ - Safe Mode: Add
?safeMode=trueto disable code execution
# Run tests
cd noodles-editor && npm test
# Run specific test file
npm test src/visualizations/noodles/noodles.test.ts
# Run test with specific name
npm test -- -t "should transform graph"
# Build for production
npm run build:all# Run linter
cd noodles-editor && npm run lint
# Automatically fix linting issues
cd noodles-editor && npm run fix-lint
# Type checking
npm run typecheckCopy .env.local.example to .env.local and fill in required API keys:
- Google Maps API key
- Mapbox API key
- MapTiler API key
- Cesium API key
The project uses:
- Biome for fast linting and formatting (replaces ESLint/Prettier)
- TypeScript for type checking
- Vitest for unit testing
- Playwright for end-to-end testing
To diagnose a graph that keeps executing, enable pull logs together with the causal dirty trace in the browser console, then reload:
localStorage.debug = 'noodles:executor:pull,noodles-trace:dirty'
location.reload()noodles-trace:dirty records the operator's prior state, the field or subsystem that started the
dirty wave, its downstream count, and the caller stack. It is intentionally excluded from
noodles:* because collecting stacks is expensive. When the namespace is disabled, no stacks are
captured and no trace state is retained.
Disable it after investigating:
localStorage.debug = ''
location.reload()- TypeScript: Use strict typing with detailed interfaces/types
- Imports: Group and sort imports (React, external libs, project imports, CSS). Use ESM imports instead of CJS
- Components: Use functional components with React hooks
- Naming:
- PascalCase for components and classes
- camelCase for variables and functions
- Use descriptive names for operators (with 'Op' suffix)
- Comments: Use inline comments (
//) for non-obvious code. Avoid jsdoc-style block comments (/** */) in favor of concise inline comments. - Async Functions: Use async/await for async operations with try/catch for error handling
- Side Effects: Minimize side effects in functions, use hooks for managing state
- Styling: Use CSS modules for component-specific styles
- State Management: Use React context with custom hooks
- Testing: Use vitest with mock data and snapshots
- Minimize connections to reduce complexity
- Group related operations in containers
- Use descriptive node and field names
- Document complex transformations
- Avoid deep graph nesting
- Batch related changes together
- Profile and optimize hot paths
- Use DuckDB for heavy data operations
- Follow Biome configuration in biome.json (2 spaces, no semicolons, single quotes)
- Write unit tests for operators
- Use TypeScript strictly
- Comment complex logic
- Avoid
constructor.name- it gets minified in production builds. Use staticdisplayName/descriptionproperties and access them via(operator.constructor as typeof Operator).displayName
- Add migration scripts for schema changes
- Version control graph changes
- Keep documentation up-to-date
- Test operators in isolation
// Batch multiple changes to avoid cascading updates
batch(() => {
node1.fields.param1.setValue(value1)
node2.fields.param2.setValue(value2)
})- Visualizations are composed of nodes with inputs/outputs
- Operators (Op) define the behavior of nodes
- React Flow used for node graph visualization
- Native timeline system used for keyframe animation