Portfolio / Flagship / AI / LLM · Data integration · Web / Frontend
PlantPal
Many public signals, one garden. The engineering problem is not calling the APIs — it is keeping each signal's resolution, freshness and uncertainty visible when a model turns them into advice.
Intended user problem
Choosing what to plant depends on many local signals that live in different public datasets, each with its own resolution, freshness and uncertainty.
A gardener wants to know what will grow well where they are. The answer depends on climate, soil chemistry, air quality, sunlight and what already lives nearby — information that exists in public datasets, but scattered, at different scales and updated on different clocks.
Environmental signals: provider, freshness, resolution
What PlantPal's code requests, how long the app keeps it, and the spatial resolution where the repository states one. Provider terms were not reviewed for this page; Open-Meteo's free hosted tier is non-commercial.
| Signal | Provider | What is requested | Freshness in the app | Resolution |
|---|---|---|---|---|
| Current weather and 7-day forecast | Open-Meteo forecast | Temperature, humidity, wind, forecast | Cached 24 h in the browser | Not stated in the repository |
| Air quality and pollen | Open-Meteo air quality | US/EU AQI, PM2.5, PM10, ozone, pollen | Cached 15 min | Not stated in the repository |
| Soil temperature and moisture | Open-Meteo | 0–28 cm soil temperature and moisture | Cached 15 min | Not stated in the repository |
| Soil properties | ISRIC SoilGrids v2.0 | pH, texture, organic carbon at 0–5 cm (mean) | Not separately cached (30-day cache inactive) | 250 m, per README |
| Elevation | Open-Elevation | Metres above sea level | Not separately cached | Not stated in the repository |
| Sun and moon | Sunrise-Sunset | Sunrise, sunset, day length | Cached 24 h | Computed for the coordinate |
| Historical climate | Open-Meteo archive | Two 10-year windows for comparison | Fetched with the profile | Not stated in the repository |
| Climate projection | Open-Meteo climate (CMIP6) | One model (CMCC_CM2_SR5), 2041–2060 and 2071–2090 | Fetched with the profile | Not stated in the repository |
| Biodiversity | GBIF occurrence search | Up to 300 plant records in a ±0.1° box; animal record count | Fetched with the profile | ±0.1° latitude/longitude box |
| Location | Browser geolocation, ipapi.co, Open-Meteo geocoding | Coordinates from GPS, IP lookup or city search | Per session | IP lookup is city-level at best |
— Not stated in the repository.
Evidence for the provider table4 sources
- Repository documentedInspected source code
PlantPal calls Open-Meteo (forecast, air quality, archive, climate, geocoding), ISRIC SoilGrids, GBIF, Sunrise-Sunset, Open-Elevation and ipapi.co directly from the browser.
https://air-quality-api.open-meteo.com · https://rest.isric.org · https://api.gbif.org · https://api.sunrise-sunset.org · https://api.open-elevation.com · https://ipapi.co/json/
- IP-based geolocation via ipapi.co is not mentioned in the README.
- Open-Meteo's free hosted tier is non-commercial.
services/environmentalDataService.ts; services/weatherService.ts; services/geolocationService.ts (opens in a new tab) @ 99071d4 · reviewed 2026-10-25 · In the ledger
- Repository documentedInspected source code
Environmental data is cached in the browser for 15 minutes (air quality, soil moisture) or 24 hours (sun, moon, weather).
const TTL_REALTIME = 15 * 60 * 1000; … const TTL_DAILY = 24 * 60 * 60 * 1000; // const TTL_MONTHLY = 30 * 24 * 60 * 60 * 1000; // 30 days — reserved for future
- The README's 30-day cache for soil and elevation is not active.
services/environmentalDataService.ts (opens in a new tab) @ 99071d4 · reviewed 2026-10-25 · In the ledger
- Repository documentedInspected source code
Biodiversity data is a sample of up to 300 GBIF plant occurrence records in a ±0.1° box around the location, with no native-status filter.
const decimalRange = 0.1; … kingdomKey=6&limit=300&hasCoordinate=true&hasGeospatialIssue=false
- Occurrence records are not a census and do not identify native species.
services/environmentalDataService.ts (opens in a new tab) @ 99071d4 · reviewed 2026-10-25 · In the ledger
- Repository documentedInspected source code
Climate projections come from one CMIP6 model (CMCC_CM2_SR5) for 2041–2060 and 2071–2090 via Open-Meteo.
const models = 'CMCC_CM2_SR5'; … start_date=2041-01-01&end_date=2060-12-31 … start_date=2071-01-01&end_date=2090-12-31
- A single model is one projection, not a forecast.
- A code comment mentions two emissions scenarios, but the requests do not select a scenario.
services/environmentalDataService.ts (opens in a new tab) @ 99071d4 · reviewed 2026-10-25 · In the ledger
Normalised source architecture
From location to suggestions
React 19 · Vite · client-side only
- 01LocationBrowser GPS, IP lookup (ipapi.co) or city search.
- 02Parallel provider callsOpen-Meteo, SoilGrids, GBIF, Sunrise-Sunset, Open-Elevation — straight from the browser.
- 03Environmental profileOne object per location, cached in localStorage by freshness class.
- 04PreferencesSunlight, watering, size and goals entered by the user.
- 05Gemini promptProfile and preferences combined into a prompt from the browser.
- 06SuggestionsPlants and actions to consider — model interpretation.
Everything runs in the browser, including the Gemini call. A key supplied at build time is embedded in the JavaScript bundle, and a user's own key is kept in localStorage. That is why this page does not link a live deployment.Evidence for the key handling
Uncertainty
Each signal fails differently. Forecast temperature is tight over a few days; air quality is modelled on a grid; soil properties are a 250-metre prediction that a single yard can contradict; occurrence counts measure reporting effort as much as life; and a single climate model is one possible future, not a forecast.
The explorer below makes that visible with invented sites. Its values are synthetic so no real location, licence or quota is involved.
AI interpretation boundary
The model may
- Summarise the combined signals in plain language.
- Suggest plants worth considering, given stated preferences.
- Point out which signals are missing or stale.
The product must not claim
- Present a fixed per-plant table as an exact carbon measurement.
- Diagnose a plant disease as certain from a photo.
- Treat one climate model's projection as a forecast.
- Call occurrence records a list of native species.
- Guarantee that a plant will thrive.
Synthetic data · not real locations
Signal explorer
Synthetic site A — humid coastal
Invented values for a warm, humid coastal plot.
- Mean summer temperature29 °C
low uncertainty Plausible range 27–31. A long-run seasonal average changes little from year to year.
- Air quality (PM2.5)38 µg/m³
medium uncertainty Plausible range 24–52. Modelled, gridded and changes hourly.
- Soil pH (0–5 cm)6.4
medium uncertainty Plausible range 5.8–7. 250 m prediction; one garden can differ.
- Plant occurrence records nearby212
high uncertainty Count only; no range applies. A count of reports, not a census or a native-species list.
- 2041–2060 warming vs recent+1.4 °C
high uncertainty Plausible range 0.8–2.1. One model, one projection; not a forecast.
Synthetic site B — semi-arid upland
Invented values for a dry, elevated plot.
- Mean summer temperature33 °C
low uncertainty Plausible range 31–35. A long-run seasonal average changes little from year to year.
- Air quality (PM2.5)19 µg/m³
medium uncertainty Plausible range 12–30. Modelled, gridded and changes hourly.
- Soil pH (0–5 cm)7.8
medium uncertainty Plausible range 7.2–8.3. 250 m prediction; one garden can differ.
- Plant occurrence records nearby41
high uncertainty Count only; no range applies. Sparse reporting is not the same as sparse life.
- 2041–2060 warming vs recent+1.9 °C
high uncertainty Plausible range 1.1–2.7. One model, one projection; not a forecast.
Synthetic site C — temperate city yard
Invented values for a shaded urban yard.
- Mean summer temperature22 °C
low uncertainty Plausible range 20–24. A long-run seasonal average changes little from year to year.
- Air quality (PM2.5)27 µg/m³
medium uncertainty Plausible range 15–41. Street-level exposure can differ from the grid cell.
- Soil pH (0–5 cm)6.9
high uncertainty Plausible range 6.2–7.5. Urban soils are often disturbed or imported.
- Plant occurrence records nearby300+
high uncertainty Count only; no range applies. The query stops at 300 records; the true count is unknown.
- 2041–2060 warming vs recent+1.2 °C
high uncertainty Plausible range 0.6–1.9. One model, one projection; not a forecast.
Earth Signals exhibit
A live earth-data exhibit is deliberately not included. Open-Meteo's free hosted tier is non-commercial and is disabled in this site's provider policy, and adding a separate live feed would not tell you more about PlantPal's engineering than the synthetic explorer above.
Feature and source status
| Feature (as named in the README) | What the code shows | Evidence |
|---|---|---|
| Multi-source environmental profile | Implemented (inspected) | PlantPal calls Open-Meteo (forecast, air quality, archive… |
| Browser cache with freshness classes | Implemented: 15 min / 24 h | Environmental data is cached in the browser for 15 minutes… |
| 30-day cache for soil and elevation | README only — inactive in code | Environmental data is cached in the browser for 15 minutes… |
| Carbon dashboard | Estimate from fixed table | Carbon figures are estimates from a fixed per-category… |
| Native-species biodiversity | Occurrence sample, no native filter | Biodiversity data is a sample of up to 300 GBIF plant… |
| Climate trend forecaster | One CMIP6 model projection | Climate projections come from one CMIP6 model… |
| Plant Doctor diagnosis | Model interpretation, not diagnosis | The Plant Doctor sends a photo to Gemini with a prompt… |
| Server-side key protection | Not present — key in client bundle | PlantPal calls Gemini from the browser; a build-time key is… |
Evidence for carbon and key handling2 sources
- Repository documentedInspected source code
Carbon figures are estimates from a fixed per-category table (for example 22 kg CO₂ per tree per year), not measurements.
// Research-based per-plant-type annual impact estimates … tree: { co2Kg: 22, … }, shrub: { co2Kg: 4, … }, herb: { co2Kg: 0.5, … }
- The README's “exact CO₂ sequestration” wording is not supported; community-map CO₂ values are hard-coded demo data.
components/CarbonDashboard.tsx (opens in a new tab) @ 99071d4 · reviewed 2026-10-25 · In the ledger
- Repository documentedInspected source code
PlantPal calls Gemini from the browser; a build-time key is embedded in the client bundle and a user-supplied key is kept in localStorage.
'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY), 'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY)
- Any deployment built with a key exposes it publicly; the live app is therefore not linked from this site (decision D16).
vite.config.ts; services/geminiService.ts (opens in a new tab) @ 99071d4 · reviewed 2026-10-25 · In the ledger
Repository
PlantPal is linked by its repository only: the live app is not linked while its client-side key issue stands.
Limitations
- The README describes "exact CO₂ sequestration"; the code uses a fixed per-category estimate.
- "Native species within 10 km" is a sample of occurrence records in a ±0.1° box with no native filter.
- Climate figures come from a single model and do not select an emissions scenario.
- The repository has no licence file, so reuse rights are not granted.
- The live app was not checked; it is not linked while the client-side key issue stands.