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>
This commit is contained in:
anthonyrawlins
2025-08-27 08:34:48 +10:00
parent 0e9844ef13
commit 268214d971
399 changed files with 57390 additions and 2045 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Apply cluster registration migration to Hive database
# Apply cluster registration migration to WHOOSH database
# This script applies the 007_add_cluster_registration.sql migration
set -e
@@ -8,9 +8,9 @@ set -e
echo "🚀 Applying Cluster Registration Migration..."
# Configuration
DB_NAME="hive"
DB_NAME="whoosh"
DB_USER="postgres"
DB_PASSWORD="hive123"
DB_PASSWORD="whoosh123"
MIGRATION_FILE="./migrations/007_add_cluster_registration.sql"
# Check if migration file exists
@@ -27,11 +27,11 @@ run_sql_docker() {
echo "🐳 Executing migration via Docker..."
# Check if PostgreSQL service is running in Docker swarm
if docker service ls | grep -q "hive_postgres"; then
if docker service ls | grep -q "whoosh_postgres"; then
echo "✅ PostgreSQL service found in Docker swarm"
# Get a running PostgreSQL container
CONTAINER_ID=$(docker ps --filter "label=com.docker.swarm.service.name=hive_postgres" --format "{{.ID}}" | head -n1)
CONTAINER_ID=$(docker ps --filter "label=com.docker.swarm.service.name=whoosh_postgres" --format "{{.ID}}" | head -n1)
if [[ -z "$CONTAINER_ID" ]]; then
echo "❌ No running PostgreSQL container found"
@@ -78,7 +78,7 @@ else
echo "📝 Manual steps:"
echo "1. Ensure PostgreSQL is running"
echo "2. Check database credentials"
echo "3. Run manually: psql -h localhost -U postgres -d hive -f $MIGRATION_FILE"
echo "3. Run manually: psql -h localhost -U postgres -d whoosh -f $MIGRATION_FILE"
exit 1
fi
@@ -94,8 +94,8 @@ echo " ✅ Indexes and triggers created"
echo " ✅ Development tokens inserted"
echo ""
echo "🔐 Development Tokens:"
echo " Dev Token: hive_dev_cluster_token_12345678901234567890123456789012"
echo " Prod Token: hive_prod_cluster_token_98765432109876543210987654321098"
echo " Dev Token: whoosh_dev_cluster_token_12345678901234567890123456789012"
echo " Prod Token: whoosh_prod_cluster_token_98765432109876543210987654321098"
echo ""
echo "⚠️ SECURITY WARNING: Change production tokens before deployment!"
echo ""

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""
Database rebuild script for Hive platform.
Database rebuild script for WHOOSH platform.
Completely rebuilds the database schema from scratch using the unified schema.
"""
@@ -22,9 +22,9 @@ def get_database_config():
return {
'host': os.getenv('DB_HOST', 'localhost'),
'port': os.getenv('DB_PORT', '5432'),
'database': os.getenv('DB_NAME', 'hive'),
'database': os.getenv('DB_NAME', 'whoosh'),
'user': os.getenv('DB_USER', 'postgres'),
'password': os.getenv('DB_PASSWORD', 'hive123'),
'password': os.getenv('DB_PASSWORD', 'whoosh123'),
}
def execute_sql_file(connection, sql_file_path):
@@ -47,7 +47,7 @@ def execute_sql_file(connection, sql_file_path):
def main():
"""Main function to rebuild the database."""
logger.info("🔄 Starting Hive database rebuild...")
logger.info("🔄 Starting WHOOSH database rebuild...")
# Get database configuration
db_config = get_database_config()
@@ -106,7 +106,7 @@ def main():
connection.close()
logger.info("🔌 Database connection closed")
logger.info("🎉 Hive database rebuild completed successfully!")
logger.info("🎉 WHOOSH database rebuild completed successfully!")
logger.info("🚀 Ready for authentication and full platform functionality")
if __name__ == "__main__":

View File

@@ -1,16 +1,16 @@
#!/bin/bash
# Hive Database Rebuild Script
# Completely rebuilds the Hive database schema using Docker and the complete schema file
# WHOOSH Database Rebuild Script
# Completely rebuilds the WHOOSH database schema using Docker and the complete schema file
set -e
echo "🔄 Starting Hive database rebuild..."
echo "🔄 Starting WHOOSH database rebuild..."
# Configuration
POSTGRES_HOST=${DB_HOST:-"hive_postgres"}
POSTGRES_DB=${DB_NAME:-"hive"}
POSTGRES_HOST=${DB_HOST:-"whoosh_postgres"}
POSTGRES_DB=${DB_NAME:-"whoosh"}
POSTGRES_USER=${DB_USER:-"postgres"}
POSTGRES_PASSWORD=${DB_PASSWORD:-"hive123"}
POSTGRES_PASSWORD=${DB_PASSWORD:-"whoosh123"}
POSTGRES_PORT=${DB_PORT:-"5432"}
# Colors for output
@@ -40,7 +40,7 @@ fi
echo_info "📄 Using complete schema: ./migrations/000_complete_schema.sql"
# Check if PostgreSQL container is running
if ! docker service ls | grep -q hive_postgres; then
if ! docker service ls | grep -q whoosh_postgres; then
echo_warning "⚠️ PostgreSQL service not found in Docker swarm"
echo_info "🚀 Starting PostgreSQL service..."
@@ -48,8 +48,8 @@ if ! docker service ls | grep -q hive_postgres; then
if docker ps | grep -q postgres; then
echo_info "📦 Found running PostgreSQL container"
else
echo_error "❌ No PostgreSQL container available. Please start the Hive stack first."
echo_info "Run: docker stack deploy -c docker-compose.swarm.yml hive"
echo_error "❌ No PostgreSQL container available. Please start the WHOOSH stack first."
echo_info "Run: docker stack deploy -c docker-compose.swarm.yml whoosh"
exit 1
fi
fi
@@ -61,7 +61,7 @@ execute_sql() {
# Copy SQL file to a temporary location and execute it via Docker
docker run --rm \
--network hive_default \
--network whoosh_default \
-v "$(pwd):/workspace" \
-e PGPASSWORD="$POSTGRES_PASSWORD" \
postgres:15-alpine \
@@ -73,7 +73,7 @@ test_connection() {
echo_info "🔌 Testing database connection..."
docker run --rm \
--network hive_default \
--network whoosh_default \
-e PGPASSWORD="$POSTGRES_PASSWORD" \
postgres:15-alpine \
psql -h "$POSTGRES_HOST" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "SELECT version();" > /dev/null 2>&1
@@ -92,7 +92,7 @@ verify_rebuild() {
echo_info "📊 Verifying database rebuild..."
local result=$(docker run --rm \
--network hive_default \
--network whoosh_default \
-e PGPASSWORD="$POSTGRES_PASSWORD" \
postgres:15-alpine \
psql -h "$POSTGRES_HOST" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -t -c "
@@ -133,12 +133,12 @@ main() {
# Verify the rebuild
if verify_rebuild; then
echo_success "🎉 Hive database rebuild completed successfully!"
echo_success "🎉 WHOOSH database rebuild completed successfully!"
echo_info "🚀 Ready for authentication and full platform functionality"
echo_info ""
echo_info "Default credentials:"
echo_info " Admin: admin@hive.local / admin123"
echo_info " Developer: developer@hive.local / dev123"
echo_info " Admin: admin@whoosh.local / admin123"
echo_info " Developer: developer@whoosh.local / dev123"
echo_warning "⚠️ CHANGE THESE PASSWORDS IN PRODUCTION!"
else
exit 1