How aj-omnimatrix/gazetteer-demo works
Gazetteer is a personal travel catalogue: visitors discover curated places, search or filter them, and—after signing in—save visits and review travel statistics. The main runtime path runs from catalogue views through client data/mutations and server actions to the database abstraction, with seeded in-memory data as a documented fallback. The graph also preserves authentication, location-of-the-day, nearby lookup, directions, and the place-authoring capability. Some links are documented but their implementation was not sampled, so those links are dashed and marked unverified.
Main entry points: ExploreView.tsx Explore view · ListView.tsx Travel list · auth.ts Identity and sessions · actions.ts Server actions
Components 23
Place discovery
- Explore page
app/explore/page.tsx - Explore view
components/ExploreView.tsx - Featured page
app/page.tsx - Featured view
components/LotdView.tsx
Travel records
- Visit control
components/VisitStatusButton.tsx - Travel list page
app/list/page.tsx - Travel list
components/ListView.tsx - Travel statistics
lib/ads/segment-tree.ts
Application services
- Catalog client
hooks/use-catalog.ts - Prefix search
lib/ads/trie.ts - Nearby lookup
lib/ads/kd-tree.ts - Sign-in dialog
components/AuthDialog.tsx - Identity and sessions
lib/auth.ts - Server actions
app/actions.ts - Catalog endpoint
app/api/catalog/route.ts
Catalogue data
- Catalog queries
db/queries.ts - SQL connection
db/index.ts - Memory fallback
db/memory.ts - Curated places
db/seed-data.ts - Place authoring
db/add-location.ts - Photo processing
lib/image-search.ts
Other components
- Traveler
- Google Maps
Connections 30
- Traveler → Explore page: opens
- Explore page → Explore view: renders
app/explore/page.tsx - Traveler → Featured page: opens
- Featured page → Featured view: renders
app/page.tsx - Explore view → Catalog client: loads catalog
components/ExploreView.tsx - Featured view → Catalog client: loads catalog
components/LotdView.tsx - Explore view → Prefix search: searches
components/ExploreView.tsx - Traveler → Nearby lookup: requests nearby
- Explore view → Visit control: renders
components/ExploreView.tsx - Featured view → Visit control: renders
components/LotdView.tsx - Traveler → Travel list page: opens
- Travel list page → Travel list: renders
app/list/page.tsx - Travel list → Catalog client: loads catalog
components/ListView.tsx - Travel list → Prefix search: searches
components/ListView.tsx - Travel list → Travel statistics: calculates stats
components/ListView.tsx - Traveler → Sign-in dialog: signs in
components/AuthDialog.tsx - Sign-in dialog → Server actions: submits identity
components/AuthDialog.tsx - Catalog client → Server actions: records visits
hooks/use-catalog.ts - Server actions → Identity and sessions: checks session
app/actions.ts - Identity and sessions → SQL connection: uses SQL
lib/auth.ts - Identity and sessions → Memory fallback: uses fallback
lib/auth.ts - Server actions → Catalog queries: updates visits
app/actions.ts - Catalog endpoint → Identity and sessions: gets session
app/api/catalog/route.ts - Catalog endpoint → Catalog queries: loads catalog
app/api/catalog/route.ts - Catalog queries → SQL connection: queries SQL
db/queries.ts - Catalog queries → Memory fallback: uses fallback
db/queries.ts - Memory fallback → Curated places: initializes from
db/memory.ts - Traveler → Google Maps: opens directions
- Place authoring → Photo processing: processes photos
db/add-location.ts - Place authoring → Curated places: updates entries
db/add-location.ts