# ryangrankin/vermont-biodiversity architecture

> Architecture diagram of the GitHub repository ryangrankin/vermont-biodiversity, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ryangrankin/vermont-biodiversity
- Repository: https://github.com/ryangrankin/vermont-biodiversity

## Overview

Vermont Biodiversity is a student-curated public education site with seasonal recommendations, surveys, species and plant guides, wildlife-camera content, and community sightings. Visitors browse the educational content, submit sightings or recommendation ideas, and administrators review and manage submissions. The graph preserves these distinct areas; several connections involving unsampled pages and routes are dashed because their request wiring is not visible in the excerpts.

Main entry points: [`vermont-biodiversity/lib/supabaseAdmin.ts`](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/lib/supabaseAdmin.ts) (Supabase Data and Media), [`vermont-biodiversity/app/admin/page.tsx`](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/admin/page.tsx) (Review Dashboard), [`vermont-biodiversity/app/api/admin/sightings`](https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/api/admin/sightings) (Sighting Review API), [`vermont-biodiversity/app/components/WildlifeSightingForm.tsx`](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/components/WildlifeSightingForm.tsx) (Sighting Form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Learning"]
  node_content["Student Content<br/>[studentContent.ts]"]
  node_animalguides["Animal Guides"]
  node_plantguides["Plant Guides"]
  node_wildlifecam["Wildlife Cam<br/>[page.tsx]"]
end

subgraph group_sightings["Wildlife Sightings"]
  node_sightingform["Sighting Form"]
  node_sightingsapi["Sighting Submission API<br/>[route.ts]"]
  node_videoupload["Video Upload API<br/>[route.ts]"]
  node_videovalidation["Video Validation"]
  node_gallery["Sightings Gallery<br/>[page.tsx]"]
  node_galleryapi["Gallery API<br/>[route.ts]"]
  node_sightingspage["Sightings Page<br/>[page.tsx]"]
end

subgraph group_recommendations["Recommendations"]
  node_survey["Biodiversity Survey<br/>[page.tsx]"]
  node_recommendationpages["Recommendation Pages"]
  node_approvedapi["Approved Recommendations<br/>[route.ts]"]
  node_ideas["Idea Submission<br/>[route.ts]"]
end

subgraph group_admin["Administration"]
  node_adminideas["Idea Moderation API"]
  node_adminlogin["Admin Login<br/>[page.tsx]"]
  node_adminsignup["Admin Signup<br/>[page.tsx]"]
  node_admindashboard["Review Dashboard<br/>[page.tsx]"]
  node_sightingphoto["Sighting Photo<br/>[SightingPhoto.tsx]"]
  node_adminapi["Sighting Review API"]
  node_cleanup["Video Cleanup<br/>[route.ts]"]
end

node_visitor(("Visitor"))
node_adminactor(("Administrator"))
node_database[("Supabase Data and Media<br/>[supabaseAdmin.ts]")]

node_visitor -->|"browses"| node_animalguides
node_visitor -->|"browses"| node_plantguides
node_visitor -.->|"views"| node_wildlifecam
node_visitor -.->|"answers"| node_survey
node_visitor -.->|"submits"| node_sightingform
node_visitor -.->|"suggests"| node_ideas
node_content -->|"supplies content"| node_plantguides
node_survey -.->|"loads ideas"| node_approvedapi
node_visitor -.->|"opens details"| node_recommendationpages
node_ideas -->|"stores pending ideas"| node_database
node_adminactor -.->|"signs in"| node_adminlogin
node_adminactor -.->|"registers"| node_adminsignup
node_admindashboard -->|"requests sightings"| node_adminapi
node_adminapi -->|"reads sightings"| node_database
node_admindashboard -->|"moderates sightings"| node_adminapi
node_adminapi -->|"updates records"| node_database
node_admindashboard -->|"moderates ideas"| node_adminideas
node_adminideas -.->|"updates ideas"| node_database
node_sightingform -.->|"submits sighting"| node_sightingsapi
node_sightingform -.->|"requests upload"| node_videoupload
node_sightingsapi -->|"validates video"| node_videovalidation
node_sightingsapi -->|"stores sighting"| node_database
node_videoupload -->|"reserves upload"| node_database
node_sightingspage -.->|"opens gallery"| node_gallery
node_gallery -.->|"loads media"| node_galleryapi
node_galleryapi -.->|"reads media"| node_database
node_admindashboard -->|"renders photos"| node_sightingphoto
node_cleanup -->|"cleans expired uploads"| node_database

click node_content "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/data/studentContent.ts"
click node_animalguides "https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/animals"
click node_plantguides "https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/plants"
click node_wildlifecam "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/wildlife-cam/page.tsx"
click node_survey "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/survey/page.tsx"
click node_recommendationpages "https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/recommendations"
click node_approvedapi "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/api/approved-recommendations/route.ts"
click node_ideas "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/recommendation-ideas/route.ts"
click node_adminideas "https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/api/admin/recommendation-ideas"
click node_sightingform "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/components/WildlifeSightingForm.tsx"
click node_sightingsapi "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/api/sightings/route.ts"
click node_videoupload "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/api/sightings/video-upload/route.ts"
click node_videovalidation "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/lib/validateWildlifeVideo.ts"
click node_gallery "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/gallery/page.tsx"
click node_galleryapi "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/api/gallery/route.ts"
click node_sightingspage "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/sightings/page.tsx"
click node_adminlogin "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/admin/login/page.tsx"
click node_adminsignup "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/admin/signup/page.tsx"
click node_admindashboard "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/admin/page.tsx"
click node_sightingphoto "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/admin/SightingPhoto.tsx"
click node_adminapi "https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/api/admin/sightings"
click node_cleanup "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/api/admin/cleanup-videos/route.ts"
click node_database "https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/lib/supabaseAdmin.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_content,node_animalguides,node_plantguides,node_wildlifecam toneBlue
class node_sightingform,node_sightingsapi,node_videoupload,node_videovalidation,node_gallery,node_galleryapi,node_sightingspage,node_database toneAmber
class node_survey,node_recommendationpages,node_approvedapi,node_ideas toneMint
class node_adminideas,node_adminlogin,node_adminsignup,node_admindashboard,node_sightingphoto,node_adminapi,node_cleanup toneRose
class node_visitor,node_adminactor toneIndigo
```

## Components

### Public Learning

- [Student Content](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/data/studentContent.ts): `vermont-biodiversity/data/studentContent.ts`
- [Animal Guides](https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/animals): `vermont-biodiversity/app/animals`
- [Plant Guides](https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/plants): `vermont-biodiversity/app/plants`
- [Wildlife Cam](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/wildlife-cam/page.tsx): `vermont-biodiversity/app/wildlife-cam/page.tsx`

### Wildlife Sightings

- [Sighting Form](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/components/WildlifeSightingForm.tsx): `vermont-biodiversity/app/components/WildlifeSightingForm.tsx`
- [Sighting Submission API](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/api/sightings/route.ts): `vermont-biodiversity/app/api/sightings/route.ts`
- [Video Upload API](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/api/sightings/video-upload/route.ts): `vermont-biodiversity/app/api/sightings/video-upload/route.ts`
- [Video Validation](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/lib/validateWildlifeVideo.ts): `vermont-biodiversity/lib/validateWildlifeVideo.ts`
- [Sightings Gallery](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/gallery/page.tsx): `vermont-biodiversity/app/gallery/page.tsx`
- [Gallery API](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/api/gallery/route.ts): `vermont-biodiversity/app/api/gallery/route.ts`
- [Sightings Page](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/sightings/page.tsx): `vermont-biodiversity/app/sightings/page.tsx`

### Recommendations

- [Biodiversity Survey](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/survey/page.tsx): `vermont-biodiversity/app/survey/page.tsx`
- [Recommendation Pages](https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/recommendations): `vermont-biodiversity/app/recommendations`
- [Approved Recommendations](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/api/approved-recommendations/route.ts): `vermont-biodiversity/app/api/approved-recommendations/route.ts`
- [Idea Submission](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/recommendation-ideas/route.ts): `vermont-biodiversity/app/recommendation-ideas/route.ts`

### Administration

- [Idea Moderation API](https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/api/admin/recommendation-ideas): `vermont-biodiversity/app/api/admin/recommendation-ideas`
- [Admin Login](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/admin/login/page.tsx): `vermont-biodiversity/app/admin/login/page.tsx`
- [Admin Signup](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/admin/signup/page.tsx): `vermont-biodiversity/app/admin/signup/page.tsx`
- [Review Dashboard](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/admin/page.tsx): `vermont-biodiversity/app/admin/page.tsx`
- [Sighting Photo](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/admin/SightingPhoto.tsx): `vermont-biodiversity/app/admin/SightingPhoto.tsx`
- [Sighting Review API](https://github.com/ryangrankin/vermont-biodiversity/tree/main/vermont-biodiversity/app/api/admin/sightings): `vermont-biodiversity/app/api/admin/sightings`
- [Video Cleanup](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/app/api/admin/cleanup-videos/route.ts): `vermont-biodiversity/app/api/admin/cleanup-videos/route.ts`

### Other components

- **Visitor**
- **Administrator**
- [Supabase Data and Media](https://github.com/ryangrankin/vermont-biodiversity/blob/main/vermont-biodiversity/lib/supabaseAdmin.ts): `vermont-biodiversity/lib/supabaseAdmin.ts`

## Connections

- Visitor → Animal Guides: browses (evidence: `vermont-biodiversity/app/animals/page.tsx`)
- Visitor → Plant Guides: browses (evidence: `vermont-biodiversity/app/plants/page.tsx`)
- Visitor → Wildlife Cam: views
- Visitor → Biodiversity Survey: answers
- Visitor → Sighting Form: submits
- Visitor → Idea Submission: suggests
- Student Content → Plant Guides: supplies content (evidence: `vermont-biodiversity/app/plants/page.tsx`)
- Biodiversity Survey → Approved Recommendations: loads ideas
- Visitor → Recommendation Pages: opens details
- Idea Submission → Supabase Data and Media: stores pending ideas (evidence: `vermont-biodiversity/app/recommendation-ideas/route.ts`)
- Administrator → Admin Login: signs in
- Administrator → Admin Signup: registers
- Review Dashboard → Sighting Review API: requests sightings (evidence: `vermont-biodiversity/app/admin/page.tsx`)
- Sighting Review API → Supabase Data and Media: reads sightings (evidence: `vermont-biodiversity/app/api/admin/sightings/route.ts`)
- Review Dashboard → Sighting Review API: moderates sightings (evidence: `vermont-biodiversity/app/admin/page.tsx`)
- Sighting Review API → Supabase Data and Media: updates records (evidence: `vermont-biodiversity/app/api/admin/sightings/[id]/route.ts`)
- Review Dashboard → Idea Moderation API: moderates ideas (evidence: `vermont-biodiversity/app/admin/page.tsx`)
- Idea Moderation API → Supabase Data and Media: updates ideas
- Sighting Form → Sighting Submission API: submits sighting
- Sighting Form → Video Upload API: requests upload
- Sighting Submission API → Video Validation: validates video (evidence: `vermont-biodiversity/app/api/sightings/route.ts`)
- Sighting Submission API → Supabase Data and Media: stores sighting (evidence: `vermont-biodiversity/app/api/sightings/route.ts`)
- Video Upload API → Supabase Data and Media: reserves upload (evidence: `vermont-biodiversity/app/api/sightings/video-upload/route.ts`)
- Sightings Page → Sightings Gallery: opens gallery
- Sightings Gallery → Gallery API: loads media
- Gallery API → Supabase Data and Media: reads media
- Review Dashboard → Sighting Photo: renders photos (evidence: `vermont-biodiversity/app/admin/page.tsx`)
- Video Cleanup → Supabase Data and Media: cleans expired uploads (evidence: `vermont-biodiversity/app/api/admin/cleanup-videos/route.ts`)
