from fastapi import APIRouter from fastapi.responses import HTMLResponse # ========================== # đŸ› ī¸ Router Setup # ========================== router = APIRouter( prefix="/help", tags=["Information"] ) # ========================== # â„šī¸ API Info Endpoint # ========================== @router.get("/") def get_api_info(): """ Returns general information about the API and available endpoints. No authentication required. """ return { "requested_by": "Guest", "api_name": "Easy Tools API", "developer": "Sameer Banchhor", "version": "1.0.0", "available_tools": [ "/image (Compressor & BG Remover)", "/pdf (Merge & Rotate)", "/drive (File Storage & Aria2)", "/security (Password Generator)", "/server-status (System Monitor)" ], "message": "Use the /help/ui endpoint to access the visual dashboard.", "developer_info": "Created by Sameer Banchhor, Data Scientist (MSc in System Design, Kalyan PG College).", "git_link": "https://github.com/sameerbanchhor-git" } # ========================== # 🧭 Central Hub UI # ========================== @router.get("/ui", response_class=HTMLResponse) async def help_ui(): html_content = """ Easy Tools Hub | by Sam
Easy Tools Suite
All your essential utilities in one place.
đŸ–ŧī¸
Image Tools
Compress JPEGs to specific sizes & remove backgrounds instantly using AI.
📄
PDF Master
Merge multiple documents or rotate pages with a simple drag & drop interface.
â˜ī¸
Cloud Drive
Upload files locally or use Aria2 for high-speed remote server downloads.
🔐
Security
Generate cryptographically strong passwords with advanced custom rules.
📊
Server Monitor
Real-time dashboard for CPU, RAM, Disk usage, and Network traffic.
⚡
API Docs
Explore the raw Swagger UI for testing API endpoints directly.
""" return html_content