How naras/knowledgetree works
• Frontend Web UI: Indicate the “knowledgetreeJSModules” directory, especially the “webUITree” subdirectory. This includes login.htm, various HTML pages (index.html, person_work.html, subject_work.html), and JavaScript files (D3-context-menu, dndTree, etc.). These files are responsible for rendering and permitting interactive editing of the tree visualization.
• RESTful Backend Service: Highlight the “knowledgeTreeRestService” directory and its key modules:
– knowledgeTreeJsonRestService.py: the main REST API implementation.
– knowledgeTreeModel.py & knowledgeTreeModelSmall.py: these likely represent data models to interact with the database.
– Configuration/YAML files (credentials_roles.yaml, database__url.yaml, db_credentials.yaml, localdb.yaml, root_node_names.yaml) for different environment variables and settings.
– DBModelGen.bat: used for database model generation.
– Automated Test: tstKnowledgeTreeRestService.py for service testing.
• Database: Although not a directory within “src”, the presence of KnowledgeTree.sql and the MySQL Workbench file (KnowledgeTree.mwb) indicate a dedicated database layer. This is where the knowledge tree data is stored and queried.
• Supporting Documentation: Elements like the KnowledgeTreeOverview.pptx and KnowledgeTreeProjectProposal.docx provide background and proposals on system design but also can help verify design intentions.
Relationships and Data Flows
• Optionally, include a label for configuration management and testing as supporting components within the backend service.
Architectural Patterns and Design Principles
• RESTful Architecture: Emphasize that the backend exposes an API that the frontend consumes.
• Separation of Concerns: Show a clear boundary between UI (client-side rendering, interactivity via D3JS) and web service logic (Python-based REST service, database management).
• Data Modeling: Indicate that the system is designed around a tree data structure (inverted tree) with a clear model separation (knowledgeTreeModel, etc.).
Technologies and Frameworks
• Programming Languages: Python for the backend, JavaScript and HTML/CSS for the frontend.
• Visualization: D3JS (evidenced by filenames such as d3-context-menu.js and D3JS Tree Editor.md) is used for dynamic tree rendering.
• Configuration Management: YAML files are used to define credentials, URLs, and other runtime configurations.
• Database: SQL file and MySQL Workbench file suggest a relational database is used to store the knowledge tree.