A React-based visual editor for managing the MAIC (Milwaukee AI Club) Learning Tree. This tool allows you to create, edit, and organize learning tree nodes, generate article content, and save/load data directly to your local maic-content repository.
- Local Repository Integration — Connect directly to your local maic-content repo for seamless loading and saving
- Visual Tree Editor — Interactive React Flow canvas for viewing and editing the learning tree
- Drag-and-Drop Positioning — Freely position nodes or use auto-layout
- Node Management — Add, edit, and delete nodes with full metadata support
- Category Management — Create and organize categories with custom colors
- Article Wizard — Generate markdown articles with metadata, ready for maic-content
- Import/Export — Load from CDN or local files, export as JSON
- Dark Theme — Sleek dark interface matching MAIC branding
- Node.js 18+
- npm or bun
# Clone the repository
git clone https://github.com/MSOE-AI-Club/maic-tree-builder.git
cd maic-tree-builder
# Install dependencies
npm install
# Start development server (includes local API server)
npm run devThe application will be available at http://localhost:5173/.
- On first launch, you'll see a setup dialog prompting for your repository path
- Enter the full path to your local maic-content folder (e.g.,
C:\Users\...\maic-content) - The app will validate the path and load tree.json automatically
- Changes are saved directly to your local repository
- From Local Repo: If connected, data loads automatically from
data/learning-tree/tree.json - From CDN: Click "Load" → "Load from CDN" to fetch the latest tree.json from maic-content
- From File: Click "Load" → "Load from File" to import a local tree.json file
- Select a node by clicking on it in the canvas or category panel
- Edit properties in the right sidebar panel:
- Name and description
- Category assignment
- Link URL (e.g., `/library?nav=Articles&article=...`)
- Image path for thumbnail
- Parent/child relationships
- Click the + button in the toolbar
- Fill in the node details:
- Name (required)
- Description
- Category
- Parent nodes (optional)
- Click "Add Node" - the node will be positioned automatically
- Use the left sidebar to view all categories
- Click the + icon to add a new category
- Edit category colors by clicking the edit icon
- Expand categories to see and select nodes
- Click the Article Wizard button in the toolbar
- Step 1 - Metadata: Enter title, authors, date, summary, difficulty, and categories
- Step 2 - Content: Write markdown content using the live editor
- Step 3 - Preview: Review metadata.json and article content
- Click "Generate Article" to download files
- Export JSON: Downloads tree.json file
- Save: Uses File System Access API to save directly (Chrome/Edge) or downloads
``` maic-tree-builder/ ├── src/ │ ├── components/ │ │ ├── TreeEditor.tsx # Main React Flow canvas │ │ ├── TreeNode.tsx # Custom node component │ │ ├── NodeEditor.tsx # Node editing form │ │ ├── CategoryPanel.tsx # Category sidebar │ │ ├── Toolbar.tsx # Top action bar │ │ ├── AddNodeDialog.tsx # New node dialog │ │ └── ArticleWizard.tsx # Article generation wizard │ ├── hooks/ │ │ └── useTreeData.ts # Tree data state management │ ├── types/ │ │ └── tree.ts # TypeScript definitions │ ├── utils/ │ │ ├── colorUtils.ts # Category color schemes │ │ ├── edgeGenerator.ts # React Flow edge generation │ │ ├── positionCalculator.ts # Auto-layout algorithm │ │ └── exportUtils.ts # Export/save utilities │ ├── App.tsx # Main application │ └── main.tsx # Entry point ├── package.json └── vite.config.ts ```
Create a `.env` file to customize:
```env
VITE_CONTENT_BASE_URL=https://msoe-ai-club.github.io/maic-content ```
- React 19 with TypeScript
- @xyflow/react (React Flow v12) — Interactive node-based canvas
- Material UI v6 — Component library
- @uiw/react-md-editor — Markdown editor
- Tailwind CSS v4 — Utility styling
- Vite — Build tool
After editing the tree:
- Export the `tree.json` file
- Copy to `maic-content/data/learning-tree/tree.json`
- For new articles, copy generated files to `maic-content/articles/[category]/`
- Commit and push changes to trigger CDN update
```bash
cd path/to/maic-content
cp ~/Downloads/tree.json data/learning-tree/tree.json
mkdir -p articles/[category]/your_article cp ~/Downloads/your_article.md articles/[category]/your_article/ cp ~/Downloads/metadata.json articles/[category]/your_article/
git add . git commit -m "Update learning tree" git push origin main ```
Available category colors:
- `red`, `orange`, `yellow`, `limegreen`, `lime`, `green`
- `teal`, `cyan`, `blue`, `indigo`, `violet`, `purple`, `pink`
- `gray`, `brown`, `beige`, `black`, `white`, `olive`
Part of the MAIC ecosystem: