Drupal studio · Diego Suarez, Madagascar
Est. 2025 · 12°16′ S

Ecosystems

An interactive ecosystem viewer for Drupal: a curated set of species becomes a living community that changes as visitors move through time, place and habitat.

What it is

Ecosystems is a Drupal module that shows a curated set of species as a living community. Each species carries ecological response parameters, so when a visitor changes the controls for time, survey site and the amount and quality of woodland, species arrive, decline or disappear.

It is built as a product for any Drupal 10 or 11 site and needs none of MADDev's data modules: it can run from a JSON payload alone. Its first customer is the Quercus Project, whose oak-biodiversity survey of southern and central Sweden is the first dataset it shows.

At a glance

Modules
ecosystems, the viewer and its data engine; ecosystems_builder, an optional authoring tool
Drupal core
10 or 11
Requires
Core Options, Taxonomy and Views; MADDev infopanel and request_bus
Species data
A JSON payload, species records stored as Drupal entities, or a species entity type provided by another module
Optional enrichment
Wikipedia descriptions, GBIF photographs and sightings, species_ext
Rendering
SVG and HTML, no canvas and no build step; light, dark and high-contrast themes through CSS custom properties
First dataset
Prof. Markus Franzén's INFRAVIS oak-biodiversity survey: 824 species in 30 sets (10 mixed communities and 20 guilds) across 31 survey sites
Status
Working; version 4 of its data model verified in August 2026. Installed on the Quercus Project's live site, not yet open to the public.

What visitors see

A set page shows four views of the same community, drawn in SVG so every label can be selected, translated and read by a screen reader:

  • a suitability map of the survey sites
  • a cross-section from canopy to soil
  • an interaction arc diagram in fixed trophic order
  • species cards

The dataset author's response model runs unmodified in the browser for the interactive simulation. A PHP port of its stateless part renders the page before any script runs, so search engines and visitors without JavaScript get real numbers; a parity test keeps the two implementations in step.

What it adds to a Drupal site

Pages

Every public page is a View, an entity or a taxonomy term. There are no custom page controllers, so a site builder can rearrange the product without a developer.

  • /ecosystems: every set, grouped into communities and guilds (View ecosystem_sets)
  • a page per set: a taxonomy term with the viewer placed through Manage display
  • /ecosystems/species/{id}: one species with its enrichment
  • /ecosystems/payload.json: the raw payload

Display components

  • ecosystem_viewer: the interactive viewer
  • enrichment_<source>: one component per enrichment source, placed and switched off independently; a source that is switched off is never fetched

Extension point

SpeciesRecordSourceInterface, collected through the service tag ecosystems.species_record_source. Any module can contribute a species source, and Ecosystems selects it by name without knowing its fields or storage. The setting ecosystems.settings:source chooses between a JSON file, the module's own entities and a contributed source.

Drush commands

ecosystems:import, ecosystems:enrich, ecosystems:interactions, ecosystems:verify

Access

The permission View the ecosystem viewer is granted to nobody on install, so a new installation stays private until someone opens it.

Authoring with ecosystems_builder

Search a species pool, add species to a community or guild, and accept or reject the Builder's suggestions for what else belongs. Every change goes through one service, so uninstalling the Builder leaves every ecosystem exactly as it was.

Data sources and licences

  • Wikipedia: a plain-language description, tried in English and then Swedish, licensed CC BY-SA and credited on the page
  • GBIF: a photograph, accepted only under CC0 or CC BY as the API actually reports it, because much of GBIF's Swedish material is CC BY-NC, which a paying client cannot publish; plus the latest Swedish sightings and an observation count
  • species_ext, when installed: its stored photograph, narrative and typed species interactions

Nothing is fetched while a page renders. Outbound calls go through request_bus, and fetched values are kept in key-value storage, so a cache rebuild does not throw hundreds of lookups away. A dataset's attribution and licence travel with its payload, not with the code.

Design decisions

  • Sell the viewer, not the stack. No dependency on species_ext or dynamic_mirror_base: without MADDev's data modules, Ecosystems runs from an exported JSON payload and makes no outbound calls.
  • Derived values have no form widget. Model parameters, survey evidence and precomputed outcomes are display-only, so hand edits cannot break the model's consistency.
  • One enrichment source, one component. Manage display decides what appears where, and a source that is switched off costs nothing.
  • Private by default. Nobody sees the viewer until the permission is granted.

Start a project.

Tell us about your species data and the site it should live on.