Add WHOOSH search service with BACKBEAT integration

Complete implementation:
- Go-based search service with PostgreSQL and Redis backend
- BACKBEAT SDK integration for beat-aware search operations
- Docker containerization with multi-stage builds
- Comprehensive API endpoints for project analysis and search
- Database migrations and schema management
- GITEA integration for repository management
- Team composition analysis and recommendations

Key features:
- Beat-synchronized search operations with timing coordination
- Phase-based operation tracking (started → querying → ranking → completed)
- Docker Swarm deployment configuration
- Health checks and monitoring
- Secure configuration with environment variables

Architecture:
- Microservice design with clean API boundaries
- Background processing for long-running analysis
- Modular internal structure with proper separation of concerns
- Integration with CHORUS ecosystem via BACKBEAT timing

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude Code
2025-09-06 11:16:39 +10:00
parent 595b05335d
commit 33676bae6d
29 changed files with 4262 additions and 185 deletions

68
docker-compose.yml Normal file
View File

@@ -0,0 +1,68 @@
version: '3.8'
services:
whoosh:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
# Database configuration
WHOOSH_DATABASE_HOST: postgres
WHOOSH_DATABASE_PORT: 5432
WHOOSH_DATABASE_DB_NAME: whoosh
WHOOSH_DATABASE_USERNAME: whoosh
WHOOSH_DATABASE_PASSWORD: whoosh_dev_password
WHOOSH_DATABASE_SSL_MODE: disable
WHOOSH_DATABASE_AUTO_MIGRATE: "true"
# Server configuration
WHOOSH_SERVER_LISTEN_ADDR: ":8080"
# GITEA configuration
WHOOSH_GITEA_BASE_URL: http://ironwood:3000
WHOOSH_GITEA_TOKEN: ${GITEA_TOKEN}
WHOOSH_GITEA_WEBHOOK_TOKEN: ${WEBHOOK_TOKEN:-dev_webhook_token}
# Auth configuration
WHOOSH_AUTH_JWT_SECRET: ${JWT_SECRET:-dev_jwt_secret_change_in_production}
WHOOSH_AUTH_SERVICE_TOKENS: ${SERVICE_TOKENS:-dev_service_token_1,dev_service_token_2}
# Logging
WHOOSH_LOGGING_LEVEL: debug
WHOOSH_LOGGING_ENVIRONMENT: development
# Redis (optional for development)
WHOOSH_REDIS_ENABLED: "false"
depends_on:
- postgres
restart: unless-stopped
networks:
- whoosh-network
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: whoosh
POSTGRES_USER: whoosh
POSTGRES_PASSWORD: whoosh_dev_password
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
networks:
- whoosh-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U whoosh"]
interval: 30s
timeout: 10s
retries: 5
volumes:
postgres_data:
networks:
whoosh-network:
driver: bridge