Next-Gen Open-Source Community Ecology Workbench
Real R statistics (vegan · iNEXT · betapart) running in the browser and on the desktop — no R installation required
Features • Quick start • Architecture • Documentation • Citation
Most ecological analysis software forces a trade-off: friendly tools lack statistical rigour, rigorous tools lack usability. Ördin 4 keeps the rigour (the same vegan/iNEXT code a reviewer would expect) and drops the friction — it runs R in WebAssembly via webR, so there is nothing to install on a user's machine.
| Ördin 4 | |
|---|---|
| Runtime | webR (R 4.4 compiled to WASM) + DuckDB-WASM for data |
| Delivery | Web app (ordin.in4metrix.dev), Tauri desktop bundle, installable PWA |
| Panels | Dashboard, Data, Diversity, Ordination, Tests, Beta, Classification, Traits, Settings, Help |
| Ordination | NMDS, PCA, CA, DCA, PCoA, CCA, RDA, db-RDA, CAP (+ varpart, forward selection) |
| Diversity | iNEXT rarefaction/extrapolation (Hill q=0/1/2, types 1–3) + classic indices |
| Beta diversity | Baselga turnover/nestedness partitioning, LCBD/SCBD |
| Tests | PERMANOVA, PERMDISP, ANOSIM, Mantel, envfit, anova.cca |
| Projects | .ordin bundle = data + analyses + provenance, portable across web/desktop |
| Offline | Desktop bundles webR + packages; web caches them after first load |
Provenance first. Every result is labelled with how it was produced (
REAL … via webRvs. mock preview data), so you always know whether a number came from R.
- Data (1) — CSV/Excel/Parquet import into DuckDB-WASM, virtualised grid preview,
decostandtransforms (Hellinger, chord, log, Wisconsin, presence/absence) with live preview, SQL inspector. - Diversity (2) —
iNEXTrarefaction & extrapolation:q = 0/1/2, abundance / incidence-raw / incidence-freq, sample-size (type 1), coverage (type 3) and completeness (type 2) curves, bootstrap CIs. - Beta (3) —
vegdistdissimilarities, Baselga partitioning (beta.pair,beta.multi),beta.div.compreplacement/richness-difference components. - Ordination (4) — unconstrained (PCA, CA, DCA, PCoA, NMDS) and constrained (RDA, CCA, db-RDA, CAP, partial models) with DCA gradient-length adviser,
varpartandordiR2step. - Tests (5) —
adonis2,betadisper,anosim,mantel/mantel.partial,envfit, restricted permutation designs. - Classification — hierarchical clustering (Ward D2, average, complete), k-means, cophenetic correlation and silhouette diagnostics (JS fast path, R verification).
- Traits — community-weighted means, RLQ / fourth-corner, functional diversity hooks (
FD,picante).
- VS Code-inspired shell: activity bar, collapsible sidebar, right inspector, status bar, workflow footer.
- Command palette (
Ctrl/Cmd + K), sidebar toggle (Ctrl/Cmd + B), inspector toggle (Ctrl/Cmd + I). - Plot customisation panel (themes, typography, points/lines, grids, CI ribbons, legends, facets) applied without re-running analyses.
- Optional MapLibre + deck.gl site map for datasets with lon/lat columns — statistics first, maps only when useful.
- Plugin marketplace scaffold for optional analysis modules.
- Publication-quality figures (SVG/PNG, configurable DPI and dimensions).
- Tabular exports (CSV, JSON, Parquet) and reproducible R snippets per panel.
.ordinproject files bundling data, results and provenance.
Open https://ordin.in4metrix.dev — no install. The first load fetches webR and the R package bundle, then caches them for offline use.
git clone https://github.com/jm0535/0rdin.git
cd 0rdin
npm install # Node.js >= 22
npm run dev # Vite dev server on http://localhost:9054Other workspace scripts:
| Command | What it does |
|---|---|
npm run dev |
Dev server for apps/ordin-desktop (port 9054, bound to 0.0.0.0) |
npm run build |
Type-check + production build to apps/ordin-desktop/dist |
npm run preview |
Serve the production build locally |
npm run tauri:dev |
Run the desktop shell in dev mode |
npm run typecheck |
tsc --noEmit across all workspaces |
npm run lint |
ESLint over apps, packages, workers, tests |
npm test |
Workspace test suites |
npm run test:frontend |
Node test runner over tests/*.test.ts |
Cross-origin isolation. Real R execution needs
SharedArrayBuffer, which requires the COOP/COEP headers already configured invercel.jsonand the Vite dev server. Sandboxed iframe previews without those headers fall back to mock results, clearly labelled in the UI.
npm run tauri:build -w ordin-desktopRequires the Tauri prerequisites for your platform (Rust toolchain, plus WebKitGTK on Linux). Bundles land in the Tauri target/release/bundle directory and ship webR offline — end users never install R.
0rdin/
├── apps/
│ └── ordin-desktop/ # Vite + React 18 app (also the Tauri front end)
│ └── src/
│ ├── components/layout/ # ActivityBar, Sidebar, RightInspector, CommandPalette, …
│ ├── components/panels/ # Dashboard, Data, Diversity, Ordination, Tests, Beta, …
│ └── components/map/ # optional MapLibre + deck.gl view
├── packages/
│ ├── core/ # Zustand store, OrdinProject schema (zod), panel types
│ ├── processing/ # webR bridge + JS fast paths (distances, hclust, k-means, CWM)
│ ├── ui/ # shared primitives (Button, Card, Badge, Dialog, Sheet, …)
│ └── map/ # MapLibre helpers
├── docs/ # documentation + GitHub Pages site
├── sample-data/ # example datasets
├── scripts/ · tools/ · ci/ # build helpers, linters, R CI bootstrap
├── shiny/ · src/ # legacy v3 Shiny + Electron app (maintenance only)
└── vercel.json # COOP/COEP headers for SharedArrayBuffer
Data flows file → DuckDB-WASM → typed store (@ordin/core) → analysis call (@ordin/processing) → panel render. Analyses run in webR when cross-origin isolation is available; lightweight JS implementations provide instant previews and a deterministic fallback.
Details: docs/ARCHITECTURE.md · docs/DEVELOPMENT.md · docs/API.md · docs/ORDIN_STACK_AUDIT_2026-09-26.md.
Start at the documentation index.
Core
- Quick start — install, first analysis
- Architecture — stack, data flow, webR bridge
- Development guide — monorepo workflow, testing, releases
- API reference —
@ordin/core,@ordin/processing,@ordin/ui,@ordin/map - Workflow · Features overview
Analysis guides (docs/guides/)
- Ordination · CCA/RDA · Biplots
- Data structure · Data management
- Incidence vs abundance · Estimates & rarefaction types
- Plot customisation · Export features
Setup & publishing (docs/setup/) — Linux · WSL · Fedora · Publishing · GitHub Pages
Development (docs/development/) — Project overview · Reproducibility · Security audit · Test checklist
Community — Contributing · Code of Conduct · Code standards · Security policy · Changelog
Documents describing the v3 Shiny/Electron application are marked with a legacy banner at the top. They remain accurate for the
shiny/tree, which is kept for reference and maintenance only.
A species matrix is a table with sites in rows and taxa in columns:
| Site | Species_A | Species_B | Species_C |
|---|---|---|---|
| Site1 | 12 | 0 | 3 |
| Site2 | 5 | 7 | 0 |
Environmental tables share the same site column and hold numeric or factor variables; trait tables are taxa × traits. Incidence-raw data uses one matrix per assemblage; incidence-frequency data uses the number of sampling units in the first cell. See docs/guides/DATA-STRUCTURE-GUIDE.md.
Sample datasets live in sample-data/ and dune, varespec and BCI can be loaded directly from the Data panel.
| v3 (Shiny + Electron) | v4 (React + webR) |
|---|---|
| Requires local/portable R install | R ships as WASM, zero install |
npm start (Electron + Shiny server on port 9054) |
npm run dev (Vite on port 9054) |
| Analyses in the R process | Analyses in webR worker, JS fast paths for previews |
| Results tied to the session | .ordin project files with provenance |
Legacy code in shiny/, src/ |
Active code in apps/, packages/ |
The legacy app is still runnable — see docs/DEVELOPMENT.md.
Issues and pull requests are welcome. Please read .github/CONTRIBUTING.md and run npm run lint && npm run typecheck && npm test before opening a PR.
MIT — see LICENSE.
Jimmy Moses (jimmy.moses@pnguot.ac.pg)
- Built with Tauri, React, Vite, Zustand, DuckDB-WASM and deck.gl
- R in the browser thanks to webR
- Statistics powered by vegan, iNEXT, betapart and adespatial
- Design inspiration from CANOCO 5 and VS Code
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: jimmy.moses@pnguot.ac.pg
Moses, J. (2026). Ördin 4: A browser-native and desktop workbench for community ecology analysis.
GitHub repository: https://github.com/jm0535/0rdin