Select a project
Choose a project from the sidebar or create a new one
Not configured
""" TicketHub - Lightweight Issue Tracking System Professional Edition """ from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import HTMLResponse from contextlib import asynccontextmanager import os from app.routers import tickets, projects, webhooks, health from app.services.database import init_db @asynccontextmanager async def lifespan(app: FastAPI): await init_db() yield app = FastAPI( title="TicketHub", description="Lightweight open-source ticket/issue tracking system", version="2.0.0", lifespan=lifespan ) app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) # API routes app.include_router(health.router, prefix="/api", tags=["health"]) app.include_router(projects.router, prefix="/api/projects", tags=["projects"]) app.include_router(tickets.router, prefix="/api/tickets", tags=["tickets"]) app.include_router(webhooks.router, prefix="/api/webhooks", tags=["webhooks"]) # Professional Frontend HTML = """
Choose a project from the sidebar or create a new one
Not configured