How krod7/mod-manus works
Modulo is a browser-first flowchart workspace that imports or edits explicit logic, validates it, and produces pseudocode, executable Python/JavaScript, and node-to-code trace maps. The static browser engine supports graph editing, simulation, local project storage, and export; the optional Flask API adds structured-file parsing and local raster/PDF recognition. The graph preserves documented product branches; some frontend wiring is supported by the SOURCE INDEX and README rather than complete source excerpts.
Main entry points: app.js Workspace controller · pipeline.py API pipeline · logic_service.py Operation interpretation · api.js API client
Components 22
Browser workspace
- Workspace controller
frontend/js/app.js - Graph editor
frontend/js/flowchart-view.js - Code and trace views
frontend/js/code-view.js - Static compiler
frontend/js/engine.js - Usage guidance
frontend/js/guide.js - Example library
frontend/js/samples.js - Browser project storage
- File export
frontend/js/app.js - API client
frontend/js/api.js - Upload handling
frontend/js/upload.js
Recognition API
- Flask API
backend/app.py - API pipeline
backend/pipeline.py - Upload intake
backend/services/intake_service.py - Raster PDF recognition
backend/services/vision_service.py
Graph conversion
- Graph file parsing
backend/services/graph_service.py - Graph model
backend/models.py - Graph validation
backend/services/validation_service.py - Operation interpretation
backend/services/logic_service.py - Pseudocode generation
backend/services/pseudocode_service.py - Code generation
backend/services/codegen_service.py - Trace map generation
backend/services/trace_service.py
Other components
- Flowchart author
Connections 27
- Flowchart author → Workspace controller: edits flow
README.md - Workspace controller → Graph editor: renders graph
frontend/js/app.js - Workspace controller → Code and trace views: renders artifacts
frontend/js/app.js - Workspace controller → Static compiler: validates and compiles
frontend/js/app.js - Workspace controller → Browser project storage: saves projects
README.md - Workspace controller → Example library: loads examples
frontend/js/app.js - Workspace controller → File export: exports artifacts
README.md - Workspace controller → Upload handling: imports file
frontend/js/app.js - Upload handling → API client: requests recognition
frontend/js/upload.js - API client → Flask API: calls API
README.md - Workspace controller → API client: checks connection
frontend/js/app.js - Flask API → API pipeline: routes requests
backend/app.py - API pipeline → Upload intake: reads upload
backend/pipeline.py - API pipeline → Graph file parsing: parses structured graph
backend/pipeline.py - API pipeline → Raster PDF recognition: recognizes raster PDF
backend/pipeline.py - API pipeline → Graph validation: validates graph
backend/pipeline.py - API pipeline → Operation interpretation: interprets operations
backend/pipeline.py - API pipeline → Pseudocode generation: generates pseudocode
backend/pipeline.py - API pipeline → Code generation: generates source
backend/pipeline.py - API pipeline → Trace map generation: builds trace map
backend/pipeline.py - Graph file parsing → Graph model: creates graph
backend/services/graph_service.py - Operation interpretation → Graph model: interprets graph
backend/services/logic_service.py - Code generation → Operation interpretation: uses instructions
backend/services/codegen_service.py - Pseudocode generation → Operation interpretation: uses instructions
backend/services/pseudocode_service.py - Trace map generation → Graph model: maps graph nodes
backend/services/trace_service.py - Static compiler → Flowchart author: simulates execution
README.md - Workspace controller → Usage guidance: shows guidance
README.md