Commit Graph

25 Commits

Author SHA1 Message Date
anthonyrawlins
a880b26951 feat: Implement license-aware UI for revenue optimization (Phase 3A)
Business Objective: Transform WHOOSH from license-unaware to comprehensive
license-integrated experience that drives upgrade conversions and maximizes
customer lifetime value through usage visibility.

Implementation Summary:

1. SECURE BACKEND PROXY INTEGRATION:
   - License API proxy endpoints (/api/license/status, /api/license/quotas)
   - Server-side license ID resolution (no frontend exposure)
   - Mock data support for development and testing
   - Intelligent upgrade suggestion algorithms

2. COMPREHENSIVE FRONTEND LICENSE INTEGRATION:
   - License API Client with caching and error handling
   - Global License Context for state management
   - License Status Header for always-visible tier information
   - Feature Gate Component for conditional rendering
   - License Dashboard with quotas, features, upgrade suggestions
   - Upgrade Prompt Components for revenue optimization

3. APPLICATION-WIDE INTEGRATION:
   - License Provider integrated into App context hierarchy
   - License status header in main navigation
   - License dashboard route at /license
   - Example feature gates in Analytics page
   - Version bump: → 1.2.0

Key Business Benefits:
 Revenue Optimization: Strategic feature gating drives conversions
 User Trust: Transparent license information builds confidence
 Proactive Upgrades: Usage-based suggestions with ROI estimates
 Self-Service: Clear upgrade paths reduce sales friction

Security-First Design:
🔒 All license operations server-side via proxy
🔒 No sensitive license data exposed to frontend
🔒 Feature enforcement at API level prevents bypass
🔒 Graceful degradation for license API failures

Technical Implementation:
- React 18+ with TypeScript and modern hooks
- Context API for license state management
- Tailwind CSS following existing patterns
- Backend proxy pattern for security compliance
- Comprehensive error handling and loading states

Files Created/Modified:
Backend:
- /backend/app/api/license.py - Complete license proxy API
- /backend/app/main.py - Router integration

Frontend:
- /frontend/src/services/licenseApi.ts - API client with caching
- /frontend/src/contexts/LicenseContext.tsx - Global license state
- /frontend/src/hooks/useLicenseFeatures.ts - Feature checking logic
- /frontend/src/components/license/* - Complete license UI components
- /frontend/src/App.tsx - Context integration and routing
- /frontend/package.json - Version bump to 1.2.0

This Phase 3A implementation provides the complete foundation for
license-aware user experiences, driving revenue optimization through
intelligent feature gating and upgrade suggestions while maintaining
excellent UX and security best practices.

Ready for KACHING integration and Phase 3B advanced features.

🤖 Generated with Claude Code (claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-01 16:20:24 +10:00
anthonyrawlins
268214d971 Major WHOOSH system refactoring and feature enhancements
- Migrated from HIVE branding to WHOOSH across all components
- Enhanced backend API with new services: AI models, BZZZ integration, templates, members
- Added comprehensive testing suite with security, performance, and integration tests
- Improved frontend with new components for project setup, AI models, and team management
- Updated MCP server implementation with WHOOSH-specific tools and resources
- Enhanced deployment configurations with production-ready Docker setups
- Added comprehensive documentation and setup guides
- Implemented age encryption service and UCXL integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 08:34:48 +10:00
anthonyrawlins
b6bff318d9 WIP: Save current work before CHORUS rebrand
- Agent roles integration progress
- Various backend and frontend updates
- Storybook cache cleanup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 02:20:56 +10:00
anthonyrawlins
1e81daaf18 Fix frontend URLs for production deployment and resolve database issues
Some checks failed
Frontend Tests / unit-tests (push) Has been cancelled
Frontend Tests / e2e-tests (push) Has been cancelled
- Update API base URL from localhost to https://api.hive.home.deepblack.cloud
- Update WebSocket URL to https://hive.home.deepblack.cloud for proper TLS routing
- Remove metadata field from Project model to fix SQLAlchemy conflict
- Remove index from JSON expertise column in AgentRole to fix PostgreSQL indexing
- Update push script to use local registry instead of Docker Hub
- Add Gitea repository support and monitoring endpoints

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 09:16:22 +10:00
anthonyrawlins
9262e63374 Add agent role management system for Bees-AgenticWorkers integration
Backend:
- Database migration for agent role fields and predefined roles
- AgentRole and AgentCollaboration models
- Updated Agent model with role-based fields

Frontend:
- AgentRoleSelector component for role assignment
- CollaborationDashboard for monitoring agent interactions
- AgentManagement interface with role analytics

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 15:24:53 +10:00
anthonyrawlins
42d02fbb60 cleanup file structure 2025-07-17 10:51:31 +10:00
anthonyrawlins
2b5e6a492d Fix frontend API integration: correct endpoint and data transformation
- Change getProjects() to call /api/bzzz/active-repos instead of /projects
- Transform Bzzz repository response structure from nested {repositories: [...]} to flat array
- Map repository fields to Project interface with status field (ready_to_claim -> active/inactive)
- Remove defensive array checks since API now returns proper array structure
- Fix TypeError: r.filter is not a function by ensuring proper data flow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 22:29:11 +10:00
anthonyrawlins
8a2e6b42dc Fix frontend console errors: disable WebSocket and add defensive array checks
- Disable Socket.IO connections in production to prevent connection errors
- Add Array.isArray() checks before calling filter() methods
- Fix TypeError: r.filter is not a function errors in Dashboard, Analytics, and Agents pages
- Ensure API responses are treated as arrays with fallback to empty arrays

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 22:21:26 +10:00
anthonyrawlins
3f3eec7f5d Integrate Bzzz P2P task coordination and enhance project management
🔗 Bzzz Integration:
- Added comprehensive Bzzz integration documentation and todos
- Implemented N8N chat workflow architecture for task coordination
- Enhanced project management with Bzzz-specific features
- Added GitHub service for seamless issue synchronization
- Created BzzzIntegration component for frontend management

🎯 Project Management Enhancements:
- Improved project listing and filtering capabilities
- Enhanced authentication and authorization flows
- Added unified coordinator for better task orchestration
- Streamlined project activation and configuration
- Updated API endpoints for Bzzz compatibility

📊 Technical Improvements:
- Updated Docker Swarm configuration for local registry
- Enhanced frontend build with updated assets
- Improved WebSocket connections for real-time updates
- Added comprehensive error handling and logging
- Updated environment configurations for production

 System Integration:
- Successfully tested with Bzzz v1.2 task execution workflow
- Validated GitHub issue discovery and claiming functionality
- Confirmed sandbox-based task execution compatibility
- Verified Docker registry integration

This release enables seamless integration between Hive project management and Bzzz P2P task coordination, creating a complete distributed development ecosystem.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 20:56:01 +10:00
anthonyrawlins
e89f2f4b7b Add comprehensive development roadmap via GitHub Issues
Created 10 detailed GitHub issues covering:
- Project activation and management UI (#1-2)
- Worker node coordination and visualization (#3-4)
- Automated GitHub repository scanning (#5)
- Intelligent model-to-issue matching (#6)
- Multi-model task execution system (#7)
- N8N workflow integration (#8)
- Hive-Bzzz P2P bridge (#9)
- Peer assistance protocol (#10)

Each issue includes detailed specifications, acceptance criteria,
technical implementation notes, and dependency mapping.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 19:41:01 +10:00
anthonyrawlins
ca18476efc Implement comprehensive API documentation system
 Features:
- Comprehensive Pydantic response models with examples
- Enhanced FastAPI configuration with rich OpenAPI metadata
- Centralized error handling with standardized error codes
- Professional Swagger UI styling and branding
- Health check endpoints with detailed component status
- Type-safe request/response models for all endpoints

📊 Coverage:
- Agent Management API fully documented
- Standardized error responses across all endpoints
- Interactive API documentation with try-it-now functionality
- Custom OpenAPI schema with authentication schemes

🛠️ Technical Improvements:
- Created app/models/responses.py with comprehensive models
- Added app/core/error_handlers.py for centralized error handling
- Enhanced app/api/agents.py with detailed documentation
- Custom documentation configuration in app/docs_config.py
- Global exception handlers for consistent error responses

🌐 Access Points:
- Swagger UI: /docs
- ReDoc: /redoc
- OpenAPI JSON: /openapi.json

This establishes professional-grade API documentation that matches
Hive's technical excellence and provides developers with comprehensive,
interactive documentation for efficient integration.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 10:21:08 +10:00
anthonyrawlins
8619b75296 🔖 Update version numbers to 1.1.0 in package.json and API spec
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 22:01:34 +10:00
anthonyrawlins
cd28f94e8f 🚀 Release Hive Platform v1.1 - Complete Authentication & Architecture Overhaul
Major Features:
 JWT Bearer Token authentication system with secure token management
 API key generation and management with scoped permissions
 Complete user management (registration, login, logout, password change)
 Frontend authentication components and context integration

Backend Architecture Improvements:
 CORS configuration via environment variables (CORS_ORIGINS)
 Dependency injection pattern for unified coordinator
 Database schema fixes with UUID support and SQLAlchemy compliance
 Task persistence replaced in-memory storage with database-backed system
 Service separation following Single Responsibility Principle
 Fixed SQLAlchemy metadata column naming conflicts

Infrastructure & Testing:
 Comprehensive Jest unit testing and Playwright e2e testing infrastructure
 GitHub Actions CI/CD pipeline integration
 Enhanced API clients matching PROJECT_PLAN.md specifications
 Docker Swarm deployment with proper networking and service connectivity

Database & Security:
 UUID-based user models with proper validation
 Unified database schema with authentication tables
 Token blacklisting and refresh token management
 Secure password hashing with bcrypt
 API key scoping and permissions system

API Enhancements:
 Authentication endpoints (/api/auth/*)
 Task management with database persistence
 Enhanced monitoring and health check endpoints
 Comprehensive error handling and validation

Deployment:
 Successfully deployed to Docker Swarm at https://hive.home.deepblack.cloud
 All services operational with proper networking
 Environment-based configuration support

🛠️ Technical Debt Resolved:
- Fixed global coordinator instances with proper dependency injection
- Replaced hardcoded CORS origins with environment variables
- Unified User model schema conflicts across authentication system
- Implemented database persistence for critical task storage
- Created comprehensive testing infrastructure

This release transforms Hive from a development prototype into a production-ready
distributed AI orchestration platform with enterprise-grade authentication,
proper architectural patterns, and robust deployment infrastructure.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 22:00:42 +10:00
anthonyrawlins
aacb45156b Set up comprehensive frontend testing infrastructure
- Install Jest for unit testing with React Testing Library
- Install Playwright for end-to-end testing
- Configure Jest with proper TypeScript support and module mapping
- Create test setup files and utilities for both unit and e2e tests

Components:
* Jest configuration with coverage thresholds
* Playwright configuration with browser automation
* Unit tests for LoginForm, AuthContext, and useSocketIO hook
* E2E tests for authentication, dashboard, and agents workflows
* GitHub Actions workflow for automated testing
* Mock data and API utilities for consistent testing
* Test documentation with best practices

Testing features:
- Unit tests with 70% coverage threshold
- E2E tests with API mocking and user journey testing
- CI/CD integration for automated test runs
- Cross-browser testing support with Playwright
- Authentication system testing end-to-end

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 14:06:34 +10:00
anthonyrawlins
c6d69695a8 Refactor UnifiedCoordinator to follow Single Responsibility Principle
- Create dedicated service classes for separated concerns:
  * AgentService: Agent management and health monitoring
  * WorkflowService: Workflow parsing and execution tracking
  * PerformanceService: Metrics and load balancing
  * BackgroundService: Background processes and cleanup
  * TaskService: Database persistence (already existed)

- Refactor UnifiedCoordinator into UnifiedCoordinatorRefactored
  * Clean separation of responsibilities
  * Improved maintainability and testability
  * Dependency injection pattern for services
  * Clear service boundaries and interfaces

- Maintain backward compatibility through re-exports
- Update main.py to use refactored coordinator

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 09:09:11 +10:00
anthonyrawlins
36c5e10a51 Update frontend dependencies and remove deprecated packages
Updated key frontend dependencies to latest stable versions and removed
deprecated react-flow-renderer package that was no longer in use.

Changes:
- Remove deprecated react-flow-renderer (unused in codebase)
- Update @tanstack/react-query to v5.59.0 (from v5.17.0)
- Update react-router-dom to v6.28.0 (from v6.20.0)
- Update axios to v1.7.9 (from v1.6.0)
- Update reactflow to v11.11.4 (from v11.10.1)
- Update lucide-react to v0.453.0 (from v0.294.0)
- Update vite to v5.4.10 (from v5.0.8)
- Update typescript to v5.6.3 (from v5.2.2)

Testing:
- Frontend builds successfully with updated dependencies
- TypeScript compilation passes without errors
- All dependency updates are backward compatible

Benefits:
- Latest security patches and bug fixes
- Improved performance and features
- Cleaner dependency tree without deprecated packages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 09:01:16 +10:00
anthonyrawlins
eda5b2d6d3 Unify database schema: Resolve all User model conflicts and auth table incompatibilities
Major changes:
- Consolidate 3 different User models into single unified model (models/user.py)
- Use UUID primary keys throughout (matches existing database schema)
- Add comprehensive authentication fields while preserving existing data
- Remove duplicate User model from auth.py, keep APIKey/RefreshToken/TokenBlacklist
- Update all imports to use unified User model consistently
- Create database migration (002_add_auth_fields.sql) for safe schema upgrade
- Fix frontend User interface to handle UUID string IDs
- Add backward compatibility fields (name property, role field)
- Maintain relationships for authentication features (api_keys, refresh_tokens)

Schema conflicts resolved:
 Migration schema (UUID, 7 fields) + Basic model (Integer, 6 fields) + Auth model (Integer, 10 fields)
   → Unified model (UUID, 12 fields with full backward compatibility)
 Field inconsistencies (name vs full_name) resolved with compatibility property
 Database foreign key constraints updated for UUID relationships
 JWT token handling fixed for UUID user IDs

This completes the holistic database schema unification requested after quick
patching caused conflicts. All existing data preserved, full auth system functional.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 22:56:14 +10:00
anthonyrawlins
9b31997351 Fix remaining TypeScript errors and dependencies
- Replace complex UI components with simple React implementations
- Remove external dependencies (class-variance-authority, @radix-ui)
- Fix TypeScript parameter type in APIKeyManager
- Create working alert, dialog, and checkbox components

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)
2025-07-10 20:59:21 +10:00
anthonyrawlins
a6a3ebd1a9 Fix TypeScript errors in authentication components
- Update User interface to include backward compatibility fields (name, role)
- Fix authentication components to handle new User model structure
- Create missing UI components (alert, dialog, checkbox)
- Fix login component to handle Promise<void> return type
- Update user references to use full_name or username fallbacks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)
2025-07-10 20:56:16 +10:00
anthonyrawlins
7af5b47477 Implement complete Bearer Token and API key authentication system
- Create comprehensive authentication backend with JWT and API key support
- Add database models for users, API keys, and tokens with proper security
- Implement authentication middleware and API endpoints
- Build complete frontend authentication UI with:
  - LoginForm component with JWT authentication
  - APIKeyManager for creating and managing API keys
  - AuthDashboard for comprehensive auth management
  - AuthContext for state management and authenticated requests
- Initialize database with default admin user (admin/admin123)
- Add proper token refresh, validation, and blacklisting
- Implement scope-based API key authorization system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 20:52:58 +10:00
anthonyrawlins
f3cbb5c6f7 Add environment configuration and local development documentation
- Parameterize CORS_ORIGINS in docker-compose.swarm.yml
- Add .env.example with configuration options
- Create comprehensive LOCAL_DEVELOPMENT.md guide
- Update README.md with environment variable documentation
- Provide alternatives for local development without production domain

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 18:20:52 +10:00
anthonyrawlins
7cb4ea18f3 🎉 Complete Phase 5: Frontend UI Updates for Mixed Agent Management
CCLI INTEGRATION PROJECT COMPLETE: Successfully implemented comprehensive
frontend interface for hybrid Ollama/CLI agent orchestration.

## Phase 5 Achievements:
 Mixed agent dashboard with visual distinction (🤖 API vs  CLI)
 Dual registration system with tabbed interface
 Enhanced statistics (5-card layout with agent type breakdown)
 Quick setup button for predefined CLI agents
 Type-specific agent cards with CLI configuration display
 Comprehensive API integration for CLI agent management

## Frontend Features:
- Visual agent type distinction with icons and color coding
- Tabbed registration (Ollama vs CLI agents)
- Enhanced agent cards showing SSH host/Node.js version
- 5-column statistics: Total, Ollama, CLI, Available, Tasks
- Quick CLI setup with predefined agent registration
- Responsive design with comprehensive error handling

## Technical Implementation:
- Extended Agent interface with agent_type and cli_config
- Added CLI agent API methods to agentApi service
- Enhanced registration forms with validation and hints
- Type-safe TypeScript throughout mixed agent operations
- Production build verified (1.2MB optimized bundle)

## User Experience:
 Clear visual hierarchy and agent type identification
 Streamlined registration workflows for both agent types
 One-click predefined CLI agent setup
 Enhanced monitoring with type-specific information
 Responsive design working across all device sizes

## PROJECT STATUS: ALL 5 PHASES COMPLETE
- Phase 1: Connectivity Testing 
- Phase 2: CLI Agent Adapters 
- Phase 3: Backend Integration 
- Phase 4: MCP Server Updates 
- Phase 5: Frontend UI Updates 

Ready for hybrid AI orchestration: 5 Ollama + 2 CLI agents

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 12:26:34 +10:00
anthonyrawlins
85bf1341f3 Add comprehensive frontend UI and distributed infrastructure
Frontend Enhancements:
- Complete React TypeScript frontend with modern UI components
- Distributed workflows management interface with real-time updates
- Socket.IO integration for live agent status monitoring
- Agent management dashboard with cluster visualization
- Project management interface with metrics and task tracking
- Responsive design with proper error handling and loading states

Backend Infrastructure:
- Distributed coordinator for multi-agent workflow orchestration
- Cluster management API with comprehensive agent operations
- Enhanced database models for agents and projects
- Project service for filesystem-based project discovery
- Performance monitoring and metrics collection
- Comprehensive API documentation and error handling

Documentation:
- Complete distributed development guide (README_DISTRIBUTED.md)
- Comprehensive development report with architecture insights
- System configuration templates and deployment guides

The platform now provides a complete web interface for managing the distributed AI cluster
with real-time monitoring, workflow orchestration, and agent coordination capabilities.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 08:41:59 +10:00
anthonyrawlins
962fbbd4b5 Fix Hive frontend and backend service issues
Backend fixes:
- Remove --reload flag to prevent dev mode cycling
- Add curl for health checks
- Configure PostgreSQL connection properly
- Fix Docker CMD for production deployment

Frontend fixes:
- Use serve for production static file serving
- Add curl for health checks (installed as root before user switch)
- Configure proper host binding for containers
- Fix Dockerfile layer ordering

Results:
-  Backend: 1/2 replicas running, health checks passing
-  Frontend: 2/2 replicas running, serving requests
-  Health endpoints responding correctly
-  Services stable and persistent

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 22:24:29 +10:00
anthonyrawlins
d7ad321176 Initial commit: Complete Hive distributed AI orchestration platform
This comprehensive implementation includes:
- FastAPI backend with MCP server integration
- React/TypeScript frontend with Vite
- PostgreSQL database with Redis caching
- Grafana/Prometheus monitoring stack
- Docker Compose orchestration
- Full MCP protocol support for Claude Code integration

Features:
- Agent discovery and management across network
- Visual workflow editor and execution engine
- Real-time task coordination and monitoring
- Multi-model support with specialized agents
- Distributed development task allocation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 21:44:31 +10:00