Skip to content

jbmort/Pocket-Naturalist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

167 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

🦬 Pocket Naturalist

alt text alt text alt text alt text

Pocket Naturalist is a gamified, location-based wildlife tracking and park management platform. Built to bridge the gap between software engineering and wildlife conservation, it empowers park visitors to explore responsibly while providing park rangers with powerful geospatial analytics.

✨ Key Features

🧭 For the Explorer (Mobile-First UI)

Interactive Topographic Maps: Discover nearby trailheads, visitor centers, and active wildlife hotspots. Geofenced Check-Ins: Earn points and unlock digital badges by physically visiting specific park features. Validated backend-side using strict GPS proximity checks.

Wildlife Reporting: Snap a photo and report animal sightings to help fellow hikers and park researchers. Swipeable Discovery Feed: A seamless, touch-friendly UI built with Tailwind CSS to quickly flip through nearby alerts, features, and sightings.

🛡️ For the Park Ranger (Admin Dashboard)

Geospatial Analytics: View heatmaps of visitor traffic, calculate the popularity of specific trails, and track returning vs. new visitors.

Park Configuration: Dynamically draw and update park boundaries (Polygons) and trailheads (Points) directly from the dashboard.

🛠️ Technical Architecture

This project is structured as a Monorepo containing a Spring Boot REST API and a cutting-edge Angular 21 front-end.

Front-End (Client)

Framework: Angular 21 (Leveraging strictly Standalone Components and the latest Control Flow syntax) Styling: Tailwind CSS (Custom themes, native scroll-snap carousels) Mapping: Leaflet.js for rendering responsive, interactive topographic maps. Architecture: Strictly separated "Smart" (Container) and "Dumb" (Presentational) components to maximize reusability and maintainability.

Back-End (API)

Framework: Java 21, Spring Boot 4.x Security: Spring Security with Stateless JWT Authentication and custom Role-Based Access Control (RBAC). A custom @PreAuthorize SpEL implementation ensures Admins can only modify parks they are explicitly assigned to manage. Database: PostgreSQL with the PostGIS extension for native spatial operations.

🧠 Notable Technical Implementations

PostGIS Geofencing: Validating user check-ins isn't done with basic math; it utilizes PostGIS's ST_DWithin function on native Geometry(Point, 4326) columns to execute highly optimized, index-backed proximity searches. Optimized Analytics Schema: Designed a highly normalized database schema featuring a UserParkStat aggregate root to efficiently track daily check-ins (ParkVisit). This makes dashboard analytics queries (e.g., "Peak visitation hours" or "New vs. Returning visitors") lightning fast without complex, expensive table joins.

🚀 Getting Started (Local Development)

Prerequisites Java 21+ Node.js v20+ & Angular CLI (v21) Docker (for running the PostGIS database)

  1. Database Setup

    Spin up the PostGIS database using Docker:

    docker run --name pocket-naturalist-db 
    -e POSTGRES_USER=postgres 
    -e POSTGRES_PASSWORD=password 
    -e POSTGRES_DB=naturalist_db 
    -p 5432:5432 
    -d postgis/postgis:15-3.3
  2. Run the Spring Boot API

    Navigate to the root directory and start the backend:

    mvn spring-boot:run

    (The API will be available at http://localhost:8080)

  3. Run the Angular Front-End

    Navigate to the frontend directory, install dependencies, and serve the app:

    cd frontend
    npm install
    ng serve

(The UI will be available at http://localhost:4200)

About

Pocket Naturalist is a gamified, location-based wildlife tracking and park management platform. Built to bridge the gap between software engineering and wildlife conservation, it empowers park visitors to explore responsibly while providing park rangers with powerful geospatial analytics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors