pro-tree

Page Flow / Route Map

Public Routes (no auth)

Route Purpose
GET /tree/{id} Tree Information Page — main entry point from QR code
POST /tree/{id}/interest Submit “I’m Interested” email form (AJAX or full form post)
GET /tree/{id}/prev Redirects to the previous tree’s info page by display_order
GET /tree/{id}/next Redirects to the next tree’s info page by display_order

Admin Routes (session auth required)

Route Purpose
GET /admin/login Admin login form
POST /admin/login Authenticate
POST /admin/logout End admin session
GET /admin/trees List all trees (searchable by species/zone/label/Tree ID; shows display order, zone, species, status, active)
GET /admin/trees/new / POST /admin/trees Create a tree (choose species + zone, set label/status/image/order/location)
GET /admin/trees/{id}/edit / POST /admin/trees/{id} Edit a tree
POST /admin/trees/{id}/delete Remove/deactivate a tree
GET /admin/zones List zones
GET /admin/zones/new / POST /admin/zones Create a zone
GET /admin/zones/{id}/edit / POST /admin/zones/{id} Edit a zone
POST /admin/zones/{id}/delete Delete a zone (blocked while any tree still references it)
GET /admin/species List species
GET /admin/species/new / POST /admin/species Create a species (name, classification, care instructions, characteristics/properties/benefits/cautions/part uses)
GET /admin/species/{id}/edit / POST /admin/species/{id} Edit a species — updates every tree of that species at once
POST /admin/species/{id}/delete Delete a species (blocked while any tree still references it)
GET /admin/settings Configure default map image/URL
POST /admin/settings Save map settings
GET /admin/reports View scan/visitor/interest stats, export CSV

Tree Information Page — Layout

┌───────────────────────────────────────────────┐
│  MAP BANNER IMAGE (clickable → map_url)        │
├───────────────────────────────────────────────┤
│  [ Tree / Plant Image ]                        │
│                                                 │
│  Name                                          │
│  Scientific name · Common name                 │
│  Category · Classification ID · Plant Code · Zone│
│  Description text...                           │
│                                                 │
│  Care Instructions                             │
│  ...                                           │
│  Characteristics                               │
│  ...                                           │
│  Properties                                    │
│  ...                                           │
│  Benefits                                      │
│  ...                                           │
│  Cautions                                      │
│  ...                                           │
│  Uses by Part (flower / fruit / stem / ...)    │
│  ...                                           │
│  (each section only shown if the admin filled  │
│   it in for this plant)                        │
│                                                 │
│  👁 1,204 unique visitors have scanned this tree│
│                                                 │
│  [ I'm Interested ]                            │
│   └─ (click reveals) Email: [______] [Submit]  │
│                                                 │
│  [ ← Previous Tree ]        [ Next Tree → ]    │
└───────────────────────────────────────────────┘

Behavior notes: