Skip to content

The Interactive Decision Tree is a web-based tool that will walk users through a decision process by asking questions to lead them down the appropriate decision path. Think of it as a user-friendly flow chart.

License

Notifications You must be signed in to change notification settings

emaag/interactive-decision-tree

Repository files navigation

Interactive Decision Tree

License: MIT PHP Version GitHub Stars GitHub Forks

A web-based tool that guides users through decision-making processes using an interactive, user-friendly flow chart interface. Think of it as a choose-your-own-adventure for decisions.

🌟 Features

  • XML-Based Data Storage - Decision tree data stored as standard XML for easy editing and portability
  • Client-Side Viewer - Built with HTML, CSS, and JavaScript for universal compatibility
  • Cross-Platform - Host on any web server or run locally
  • Visual Editor - PHP-driven editor for creating decision trees without manual XML editing
  • No Database Required - Simple file-based system
  • Responsive Design - Works on desktop and mobile devices

📋 Table of Contents

🎬 Demo

View Live Demo | Watch Video Tutorial

🔧 Requirements

  • Web Server (Apache, Nginx, or any HTTP server)
  • PHP 7.4+ (PHP 8.x recommended)
  • Write permissions on the xml/ directory

📦 Installation

Quick Start

  1. Clone the repository

    git clone https://github.com/emaag/interactive-decision-tree.git
    cd interactive-decision-tree
  2. Set directory permissions

    chmod 755 xml/
    # Or, if necessary:
    chmod 777 xml/
  3. Configure your web server to point to the repository directory

  4. Access the editor in your web browser:

    http://your-domain.com/interactive-decision-tree/editTree.php
    

Docker Installation (Optional)

# Coming soon - Docker support planned

🚀 Usage

Creating a Decision Tree

  1. Navigate to editTree.php in your browser
  2. Click "Create New Decision Tree"
  3. Add questions and decision paths using the visual editor
  4. Save your decision tree (stored as XML in the xml/ directory)

Viewing a Decision Tree

  1. Navigate to showTree.html in your browser
  2. Select your decision tree from the list
  3. Users can now interact with your decision tree by answering questions

Example XML Structure

<?xml version="1.0" encoding="UTF-8"?>
<tree>
  <node id="1">
    <question>What is your question?</question>
    <option next="2">Answer A</option>
    <option next="3">Answer B</option>
  </node>
  <!-- Additional nodes... -->
</tree>

📁 File Structure

interactive-decision-tree/
├── xml/                  # Decision tree XML files (needs write permission)
├── css/                  # Stylesheets
├── js/                   # JavaScript files
├── editTree.php          # Visual editor for creating/editing trees
├── showTree.html         # Viewer for displaying decision trees
├── LICENSE               # MIT License
└── README.md             # This file

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

🐛 Bug Reports

Found a bug? Please open an issue on GitHub with:

  • Description of the problem
  • Steps to reproduce
  • Expected behavior
  • Screenshots (if applicable)

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

👤 Author

Eric Maag

🙏 Acknowledgments

  • Thanks to all contributors who have helped improve this project
  • Inspired by the need for simple, accessible decision-making tools

📊 Project Stats

This project has been forked by organizations including legal service providers and educational institutions to help users navigate complex decision-making processes.


⭐ Star this repository if you find it useful!

About

The Interactive Decision Tree is a web-based tool that will walk users through a decision process by asking questions to lead them down the appropriate decision path. Think of it as a user-friendly flow chart.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •