Chat
About Origins
Origins
A map-first chat application powered by AWS Nova. Ask in chat; the map responds with movement, outlines, routes, and overlays.
Contents
Overview How It Works Features Map Tools APIs Used AWS Nova Integration Session + Privacy Example Prompts Limits + Reliability
Overview
Origins lets you interact with the world map using plain language. The assistant can answer questions, and when a map action is needed it will produce a structured tool payload that the app executes.

How It Works (Chat → Tools → Map)

The assistant can respond in normal text, or it can request one map action per turn using a payload like <tool>{"name":"boundary","location":"Japan","level":"ADM0"}</tool>. The frontend detects this tag, parses the JSON, runs the corresponding map function (Leaflet), and then prints a short system result back into the chat (for transparency).


Features

  • World map UI: Leaflet map with a dark basemap and a Topo toggle.
  • Chat-driven map control: locations, outlines, routes, and overlays from chat prompts.
  • Search Places: plot multiple points-of-interest (hotels, parks, fuel, etc.).
  • Routes + interval markers: tracklines with time-based drop points based on speed.
  • Info overlays: earthquakes, nearby Wikipedia landmarks, ISS position, air quality, elevation, local time.
  • Clear map: remove markers/overlays quickly.

Map Tools (What the assistant can trigger)

  • move: pan/zoom to a specific place.
  • boundary: outline borders: ADM0 (country), ADM1 (state/province), CITY (city limit when available).
  • street: highlight a named road near a location.
  • route: draw a trackline between two locations.
  • route_intervals: drop markers every N hours at a given speed.
  • distance: compute miles/km for the last route or specific endpoints.
  • search: plot multiple POIs using OpenStreetMap tags (example: tourism=hotel).
  • weather/wiki/quakes/iss/aqi/elevation/time: fetch public data and show on-map popups/markers.
  • clear: remove overlays and markers.

APIs Used

Origins uses public and free endpoints to enrich the map experience:

  • OpenStreetMap Nominatim: geocoding and many boundary polygons.
  • OpenStreetMap Overpass: POI search and street geometry.
  • Open-Meteo: weather, air quality, elevation.
  • Wikipedia API: nearby landmarks and article links.
  • USGS: earthquake GeoJSON feed.
  • wheretheiss.at: ISS real-time location.
  • timeapi.io: local time by coordinate.

AWS Nova Integration

The frontend sends your current in-session conversation to the backend chat endpoint. The backend runs on AWS Lambda behind API Gateway, and it calls AWS Nova to generate a response. Tool instructions are embedded in the system prompt so Nova knows how to produce the map tool payloads safely and consistently.

When Nova returns a tool payload, the frontend executes it locally (in your browser) using Leaflet and public APIs, keeping the map interaction fast and visually responsive.


Session + Privacy

  • No persistence on refresh: chat context is kept in memory during the session; refreshing clears it.
  • Map context: the app can add lightweight context (current map view/layer) to improve location resolution.
  • Third-party calls: map tools query public APIs when needed for geocoding, borders, roads, and data overlays.

Example Prompts

  • outline japan
  • outline florida, usa
  • highlight Main Street near Miami
  • plot a route from Nairobi to Nakuru
  • drop markers every 2 hours at 75 mph from Nairobi to Nakuru
  • find hotels near North Miami Beach
  • show recent earthquakes

Limits + Reliability Notes

  • Ambiguous place names: if a name exists in many countries, zoom near the intended region first.
  • OpenStreetMap coverage: POI and boundary detail varies by region.
  • Public API rate limits: some sources may throttle during heavy traffic.
Tip: the fastest workflow is “ask → see map update → refine”. The assistant is most accurate when your request includes a nearby city/state/country.