How samchemman/octet-draw works
Octet Draw is a desktop chemical-structure editor. Users create or open a drawing, edit and render it, then save or export it; additional capabilities include chemical naming, property and NMR analysis, templates, and search. The graph combines documented product workflows with sampled frontend and chemistry relationships and native-module references. Several major subsystems are represented by exact tree paths but were not sampled, so their internal wiring is omitted rather than inferred.
Main entry points: edit.ts Editing operations · main.rs Desktop commands · clipboard.rs Clipboard formats · Editor.tsx Drawing editor
Components 24
Drawing experience
- App shell
src/App.tsx - Drawing editor
src/Editor.tsx - Template library
src/TemplateLibrary.tsx - Gallery
src/Gallery.tsx
Chemistry engine
- Editing operations
src/edit.ts - Chemistry model
src/chem.ts - Chemical labels
src/labels.ts - Structure renderer
src/render.ts - Query structures
src/query.ts - Ring geometry
src/cycle.ts
Files and output
- File formats
src/file.ts - ChemDraw exchange
src/cdxml.ts - Export workflow
src/export.ts
Desktop integration
- Clipboard formats
src-tauri/src/clipboard.rs - Native export
src-tauri/src/export.rs - Vector output
src-tauri/src/vector.rs - Desktop commands
src-tauri/src/main.rs
Chemical analysis
- Structure naming
src/namer.ts - Formula and mass
src/mass.ts - NMR prediction
src/nmr.ts - Structure search
src-tauri/src/search.rs
Other components
- Chemist
- GitHub updates
- Office apps
Connections 29
- Chemist → Drawing editor: draws in
- App shell → Drawing editor: renders
src/App.tsx - App shell → Gallery: renders
src/App.tsx - Drawing editor → Editing operations: edits structures
- Drawing editor → Template library: inserts templates
- Editing operations → Chemistry model: updates model
src/chem.ts - Chemistry model → Structure renderer: uses
src/chem.ts - Editing operations → Structure renderer: uses
src/edit.ts - Editing operations → Ring geometry: uses
src/edit.ts - Editing operations → Chemical labels: uses
src/edit.ts - Structure renderer → Query structures: reads query labels
src/render.ts - Structure renderer → Ring geometry: reads ring geometry
src/render.ts - Chemist → File formats: opens and saves
- File formats → ChemDraw exchange: exchanges ChemDraw files
- Chemist → Export workflow: exports drawing
- Export workflow → Native export: requests native export
- Native export → Vector output: uses vector output
src-tauri/src/export.rs - Desktop commands → Clipboard formats: registers commands
src-tauri/src/main.rs - Desktop commands → Native export: registers commands
src-tauri/src/main.rs - Clipboard formats → Native export: uses export
src-tauri/src/clipboard.rs - Clipboard formats → Vector output: uses vector output
src-tauri/src/clipboard.rs - Chemist → Office apps: pastes drawings
- Clipboard formats → Office apps: provides drawing formats
- Chemist → Structure naming: converts names
- Chemist → Formula and mass: views properties
- Chemist → NMR prediction: predicts shifts
- Chemist → Structure search: searches structures
- Desktop commands → Structure search: registers commands
src-tauri/src/main.rs - Desktop commands → GitHub updates: checks updates