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:
76
backend/app/main_test.py
Normal file
76
backend/app/main_test.py
Normal file
@@ -0,0 +1,76 @@
|
||||
"""
|
||||
Test-friendly version of WHOOSH main.py that can start without database dependencies
|
||||
"""
|
||||
from fastapi import FastAPI, Depends, HTTPException, status
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
import os
|
||||
from datetime import datetime
|
||||
|
||||
# Create lightweight FastAPI application for testing
|
||||
app = FastAPI(
|
||||
title="WHOOSH API - Test Mode",
|
||||
description="WHOOSH API running in test mode without database dependencies",
|
||||
version="1.1.0-test",
|
||||
docs_url="/docs",
|
||||
redoc_url="/redoc"
|
||||
)
|
||||
|
||||
# Add CORS middleware
|
||||
cors_origins = ["http://localhost:3000", "http://localhost:3001", "*"]
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=cors_origins,
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# Import only the template API which doesn't require database
|
||||
from app.api import templates
|
||||
|
||||
# Include only template routes for testing
|
||||
app.include_router(templates.router, tags=["project-templates"])
|
||||
|
||||
@app.get("/")
|
||||
async def root():
|
||||
"""Root endpoint"""
|
||||
return {
|
||||
"message": "🐝 Welcome to WHOOSH - Test Mode",
|
||||
"status": "operational",
|
||||
"version": "1.1.0-test",
|
||||
"mode": "testing",
|
||||
"api_docs": "/docs",
|
||||
"timestamp": datetime.now().isoformat()
|
||||
}
|
||||
|
||||
@app.get("/health")
|
||||
async def health_check():
|
||||
"""Simple health check"""
|
||||
return {
|
||||
"status": "healthy",
|
||||
"version": "1.1.0-test",
|
||||
"mode": "testing",
|
||||
"timestamp": datetime.now().isoformat()
|
||||
}
|
||||
|
||||
@app.get("/api/health")
|
||||
async def detailed_health_check():
|
||||
"""Detailed health check for testing"""
|
||||
return {
|
||||
"status": "healthy",
|
||||
"version": "1.1.0-test",
|
||||
"mode": "testing",
|
||||
"components": [
|
||||
{
|
||||
"name": "templates",
|
||||
"status": "healthy",
|
||||
"last_check": datetime.now().isoformat()
|
||||
}
|
||||
],
|
||||
"message": "Test mode - database checks disabled",
|
||||
"timestamp": datetime.now().isoformat()
|
||||
}
|
||||
|
||||
if __name__ == "__main__":
|
||||
import uvicorn
|
||||
uvicorn.run(app, host="0.0.0.0", port=8087)
|
||||
Reference in New Issue
Block a user