{
  "lexicon": 1,
  "id": "net.bisks.witness.entry",
  "defs": {
    "main": {
      "type": "record",
      "description": "One entry on witness (witness.bisks.net), a plain-HTML public ledger for things a community wants on the record — a food-pantry receipt, a pothole complaint, whatever else. Any atproto account may write one; the site reads the network for every repo holding this collection (com.atproto.sync.listReposByCollection + Jetstream) and folds them into one public, no-login feed. `sourceUrl` links the original document wherever it's actually hosted (a mirror, a co-op server, anywhere but here); `photo` is an optional direct upload to the poster's own PDS for when there's nowhere else convenient to host a scan. Written and read by witness (https://witness.bisks.net).",
      "key": "tid",
      "record": {
        "type": "object",
        "required": ["category", "title", "createdAt"],
        "properties": {
          "category": {
            "type": "string",
            "enum": ["receipt", "pothole", "other"],
            "description": "What kind of thing is being witnessed. \"receipt\" for spending/financial records, \"pothole\" for a civic infrastructure complaint (tallied by location so repeat reports of the same spot count up), \"other\" for anything else worth a paper trail."
          },
          "title": {
            "type": "string",
            "maxLength": 300,
            "maxGraphemes": 140,
            "description": "A short, plain-language summary — what this is, in one line."
          },
          "body": {
            "type": "string",
            "maxLength": 3000,
            "description": "Optional longer description: what happened, what it shows, why it matters."
          },
          "amount": {
            "type": "string",
            "maxLength": 40,
            "description": "Optional free-text amount, mainly for a receipt (e.g. \"$42.17\"). Free text, not a parsed number, so any currency or notation works."
          },
          "location": {
            "type": "string",
            "maxLength": 200,
            "description": "Optional free-text location — an address, cross streets, or landmark. Mainly for a pothole report: entries whose location text matches (after trimming case/punctuation) are tallied together as repeat reports of the same spot."
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "description": "Optional link to the original document — a scanned receipt, a photo, a PDF — hosted wherever the poster already has it. This site never mirrors or re-hosts it."
          },
          "photo": {
            "type": "blob",
            "accept": ["image/*"],
            "description": "Optional photo of the receipt, the pothole, or the document itself, uploaded straight to the poster's own PDS via com.atproto.repo.uploadBlob when there's nowhere else convenient to host it."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this entry was recorded, as an ISO 8601 datetime."
          }
        }
      }
    }
  }
}
