Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jacobsamo/buzztrip/llms.txt

Use this file to discover all available pages before exploring further.

BuzzTrip uses Convex as its database. All tables are defined in packages/backend/convex/schema.ts using Zod schemas converted to Convex validators via zodToConvex. Every document automatically receives _id (a unique Id<tableName>) and _creationTime (Unix timestamp in milliseconds).

Common Fields

Every Convex document includes these system fields automatically:
FieldTypeDescription
_idId<tableName>Unique document identifier
_creationTimenumberCreation timestamp (Unix ms)

Tables

maps

The top-level container for a BuzzTrip map project.
FieldTypeRequiredDescription
titlestringMap display name
descriptionstringOptional description
imagestringCover image URL
iconIconType | string | nullEmoji or icon identifier (nullish)
colorstringHex color string
owner_idId<'users'>The user who owns the map
location_namestringHuman-readable starting location (e.g. “Brisbane, Australia”)
latnumberStarting latitude
lngnumberStarting longitude
bounds{east, north, south, west, offset?}Map viewport bounds (nullish)
visibility'private' | 'public' | 'unlisted'Access control
mapTypeId'hybrid' | 'roadmap' | 'satellite' | 'terrain'Map tile style
updatedAtstring (ISO datetime)Last update timestamp
Indexes: by_visibility

mapViews

Analytics tracking for map page views. All geo and device fields are optional.
FieldTypeRequiredDescription
mapIdId<'maps'>The viewed map
userIdId<'users'>Viewer (if authenticated)
ipstringViewer IP address
countrystringCountry from geo headers
regionstringRegion/state
citystringCity
userAgentstringBrowser user agent
osstringOperating system
browserstringBrowser name
devicestringDevice type
Indexes: by_map_id, by_user_id

map_users

Links users to maps with a permission role.
FieldTypeRequiredDescription
map_idId<'maps'>The map
user_idId<'users'>The user
permission'owner' | 'editor' | 'viewer' | 'commenter'Role (default: editor)
Indexes: by_map_id, by_user_id

markers

Individual pinned locations on a map.
FieldTypeRequiredDescription
titlestringMarker label
notestringAdditional notes
latnumberLatitude
lngnumberLongitude
created_byId<'users'>Creator
iconIconType | stringIcon identifier
colorstringHex color string
place_idId<'places'>Linked place record
map_idId<'maps'>Parent map
updatedAtstringLast update timestamp
Indexes: by_map_id, by_place_id

collections

Named groups for organizing markers.
FieldTypeRequiredDescription
map_idId<'maps'>Parent map
titlestringCollection name
descriptionstringOptional description
created_byId<'users'>Creator
iconIconType | stringIcon identifier
colorstringHex color string
updatedAtstringLast update timestamp
Indexes: by_map_id
Many-to-many join between markers and collections.
FieldTypeDescription
collection_idId<'collections'>The collection
marker_idId<'markers'>The marker
map_idId<'maps'>Denormalized map reference
user_idId<'users'>User who created the link
Indexes: by_map_id, by_collection_id

labels

Descriptive map overlays with icons and colors.
FieldTypeRequiredDescription
map_idId<'maps'>Parent map
titlestringLabel text
descriptionstringDescription
iconIconType | string | nullIcon identifier (nullish)
colorstringHex color
created_byId<'users'>Creator
updatedAtstringLast update timestamp
Either icon or color (or both) must be provided. The schema enforces this via Zod .refine().
Indexes: by_map_id

paths

Geometric shapes drawn on the map.
FieldTypeRequiredDescription
mapIdId<'maps'>Parent map
pathType'text' | 'circle' | 'rectangle' | 'polygon' | 'line'Shape type
titlestringShape label
notestringNotes
pointsPosition | Position[] | Position[][]Coordinate data
measurementsMeasurementsCalculated dimensions
stylesPathStyleVisual styling
createdById<'users'>Creator
updatedAtstringLast update timestamp
Where Position = [number, number] | [number, number, number] (longitude, latitude, optional altitude). Indexes: byMapId

routes

Multi-stop routes on a map.
FieldTypeRequiredDescription
map_idId<'maps'>Parent map
namestringRoute name
descriptionstringDescription
travel_type'driving' | 'walking' | 'transit' | 'bicycling'Travel mode
user_idId<'users'>Creator
updatedAtstringLast update timestamp
Indexes: by_map_id

route_stops

Individual stops within a route, ordered by stop_order.
FieldTypeRequiredDescription
map_idId<'maps'>Parent map
route_idId<'routes'>Parent route
marker_idId<'markers'>Stop location marker
user_idId<'users'>Creator
latnumberLatitude
lngnumberLongitude
stop_ordernumberPosition in route sequence
updatedAtstringLast update timestamp
Indexes: by_map_id

