# app.citylore.defs

> Shared definitions for CityLore tours.

- Kind: defs
- Authority: citylore.app
- Lexicon: 1
- Published by [citylore.app](https://lexicon.garden/identity/did:plc:yyhpdzesw2vzyuptd54i26dj), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:yyhpdzesw2vzyuptd54i26dj/app.citylore.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yyhpdzesw2vzyuptd54i26dj/app.citylore.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yyhpdzesw2vzyuptd54i26dj/app.citylore.defs/analytics)

## #aspectRatio (`app.citylore.defs#aspectRatio`)

Type: object

### Properties

- `height` (integer, required)
  - Constraints: minimum: 1
- `width` (integer, required)
  - Constraints: minimum: 1

## #clue (`app.citylore.defs#clue`)

Type: object

### Properties

- `hints` (array): Shown one at a time, the most helpful last.
  - Constraints: maxLength: 3
  - `items` (string)
    - Constraints: maxLength: 5000, maxGraphemes: 500
- `onSite` (ref)
  - Reference: `#onSiteQuestion`
- `riddle` (string, required)
  - Constraints: maxLength: 10000, maxGraphemes: 1000

## #customPoint (`app.citylore.defs#customPoint`)

Type: object

A point that is not a known place, e.g. a meeting point or a hiding spot.

### Properties

- `location` (ref, required)
  - Reference: `community.lexicon.location.geo`
- `name` (string, required)
  - Constraints: maxLength: 1280, maxGraphemes: 128

## #image (`app.citylore.defs#image`)

Type: object

### Properties

- `alt` (string, required)
  - Constraints: maxLength: 10000, maxGraphemes: 1000
- `aspectRatio` (ref)
  - Reference: `#aspectRatio`
- `credit` (string): Who made the image and under which licence, e.g. for Wikimedia Commons images.
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `image` (blob, required)
  - Constraints: maxSize: 2000000, accept: image/png, image/jpeg, image/webp

## #onSiteQuestion (`app.citylore.defs#onSiteQuestion`)

Type: object

A question only someone standing at the stop can answer.

### Properties

- `answer` (string, required)
  - Constraints: maxLength: 5000, maxGraphemes: 500
- `question` (string, required)
  - Constraints: maxLength: 5000, maxGraphemes: 500
- `verifiedAt` (string · datetime): When the creator checked the answer on site. Apps don't ask unchecked questions.

## #place (`app.citylore.defs#place`)

Type: object

A snapshot of a known place, with the same field names as social.eurosky.place.pin's place (a subset of org.atgeo.place), so a stop can become a pin without conversion.

### Properties

- `category` (string): A coarse kind, for map icons and filters.
  - Constraints: maxLength: 64, knownValues: transit | lodging | food_drink | culture | nature | sights | shopping | services | other
- `kind` (string): The source's own category, e.g. Mural, Mosque or the OpenStreetMap tag historic=memorial. Decides quiet stops.
  - Constraints: maxLength: 128
- `locations` (array, required): Where the place is: at least one community.lexicon.location.geo point.
  - Constraints: minLength: 1, maxLength: 3
  - `items` (union)
    - One of: `community.lexicon.location.geo`, `community.lexicon.location.address`, `community.lexicon.location.hthree`
- `name` (string, required): The place's name when the stop was made.
  - Constraints: maxLength: 1280, maxGraphemes: 128
- `origin` (string · uri): The place's identity: an ATGeo URN, urn:atgeo:{dataset}:{collection}:{id}, from the source whose IDs last longest (foursquare.com, then openstreetmap.org, then overturemaps.org).
  - Constraints: maxLength: 512
- `relations` (ref)
  - Reference: `#relations`

## #provenance (`app.citylore.defs#provenance`)

Type: object

How the tour was made. Machine-readable; walkers see no badge.

### Properties

- `aiDrafted` (boolean, required): Whether an AI drafted any part of the tour. A person reviewed and published it either way.
- `draftedAt` (string · datetime)
- `model` (string): The drafting model, e.g. claude-sonnet-5-5.
  - Constraints: maxLength: 128

## #relation (`app.citylore.defs#relation`)

Type: object

A reference to a place, as in org.atgeo.place.

### Properties

- `name` (string)
  - Constraints: maxLength: 1280, maxGraphemes: 128
- `type` (string)
  - Constraints: maxLength: 64
- `uri` (string · uri, required)
  - Constraints: maxLength: 512

## #relations (`app.citylore.defs#relations`)

Type: object

Related places, as in org.atgeo.place.

### Properties

- `sameAs` (array): The same place's IDs in other sources.
  - Constraints: maxLength: 6
  - `items` (ref)
    - Reference: `#relation`
- `within` (array): Areas that contain the place, broadest first.
  - Constraints: maxLength: 8
  - `items` (ref)
    - Reference: `#relation`

## #route (`app.citylore.defs#route`)

Type: object

### Properties

- `polyline` (string, required): The walking route as an encoded polyline (precision 5), from the first stop to the last, and back to the first in a loop.
  - Constraints: maxLength: 100000
- `source` (string, required): router: from a walking router. straight: straight lines between the stops.
  - Constraints: maxLength: 32, knownValues: router | straight

## #source (`app.citylore.defs#source`)

Type: object

### Properties

- `title` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `uri` (string · uri, required)
  - Constraints: maxLength: 2048

## #stop (`app.citylore.defs#stop`)

Type: object

One stop of a tour: a place, its story, and what plays or happens there.

### Properties

- `clue` (ref): The riddle that leads the walker to this stop (the hunt layer). Absent on the first stop, which hunts show openly.
  - Reference: `#clue`
- `id` (string, required): Stable within the tour, so ratings and progress can point at a stop after stops are reordered. Short and opaque, e.g. a TID.
  - Constraints: maxLength: 32
- `images` (array)
  - Constraints: maxLength: 4
  - `items` (ref)
    - Reference: `#image`
- `minutes` (integer): Planned minutes at the stop, when they differ from the default (4, or 6 in hunts).
  - Constraints: minimum: 1, maximum: 60
- `narrationToNext` (string): Narration for the walk from this stop to the next one (the narrated layer). On the last stop only in a loop, for the walk back to the first.
  - Constraints: maxLength: 30000, maxGraphemes: 3000
- `place` (union, required)
  - One of: `#place`, `#customPoint`
- `pov` (string): One line shown under the stop's title, taken from the story.
  - Constraints: maxLength: 1400, maxGraphemes: 140
- `quiet` (boolean): Present the stop quietly: no stickers, jokes or hunt games. Absent: decided from the place. Places of remembrance (persecution, war graves, cemeteries) are always quiet; other memorials and places of worship are quiet unless this is false.
- `sources` (array): Where the story's facts come from.
  - Constraints: maxLength: 10
  - `items` (ref)
    - Reference: `#source`
- `story` (string, required): What the walker reads or hears at the stop.
  - Constraints: maxLength: 60000, maxGraphemes: 6000
- `title` (string): The stop's name as walkers see it, when it differs from the place's name (e.g. a translation).
  - Constraints: maxLength: 1280, maxGraphemes: 128

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "aspectRatio": {
      "properties": {
        "height": {
          "minimum": 1,
          "type": "integer"
        },
        "width": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "width",
        "height"
      ],
      "type": "object"
    },
    "clue": {
      "properties": {
        "hints": {
          "description": "Shown one at a time, the most helpful last.",
          "items": {
            "maxGraphemes": 500,
            "maxLength": 5000,
            "type": "string"
          },
          "maxLength": 3,
          "type": "array"
        },
        "onSite": {
          "ref": "#onSiteQuestion",
          "type": "ref"
        },
        "riddle": {
          "maxGraphemes": 1000,
          "maxLength": 10000,
          "type": "string"
        }
      },
      "required": [
        "riddle"
      ],
      "type": "object"
    },
    "customPoint": {
      "description": "A point that is not a known place, e.g. a meeting point or a hiding spot.",
      "properties": {
        "location": {
          "ref": "community.lexicon.location.geo",
          "type": "ref"
        },
        "name": {
          "maxGraphemes": 128,
          "maxLength": 1280,
          "type": "string"
        }
      },
      "required": [
        "name",
        "location"
      ],
      "type": "object"
    },
    "image": {
      "properties": {
        "alt": {
          "maxGraphemes": 1000,
          "maxLength": 10000,
          "type": "string"
        },
        "aspectRatio": {
          "ref": "#aspectRatio",
          "type": "ref"
        },
        "credit": {
          "description": "Who made the image and under which licence, e.g. for Wikimedia Commons images.",
          "maxGraphemes": 300,
          "maxLength": 3000,
          "type": "string"
        },
        "image": {
          "accept": [
            "image/png",
            "image/jpeg",
            "image/webp"
          ],
          "maxSize": 2000000,
          "type": "blob"
        }
      },
      "required": [
        "image",
        "alt"
      ],
      "type": "object"
    },
    "onSiteQuestion": {
      "description": "A question only someone standing at the stop can answer.",
      "properties": {
        "answer": {
          "maxGraphemes": 500,
          "maxLength": 5000,
          "type": "string"
        },
        "question": {
          "maxGraphemes": 500,
          "maxLength": 5000,
          "type": "string"
        },
        "verifiedAt": {
          "description": "When the creator checked the answer on site. Apps don't ask unchecked questions.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "question",
        "answer"
      ],
      "type": "object"
    },
    "place": {
      "description": "A snapshot of a known place, with the same field names as social.eurosky.place.pin's place (a subset of org.atgeo.place), so a stop can become a pin without conversion.",
      "properties": {
        "category": {
          "description": "A coarse kind, for map icons and filters.",
          "knownValues": [
            "transit",
            "lodging",
            "food_drink",
            "culture",
            "nature",
            "sights",
            "shopping",
            "services",
            "other"
          ],
          "maxLength": 64,
          "type": "string"
        },
        "kind": {
          "description": "The source's own category, e.g. Mural, Mosque or the OpenStreetMap tag historic=memorial. Decides quiet stops.",
          "maxLength": 128,
          "type": "string"
        },
        "locations": {
          "description": "Where the place is: at least one community.lexicon.location.geo point.",
          "items": {
            "refs": [
              "community.lexicon.location.geo",
              "community.lexicon.location.address",
              "community.lexicon.location.hthree"
            ],
            "type": "union"
          },
          "maxLength": 3,
          "minLength": 1,
          "type": "array"
        },
        "name": {
          "description": "The place's name when the stop was made.",
          "maxGraphemes": 128,
          "maxLength": 1280,
          "type": "string"
        },
        "origin": {
          "description": "The place's identity: an ATGeo URN, urn:atgeo:{dataset}:{collection}:{id}, from the source whose IDs last longest (foursquare.com, then openstreetmap.org, then overturemaps.org).",
          "format": "uri",
          "maxLength": 512,
          "type": "string"
        },
        "relations": {
          "ref": "#relations",
          "type": "ref"
        }
      },
      "required": [
        "name",
        "locations"
      ],
      "type": "object"
    },
    "provenance": {
      "description": "How the tour was made. Machine-readable; walkers see no badge.",
      "properties": {
        "aiDrafted": {
          "description": "Whether an AI drafted any part of the tour. A person reviewed and published it either way.",
          "type": "boolean"
        },
        "draftedAt": {
          "format": "datetime",
          "type": "string"
        },
        "model": {
          "description": "The drafting model, e.g. claude-sonnet-5-5.",
          "maxLength": 128,
          "type": "string"
        }
      },
      "required": [
        "aiDrafted"
      ],
      "type": "object"
    },
    "relation": {
      "description": "A reference to a place, as in org.atgeo.place.",
      "properties": {
        "name": {
          "maxGraphemes": 128,
          "maxLength": 1280,
          "type": "string"
        },
        "type": {
          "maxLength": 64,
          "type": "string"
        },
        "uri": {
          "format": "uri",
          "maxLength": 512,
          "type": "string"
        }
      },
      "required": [
        "uri"
      ],
      "type": "object"
    },
    "relations": {
      "description": "Related places, as in org.atgeo.place.",
      "properties": {
        "sameAs": {
          "description": "The same place's IDs in other sources.",
          "items": {
            "ref": "#relation",
            "type": "ref"
          },
          "maxLength": 6,
          "type": "array"
        },
        "within": {
          "description": "Areas that contain the place, broadest first.",
          "items": {
            "ref": "#relation",
            "type": "ref"
          },
          "maxLength": 8,
          "type": "array"
        }
      },
      "type": "object"
    },
    "route": {
      "properties": {
        "polyline": {
          "description": "The walking route as an encoded polyline (precision 5), from the first stop to the last, and back to the first in a loop.",
          "maxLength": 100000,
          "type": "string"
        },
        "source": {
          "description": "router: from a walking router. straight: straight lines between the stops.",
          "knownValues": [
            "router",
            "straight"
          ],
          "maxLength": 32,
          "type": "string"
        }
      },
      "required": [
        "polyline",
        "source"
      ],
      "type": "object"
    },
    "source": {
      "properties": {
        "title": {
          "maxGraphemes": 300,
          "maxLength": 3000,
          "type": "string"
        },
        "uri": {
          "format": "uri",
          "maxLength": 2048,
          "type": "string"
        }
      },
      "required": [
        "uri"
      ],
      "type": "object"
    },
    "stop": {
      "description": "One stop of a tour: a place, its story, and what plays or happens there.",
      "properties": {
        "clue": {
          "description": "The riddle that leads the walker to this stop (the hunt layer). Absent on the first stop, which hunts show openly.",
          "ref": "#clue",
          "type": "ref"
        },
        "id": {
          "description": "Stable within the tour, so ratings and progress can point at a stop after stops are reordered. Short and opaque, e.g. a TID.",
          "maxLength": 32,
          "type": "string"
        },
        "images": {
          "items": {
            "ref": "#image",
            "type": "ref"
          },
          "maxLength": 4,
          "type": "array"
        },
        "minutes": {
          "description": "Planned minutes at the stop, when they differ from the default (4, or 6 in hunts).",
          "maximum": 60,
          "minimum": 1,
          "type": "integer"
        },
        "narrationToNext": {
          "description": "Narration for the walk from this stop to the next one (the narrated layer). On the last stop only in a loop, for the walk back to the first.",
          "maxGraphemes": 3000,
          "maxLength": 30000,
          "type": "string"
        },
        "place": {
          "refs": [
            "#place",
            "#customPoint"
          ],
          "type": "union"
        },
        "pov": {
          "description": "One line shown under the stop's title, taken from the story.",
          "maxGraphemes": 140,
          "maxLength": 1400,
          "type": "string"
        },
        "quiet": {
          "description": "Present the stop quietly: no stickers, jokes or hunt games. Absent: decided from the place. Places of remembrance (persecution, war graves, cemeteries) are always quiet; other memorials and places of worship are quiet unless this is false.",
          "type": "boolean"
        },
        "sources": {
          "description": "Where the story's facts come from.",
          "items": {
            "ref": "#source",
            "type": "ref"
          },
          "maxLength": 10,
          "type": "array"
        },
        "story": {
          "description": "What the walker reads or hears at the stop.",
          "maxGraphemes": 6000,
          "maxLength": 60000,
          "type": "string"
        },
        "title": {
          "description": "The stop's name as walkers see it, when it differs from the place's name (e.g. a translation).",
          "maxGraphemes": 128,
          "maxLength": 1280,
          "type": "string"
        }
      },
      "required": [
        "id",
        "place",
        "story"
      ],
      "type": "object"
    }
  },
  "description": "Shared definitions for CityLore tours.",
  "id": "app.citylore.defs",
  "lexicon": 1
}
```
