HiveMatrix Documentation¶
Welcome to the HiveMatrix platform documentation. HiveMatrix is a modular, AI-maintainable platform for MSP (Managed Service Provider) operations.
Quick Links¶
- Architecture & Development Guide - Complete technical architecture and development guidelines
- Installation Guide - Step-by-step installation instructions
- Configuration Guide - System and service configuration
- Services Overview - Detailed service descriptions
- Security Guide - Security hardening and best practices
- AI Tools Reference - Brainhair AI assistant tools
- Claude AI Guide - Instructions for AI assistants working on HiveMatrix
What is HiveMatrix?¶
HiveMatrix is a collection of independent, fully functional applications that work together to provide:
- Client Management - Company and contact tracking
- Billing & Invoicing - Automated billing calculations via Ledger
- Knowledge Management - Graph-based knowledge system with KnowledgeTree
- AI Integration - Claude AI integration via Brainhair
- Document Management - File archival with Archive
- Ticketing - Coming soon with Resolve
Core Principles¶
- AI Maintainability - Each application remains small, focused, and simple
- Modularity - Independent services that can be composed together
- Simplicity - Simple, explicit patterns over complex, "magical" ones
Getting Started¶
Installation¶
# Clone the orchestration system
git clone https://github.com/ruapotato/hivematrix-helm
cd hivematrix-helm
# Run the installation
./start.sh
The installation will: 1. Install system dependencies (PostgreSQL, Neo4j, Java, Python) 2. Set up Keycloak authentication server 3. Clone and configure Core and Nexus (required components) 4. Set up databases 5. Start all services
Default Credentials¶
- Username: admin
- Password: admin
Important: Change the default password after first login!
Access¶
- Main Interface: https://YOUR_SERVER_IP:443 (use your server's actual IP address, not localhost)
- Helm Dashboard: http://localhost:5004 (local only)
- Keycloak Admin: http://localhost:8080 (local only)
Architecture Overview¶
HiveMatrix uses a monolithic service pattern where each module is a self-contained application with:
- Server-side rendering (returns complete HTML)
- Own database (no cross-service database access)
- Optional data APIs (JSON endpoints)
Authentication Flow¶
- User logs in via Keycloak (through Nexus proxy)
- Keycloak validates credentials
- Core mints a HiveMatrix JWT with user permissions
- Nexus stores JWT in session cookie
- Backend services verify JWT using Core's public key
Key Components¶
- Core - Authentication, JWT management, service registry
- Nexus - Frontend gateway, HTTPS termination, smart proxying
- Helm - Orchestration system, service management
- Codex - Central data hub (companies, contacts, assets)
- Ledger - Billing calculations and invoicing
- KnowledgeTree - Knowledge management with Neo4j
- Brainhair - AI assistant with PHI/CJIS filtering
Development¶
Running the Development Environment¶
Stopping Services¶
Viewing Logs¶
# Via CLI tool
cd hivematrix-helm
source pyenv/bin/activate
python logs_cli.py --service core --tail 50
# Or check log files directly
tail -f logs/core.stdout.log
Configuration¶
All configuration is centralized in hivematrix-helm:
apps_registry.json- Source of truth for all appsmaster_config.json- System-wide configurationinstance/configs/- Service-specific configs (auto-generated)
Backup & Restore¶
# Create backup
sudo python3 backup.py
# Restore from backup
./stop.sh
sudo python3 restore.py /tmp/hivematrix_backup_*.zip
./start.sh
Documentation Structure¶
Core Documentation¶
- ARCHITECTURE.md - Complete technical documentation (2,343 lines)
- Core philosophy and goals
- Service patterns and architecture
- Authentication and authorization
- Frontend composition
- Configuration management
- Development tools and debugging
- Security architecture
- Database best practices
-
Brainhair AI assistant with approval flow
-
installation.md - Installation guide (438 lines)
- System requirements
- Quick start installation
- Step-by-step setup
- Service verification
- Troubleshooting
-
Autostart configuration
-
configuration.md - Configuration reference (480 lines)
- Master configuration structure
- Service registry management
- Database settings
- Port assignments
- SSL/TLS setup
-
Performance tuning
-
services-overview.md - Service descriptions (272 lines)
- Core services (Core, Nexus, Helm)
- Application services (Codex, Ledger, KnowledgeTree, Brainhair)
- Service dependencies and APIs
-
Key features and endpoints
-
security.md - Security hardening (271 lines)
- Zero-trust network model
- Firewall configuration
- Service binding requirements
- Security verification
- Production deployment hardening
-
Common security issues
-
ai-tools-reference.md - Brainhair AI tools
- Complete list of AI tools
- Tool usage examples
- Approval flow documentation
- PHI/CJIS filtering guide
- Creating custom tools
Developer Documentation¶
- CLAUDE.md - AI assistant guidelines (714 lines)
- Understanding HiveMatrix structure
- Making code changes
- Following conventions
- Debugging issues
- Testing checklist
Contributing¶
When contributing to HiveMatrix:
- Read ARCHITECTURE.md thoroughly
- Follow the monolithic service pattern
- Keep services small and focused
- Use server-side rendering
- Never access another service's database directly
- Update documentation for architectural changes
License¶
HiveMatrix is released under the MIT License. See LICENSE for details.
Support¶
For issues and questions: - GitHub Issues: HiveMatrix Repositories - Documentation: This site
Version¶
Current version: 4.0 (See ARCHITECTURE.md version history)