← All projects

CSUS-Trees

Live

A crowd-sourced map of the trees on the Sacramento State campus. Anyone can browse it; signed-in visitors add trees by the number on their tag, and the map combines everyone's entries.

Documentation last updated November 20, 2026

  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • Supabase
  • PostgreSQL
  • MapLibre GL JS
  • OpenFreeMap

CSUS-Trees is a crowd-sourced map of the trees on the Sacramento State campus. Many campus trees have a small numbered tag nailed to the trunk. Anyone can open the map and browse the trees that have been added so far, tap a tree to see its number, species, sex and coordinates, and see where they are standing on campus.

To add a tree, a signed-in visitor stands next to it with their phone, taps Add a tree, types the number from the tag and, if they know it, searches for the species. For species whose trees are either male or female, they can also record the tree's sex; species with both sexes on every tree are filled in as Both automatically. Tucked away at the bottom of the form is a just-for-fun climbability rating from 0 ("Don't even think about it") to 10 ("Basically a ladder"), added by popular vote on Reddit; the map shows each tree's average. It's a joke: please don't actually climb campus trees. The phone's GPS records where the tree is. Each person can add one entry per tree number and can update or remove their own entries.

The map does not trust any single entry. Every tree on the map is calculated from all of the entries for its number: the location is the median of everyone's readings, with readings far from the rest set aside once there are enough of them, the species is the one named most often, and the sex is the one named most often among entries that agree on the species. The calculation runs in the database every time an entry is added, changed or removed, so the map always reflects everyone's latest input. An entry that lands far from where a tree is already mapped is checked with a quick "Is this really the tree you meant?" question, which catches mistyped numbers.

The project is built with Next.js, React and TypeScript, styled with Tailwind CSS, and hosted on Netlify. Sign-in uses Google through Supabase, and the entries are stored in Supabase's PostgreSQL database, where row level security keeps each person's entries private and database triggers recalculate the map. The map is drawn with MapLibre GL JS using free OpenStreetMap-based tiles from OpenFreeMap, with nearby trees grouped into clusters until you zoom in. The species search covers about 335 trees found in the Sacramento area and matches common or scientific names as you type.