feat: Major update with validators, skills, dashboard, and docs reorganization
- Add validation framework (config, model, results, study validators)
- Add Claude Code skills (create-study, run-optimization, generate-report,
troubleshoot, analyze-model)
- Add Atomizer Dashboard (React frontend + FastAPI backend)
- Reorganize docs into structured directories (00-09)
- Add neural surrogate modules and training infrastructure
- Add multi-objective optimization support
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:23:58 -05:00
|
|
|
"""
|
|
|
|
|
Atomizer Dashboard - FastAPI Backend
|
|
|
|
|
Real-time optimization monitoring and control
|
|
|
|
|
"""
|
|
|
|
|
|
2026-01-13 15:53:55 -05:00
|
|
|
from contextlib import asynccontextmanager
|
feat: Major update with validators, skills, dashboard, and docs reorganization
- Add validation framework (config, model, results, study validators)
- Add Claude Code skills (create-study, run-optimization, generate-report,
troubleshoot, analyze-model)
- Add Atomizer Dashboard (React frontend + FastAPI backend)
- Reorganize docs into structured directories (00-09)
- Add neural surrogate modules and training infrastructure
- Add multi-objective optimization support
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:23:58 -05:00
|
|
|
from fastapi import FastAPI
|
|
|
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
|
from fastapi.responses import FileResponse
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
# Add parent directory to path to import optimization_engine
|
|
|
|
|
sys.path.append(str(Path(__file__).parent.parent.parent.parent))
|
|
|
|
|
|
feat(dashboard): Enhanced chat, spec management, and Claude integration
Backend:
- spec.py: New AtomizerSpec REST API endpoints
- spec_manager.py: SpecManager service for unified config
- interview_engine.py: Study creation interview logic
- claude.py: Enhanced Claude API with context
- optimization.py: Extended optimization endpoints
- context_builder.py, session_manager.py: Improved services
Frontend:
- Chat components: Enhanced message rendering, tool call cards
- Hooks: useClaudeCode, useSpecWebSocket, improved useChat
- Pages: Updated Dashboard, Analysis, Insights, Setup, Home
- Components: ParallelCoordinatesPlot, ParetoPlot improvements
- App.tsx: Route updates for canvas/studio
Infrastructure:
- vite.config.ts: Build configuration updates
- start/stop-dashboard.bat: Script improvements
2026-01-20 13:10:47 -05:00
|
|
|
from api.routes import optimization, claude, terminal, insights, context, files, nx, claude_code, spec
|
feat: Major update with validators, skills, dashboard, and docs reorganization
- Add validation framework (config, model, results, study validators)
- Add Claude Code skills (create-study, run-optimization, generate-report,
troubleshoot, analyze-model)
- Add Atomizer Dashboard (React frontend + FastAPI backend)
- Reorganize docs into structured directories (00-09)
- Add neural surrogate modules and training infrastructure
- Add multi-objective optimization support
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:23:58 -05:00
|
|
|
from api.websocket import optimization_stream
|
|
|
|
|
|
2026-01-13 15:53:55 -05:00
|
|
|
|
|
|
|
|
# Lifespan handler for session manager
|
|
|
|
|
@asynccontextmanager
|
|
|
|
|
async def lifespan(app: FastAPI):
|
|
|
|
|
"""Manage application lifespan - start/stop session manager"""
|
|
|
|
|
# Startup
|
|
|
|
|
from api.routes.claude import get_session_manager
|
|
|
|
|
manager = get_session_manager()
|
|
|
|
|
await manager.start()
|
|
|
|
|
print("Session manager started")
|
|
|
|
|
|
|
|
|
|
yield
|
|
|
|
|
|
|
|
|
|
# Shutdown
|
|
|
|
|
await manager.stop()
|
|
|
|
|
print("Session manager stopped")
|
|
|
|
|
|
|
|
|
|
|
feat: Major update with validators, skills, dashboard, and docs reorganization
- Add validation framework (config, model, results, study validators)
- Add Claude Code skills (create-study, run-optimization, generate-report,
troubleshoot, analyze-model)
- Add Atomizer Dashboard (React frontend + FastAPI backend)
- Reorganize docs into structured directories (00-09)
- Add neural surrogate modules and training infrastructure
- Add multi-objective optimization support
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:23:58 -05:00
|
|
|
# Create FastAPI app
|
|
|
|
|
app = FastAPI(
|
|
|
|
|
title="Atomizer Dashboard API",
|
|
|
|
|
description="Real-time optimization monitoring and control",
|
2026-01-13 15:53:55 -05:00
|
|
|
version="2.0.0",
|
|
|
|
|
lifespan=lifespan,
|
feat: Major update with validators, skills, dashboard, and docs reorganization
- Add validation framework (config, model, results, study validators)
- Add Claude Code skills (create-study, run-optimization, generate-report,
troubleshoot, analyze-model)
- Add Atomizer Dashboard (React frontend + FastAPI backend)
- Reorganize docs into structured directories (00-09)
- Add neural surrogate modules and training infrastructure
- Add multi-objective optimization support
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:23:58 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Configure CORS for local development
|
|
|
|
|
app.add_middleware(
|
|
|
|
|
CORSMiddleware,
|
|
|
|
|
allow_origins=["*"], # Allow all origins for local development
|
|
|
|
|
allow_credentials=True,
|
|
|
|
|
allow_methods=["*"],
|
|
|
|
|
allow_headers=["*"],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Include routers
|
|
|
|
|
app.include_router(optimization.router, prefix="/api/optimization", tags=["optimization"])
|
|
|
|
|
app.include_router(optimization_stream.router, prefix="/api/ws", tags=["websocket"])
|
2025-12-04 15:02:13 -05:00
|
|
|
app.include_router(claude.router, prefix="/api/claude", tags=["claude"])
|
|
|
|
|
app.include_router(terminal.router, prefix="/api/terminal", tags=["terminal"])
|
2025-12-21 13:28:51 -05:00
|
|
|
app.include_router(insights.router, prefix="/api/insights", tags=["insights"])
|
2025-12-29 20:21:20 -05:00
|
|
|
app.include_router(context.router, prefix="/api/context", tags=["context"])
|
2026-01-16 14:47:10 -05:00
|
|
|
app.include_router(files.router, prefix="/api/files", tags=["files"])
|
|
|
|
|
app.include_router(nx.router, prefix="/api/nx", tags=["nx"])
|
feat(dashboard): Enhanced chat, spec management, and Claude integration
Backend:
- spec.py: New AtomizerSpec REST API endpoints
- spec_manager.py: SpecManager service for unified config
- interview_engine.py: Study creation interview logic
- claude.py: Enhanced Claude API with context
- optimization.py: Extended optimization endpoints
- context_builder.py, session_manager.py: Improved services
Frontend:
- Chat components: Enhanced message rendering, tool call cards
- Hooks: useClaudeCode, useSpecWebSocket, improved useChat
- Pages: Updated Dashboard, Analysis, Insights, Setup, Home
- Components: ParallelCoordinatesPlot, ParetoPlot improvements
- App.tsx: Route updates for canvas/studio
Infrastructure:
- vite.config.ts: Build configuration updates
- start/stop-dashboard.bat: Script improvements
2026-01-20 13:10:47 -05:00
|
|
|
app.include_router(claude_code.router, prefix="/api", tags=["claude-code"])
|
|
|
|
|
app.include_router(spec.router, prefix="/api", tags=["spec"])
|
|
|
|
|
app.include_router(spec.validate_router, prefix="/api", tags=["spec"])
|
feat: Major update with validators, skills, dashboard, and docs reorganization
- Add validation framework (config, model, results, study validators)
- Add Claude Code skills (create-study, run-optimization, generate-report,
troubleshoot, analyze-model)
- Add Atomizer Dashboard (React frontend + FastAPI backend)
- Reorganize docs into structured directories (00-09)
- Add neural surrogate modules and training infrastructure
- Add multi-objective optimization support
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:23:58 -05:00
|
|
|
|
|
|
|
|
@app.get("/")
|
|
|
|
|
async def root():
|
|
|
|
|
"""Serve the enhanced dashboard HTML"""
|
|
|
|
|
dashboard_path = Path(__file__).parent.parent.parent / "dashboard-enhanced.html"
|
|
|
|
|
return FileResponse(dashboard_path)
|
|
|
|
|
|
|
|
|
|
@app.get("/health")
|
|
|
|
|
async def health_check():
|
2026-01-16 14:47:10 -05:00
|
|
|
"""Health check endpoint with database status"""
|
|
|
|
|
try:
|
|
|
|
|
from api.services.conversation_store import ConversationStore
|
|
|
|
|
store = ConversationStore()
|
|
|
|
|
# Test database by creating/getting a health check session
|
|
|
|
|
store.get_session("health_check")
|
|
|
|
|
db_status = "connected"
|
|
|
|
|
except Exception as e:
|
|
|
|
|
db_status = f"error: {str(e)}"
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
"status": "healthy" if db_status == "connected" else "degraded",
|
|
|
|
|
"database": db_status,
|
|
|
|
|
}
|
feat: Major update with validators, skills, dashboard, and docs reorganization
- Add validation framework (config, model, results, study validators)
- Add Claude Code skills (create-study, run-optimization, generate-report,
troubleshoot, analyze-model)
- Add Atomizer Dashboard (React frontend + FastAPI backend)
- Reorganize docs into structured directories (00-09)
- Add neural surrogate modules and training infrastructure
- Add multi-objective optimization support
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:23:58 -05:00
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
import uvicorn
|
|
|
|
|
uvicorn.run(
|
|
|
|
|
"main:app",
|
|
|
|
|
host="0.0.0.0",
|
|
|
|
|
port=8000,
|
|
|
|
|
reload=True,
|
|
|
|
|
log_level="info"
|
|
|
|
|
)
|