{
  "product": "Specification (reference)",
  "title": "URL Shortener",
  "summary": "Slug generation, redirects, click analytics, expiry and custom domains.",
  "category": "services",
  "entries": [
    {
      "path": [
        "AI",
        "Core",
        "Shorten URL"
      ],
      "value": "POST /api/links",
      "status": "yes",
      "note": "returns short code + full short URL"
    },
    {
      "path": [
        "AI",
        "Core",
        "Redirect"
      ],
      "value": "GET /:code -> 301/302",
      "status": "yes",
      "note": "unknown code -> 404"
    },
    {
      "path": [
        "AI",
        "Core",
        "URL validation"
      ],
      "value": "",
      "status": "yes",
      "note": "reject non-http(s) and malformed URLs"
    },
    {
      "path": [
        "AI",
        "Core",
        "Custom alias"
      ],
      "value": "",
      "status": "yes",
      "note": "optional caller-chosen code; 409 when taken"
    },
    {
      "path": [
        "AI",
        "Core",
        "Code generation"
      ],
      "value": "base62, 6-8 chars",
      "status": "yes",
      "note": "collision-safe"
    },
    {
      "path": [
        "AI",
        "Core",
        "Idempotent shorten"
      ],
      "value": "",
      "status": "yes",
      "note": "same long URL returns the same code (per owner)"
    },
    {
      "path": [
        "AI",
        "Links",
        "Expiration"
      ],
      "value": "TTL or date",
      "status": "yes",
      "note": "expired -> 410"
    },
    {
      "path": [
        "AI",
        "Links",
        "Delete/disable link"
      ],
      "value": "",
      "status": "yes",
      "note": ""
    },
    {
      "path": [
        "AI",
        "Links",
        "List own links"
      ],
      "value": "GET /api/links",
      "status": "yes",
      "note": "paginated"
    },
    {
      "path": [
        "AI",
        "Analytics",
        "Click counting"
      ],
      "value": "",
      "status": "yes",
      "note": "total clicks per link"
    },
    {
      "path": [
        "AI",
        "Analytics",
        "Click metadata"
      ],
      "value": "referrer, ts",
      "status": "yes",
      "note": "at minimum timestamp series"
    },
    {
      "path": [
        "AI",
        "Analytics",
        "Stats endpoint"
      ],
      "value": "GET /api/links/:code/stats",
      "status": "yes",
      "note": ""
    },
    {
      "path": [
        "AI",
        "Ops",
        "Persistence"
      ],
      "value": "",
      "status": "yes",
      "note": "links survive restart"
    },
    {
      "path": [
        "AI",
        "Ops",
        "Rate limiting"
      ],
      "value": "",
      "status": "yes",
      "note": "on shorten endpoint"
    },
    {
      "path": [
        "AI",
        "Ops",
        "Health endpoint"
      ],
      "value": "GET /healthz",
      "status": "yes",
      "note": ""
    },
    {
      "path": [
        "UI",
        "Shorten form",
        "Paste URL, get short link"
      ],
      "value": "",
      "status": "yes",
      "note": "with copy-to-clipboard"
    },
    {
      "path": [
        "UI",
        "Shorten form",
        "Inline validation errors"
      ],
      "value": "",
      "status": "yes",
      "note": ""
    },
    {
      "path": [
        "UI",
        "Links page",
        "List with clicks and created date"
      ],
      "value": "",
      "status": "yes",
      "note": ""
    },
    {
      "path": [
        "UI",
        "Links page",
        "Per-link stats view"
      ],
      "value": "",
      "status": "yes",
      "note": "clicks over time"
    }
  ]
}
