Skip to content

Database and API

Alex Secor edited this page Dec 5, 2025 · 1 revision

Database & API

This page documents the database schema and external API integrations.

Database Schema

Users Table

  • id
  • username
  • password_hash
  • email
  • created_at

Locations Table

  • id
  • name
  • lat
  • lon
  • description
  • created_by

Reviews Table

  • id
  • user_id
  • location_id
  • rating
  • comment
  • created_at

Comments Table

  • id
  • user_id
  • review_id
  • content
  • created_at

Foreign keys enforce relational integrity and cascade deletes.

External APIs

Nominatim API

Used for:

  • Geocoding
  • Forward/Reverse address lookup
  • Search queries

MapLibre GL JS

Used for:

  • Map rendering
  • Marker generation
  • Displaying user-submitted locations

Clone this wiki locally