{
    "message": "Tailwind CSS Compilation Service",
    "version": "1.0.0",
    "timestamp": "2026-05-31T16:00:17+00:00",
    "endpoints": {
        "POST /compile": {
            "description": "Compile Tailwind CSS with custom theme and classes",
            "parameters": {
                "theme": "string - CSS with @theme directive and custom properties",
                "classes": "array|string - List of CSS classes to include"
            },
            "response": {
                "css": "string - The compiled CSS content",
                "css_url": "string - URL to access the CSS file directly"
            },
            "example": {
                "theme": "@theme { --color-primary: #3b82f6; --font-size-xl: 1.25rem; }",
                "classes": [
                    "text-primary",
                    "text-xl",
                    "p-4",
                    "p-10"
                ]
            }
        },
        "GET /css/{filename}": {
            "description": "Retrieve compiled CSS directly by cache hash",
            "parameters": {
                "filename": "string - SHA256 hash + .css extension"
            },
            "response_type": "text/css",
            "caching": "Immutable with 1-year cache (31536000s)",
            "example": "/css/a1b2c3d4e5f6...789.css"
        }
    },
    "cache": {
        "strategy": "Hash-based file caching",
        "description": "Identical requests are cached for fast responses",
        "location": "./cache/ directory",
        "key": "SHA256 hash of theme + classes"
    },
    "notes": [
        "Identical requests return cached results instantly",
        "Different requests trigger fresh compilation",
        "All specified classes are guaranteed to be included",
        "Cache persists across server restarts"
    ]
}