places

Canonical location data shared across markers.
FieldTypeRequiredDescription
titlestringPlace name
descriptionstringDescription
latnumberLatitude
lngnumberLongitude
bounds{east, north, south, west} | {lat, lng}Bounding box
addressstringStreet address
gm_place_idstringGoogle Maps place ID
mb_place_idstringMapbox place ID
fq_place_idstringFoursquare place ID
plus_codestringOpen Location Code (auto-generated)
what3wordsstringwhat3words address
iconIconType | stringIcon derived from POI type
photosstring[] | nullPhoto URLs (nullish)
ratingnumberAverage rating
typesstring[] | nullPOI category tags (nullish)
websitestringWebsite URL
phonestringPhone number
Indexes: gm_place_id_ixd, mb_place_id_ixd, fq_place_id_ixd, places_lat_idx, places_lng_idx, by_place_lat_lng (compound), places_address_idx

places_reviews

User-submitted reviews for places.
FieldTypeDescription
place_idId<'places'>The reviewed place
user_idId<'users'>Reviewer
author_namestringDisplay name
author_urlstring | nullProfile URL
profile_photo_urlstringAvatar URL
ratingnumber | nullStar rating
descriptionstringReview text

place_photos

User-uploaded photos linked to places.
FieldTypeDescription
place_idId<'places'>The place
user_idId<'users'>Uploader
photo_urlstringPhoto URL
widthnumberImage width (px)
heightnumberImage height (px)
captionstringPhoto caption

users

BuzzTrip user profiles, synced from Clerk via webhook.
FieldTypeRequiredDescription
clerkUserIdstringClerk user ID
namestringFull name
emailstringEmail address
imagestringAvatar URL
updatedAtstringLast sync timestamp
createdAtstringAccount creation timestamp
first_namestringFirst name
last_namestringLast name
usernamestringUsername
biostringProfile bio
isBetaUserbooleanBeta program access flag
Indexes: by_email, by_clerk_id, by_isBetaUser Search index: search_user — full-text search on name, filterable by email and username

beta_users

Beta program sign-up tracking. Stores the entire signup flow state, from initial email confirmation through questionnaire completion.
FieldTypeRequiredDescription
emailstringEmail address
firstNamestringFirst name
lastNamestring | nullLast name (nullish)
tokenstringUnique verification token
expiresAtnumberToken expiry (Unix ms)
emailConfirmedbooleanWhether email has been confirmed
emailConfirmedAtnumberTimestamp of email confirmation (Unix ms)
questionnaireCompletedbooleanWhether the onboarding questionnaire is done
questionnaireCompletedAtnumberTimestamp of questionnaire completion (Unix ms)
whatsappOptInbooleanWhatsApp notification opt-in
questionnaireResponsesRecord<string, any>Raw questionnaire answers
userIdId<'users'> | nullLinked user account once verified (nullish)
createdAtnumberRecord creation timestamp (Unix ms)
updatedAtnumberLast update timestamp (Unix ms)
Indexes: by_email, by_token, by_user_id

TypeScript Types

Import types from @buzztrip/backend/types:
import type {
  Map, NewMap,
  Marker, NewMarker, CombinedMarker,
  Place, NewPlace,
  Collection, NewCollection,
  CollectionLink, NewCollectionLink,
  MapUser, NewMapUser, CombinedMapUser, ShareMapUser, UserMap,
  Label, NewLabel,
  Route, NewRoute,
  RouteStop, NewRouteStop,
  Path, NewPath,
  Bounds,
  Review,
  RefinedUser,
  PermissionEnum,           // 'owner' | 'editor' | 'viewer' | 'commenter'
  TravelTypeEnum,           // 'driving' | 'walking' | 'transit' | 'bicycling'
  MapTypeId,                // 'hybrid' | 'roadmap' | 'satellite' | 'terrain'
  Measurements,
  CircleMeasurements,
  RectangleMeasurements,
  LineMeasurements,
  PolygonMeasurements,
  PathStyle,
} from '@buzztrip/backend/types';
Import Convex document types from @buzztrip/backend/dataModel:
import type { Doc, Id } from '@buzztrip/backend/dataModel';

// Full document type with _id and _creationTime
type MapDoc = Doc<'maps'>;
type MarkerId = Id<'markers'>;
New* types (e.g. NewMap, NewMarker) are insert schemas with system fields (_id, _creationTime) stripped. Use them when constructing objects to pass to Convex mutations.

Build docs developers (and LLMs) love