Add comprehensive Docker deployment and file upload functionality

Features Added:
• Docker containerization with multi-stage Python 3.12 build
• Caddy reverse proxy integration with automatic SSL
• File upload interface for .claude.json imports with preview
• Comprehensive hook system with 39+ hook types across 9 categories
• Complete documentation system with Docker and import guides

Technical Improvements:
• Enhanced database models with hook tracking capabilities
• Robust file validation and error handling for uploads
• Production-ready Docker compose configuration
• Health checks and resource limits for containers
• Database initialization scripts for containerized deployments

Documentation:
• Docker Deployment Guide with troubleshooting
• Data Import Guide with step-by-step instructions
• Updated Getting Started guide with new features
• Enhanced documentation index with responsive grid layout

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ryan Malloy 2025-08-11 08:02:09 -06:00
parent bec1606c86
commit 50c80596d0
36 changed files with 4334 additions and 172 deletions

17
main.py
View file

@ -9,7 +9,7 @@ from fastapi.staticfiles import StaticFiles
from fastapi.responses import RedirectResponse
from app.database.connection import init_database, close_database
from app.api import sessions, conversations, activities, waiting, git, projects, analytics, importer, tool_calls
from app.api import sessions, conversations, activities, waiting, git, projects, analytics, importer, tool_calls, hooks
from app.dashboard.routes import dashboard_router
@ -18,11 +18,21 @@ async def lifespan(app: FastAPI):
"""Application lifespan management."""
# Startup
print("Starting Claude Code Project Tracker...")
await init_database()
try:
await init_database()
print("Database initialized successfully!")
except Exception as e:
print(f"Database initialization failed: {e}")
print("Application will continue with limited functionality...")
yield
# Shutdown
print("Shutting down...")
await close_database()
try:
await close_database()
except Exception as e:
print(f"Error during shutdown: {e}")
# Create FastAPI app
@ -52,6 +62,7 @@ app.include_router(projects.router, prefix="/api", tags=["Projects"])
app.include_router(analytics.router, prefix="/api", tags=["Analytics"])
app.include_router(importer.router, prefix="/api", tags=["Data Import"])
app.include_router(tool_calls.router, prefix="/api", tags=["Tool Calls"])
app.include_router(hooks.router, prefix="/api", tags=["Hooks"])
# Include dashboard routes
app.include_router(dashboard_router, tags=["Dashboard"])