From 53c1ed5c4c0f705468a67e0e5a8244fbac057220 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sun, 8 Feb 2026 13:14:13 +0000 Subject: [PATCH] feat: add landing page with API docs at root URL Co-Authored-By: Claude Opus 4.6 --- backend/app/main.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/backend/app/main.py b/backend/app/main.py index 7a99708..f12e7b3 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -2,6 +2,7 @@ from contextlib import asynccontextmanager from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware +from fastapi.responses import HTMLResponse from app.api.routes import jobs, clips, renders @@ -31,6 +32,32 @@ app.include_router(clips.router, prefix="/api") app.include_router(renders.router, prefix="/api") +@app.get("/", response_class=HTMLResponse) +async def root(): + return """ClipForge +
+

ClipForge

Self-hosted AI video clipper

+

API Endpoints

+
POST/api/jobs Create job (YouTube URL)
+
POST/api/jobs/upload Upload video file
+
GET/api/jobs/{id} Job status
+
GET/api/jobs/{id}/clips Get clips
+
GET/api/jobs/{id}/progress SSE progress stream
+
POST/api/clips/{id}/render Render clip
+
GET/api/renders/{id}/download Download render
+
+

Interactive Docs

+

/docs — Swagger UI
+/redoc — ReDoc

+
""" + + @app.get("/health") async def health(): return {"status": "ok", "service": "clipforge"}