Code
The Research Labs platform as it runs, shown for scrutiny: every file that reads an instrument, computes a stream, aggregates, checks provenance or renders a page, with a checksum per file. A reader of any published number can open the code that produced it.
Version stamp
a2894de5492ffc83982e18a22eb6aae1038ddbf0b348af1d802ce00ae6bbe1bb94a349346e510fcd873ddf9b4fb65c69b42239205a2f854c4786df0e23df5429 · code-manifest.json (also printed on the Raw Vault)How this platform is built
Stack. PHP 8 and MySQL 8 behind Apache, written for this platform without a framework. Charts are dependency-free SVG drawn by assets/app.js. No third-party library is part of the tree; the one outside service is the Anthropic API, called from inc/ai.php for the Ask Grímnir page with a key held in the excluded configuration file.
From instrument to published table. cron/poll_all.php runs on a schedule and calls one client per instrument family under cron/clients/ (weather station, water-quality sonde, aquifer logger, sky quality meter, footfall counters, acoustic recorders). Each pull is stored as a raw file, checksummed and listed in files_raw (the Raw Vault), then parsed into readings rows: stream, timestamp, value, and a placeholder flag. Every stream starts in placeholder mode and flips to live with its first real reading; cron/health_check.php watches freshness and completeness. Pages under pages/ render the readings through inc/streampage.php and inc/helpers.php (series, latest, mode badges); api.php serves the same readings to keyed clients. schema.sql defines the tables.
Excluded, and why. config.php and its template (credentials); data/ (raw files, uploads, media); logs; admin/ (the write path, no part of how a published number is produced); diagnose.php (server layout); the snapshots themselves. Paths are shown relative to the application root. E-mail addresses other than the company's are redacted at snapshot time, and a scan for secret-like strings refuses to publish a snapshot that contains one; the allowlist and the snapshot script are in the tree (inc/code-allowlist.php, inc/code-snapshot.php).
Versions. A snapshot is written at each deploy. The version is the UTC date plus seven characters of the tree's SHA-256, so an unchanged tree keeps its version and a changed one cannot hide. Every version stays reachable by its stamp, every page footer prints the version that rendered it, and a citation reads: file, lines, platform code version.
Source shown for scrutiny of the research platform. All rights reserved. Not offered as installable software.
application root
| File | Lines | Bytes | SHA-256 |
|---|---|---|---|
| README.md | 33 | 1,822 | 8c157bc61176c038… |
| api.php 1 function | 40 | 2,029 | 951a77bb8329fbfa… |
| index.php | 7 | 217 | 0ccd650e261b5d89… |
| schema.sql | 103 | 3,522 | a37fdb7f11822047… |
cron/
| File | Lines | Bytes | SHA-256 |
|---|---|---|---|
| README.md | 4 | 148 | 8e063a214a22e639… |
| health_check.php | 35 | 1,994 | 3d95f0ba6d5dab78… |
| poll_all.php | 10 | 488 | 698b864077e27e8f… |
cron/clients/
| File | Lines | Bytes | SHA-256 |
|---|---|---|---|
| _base.php 1 function | 21 | 1,233 | 257302304e0e6b90… |
| bugg.php | 11 | 516 | 6f1b72c80b2440ca… |
| ecocounter.php | 11 | 525 | 7451b16e1de4d34d… |
| hydrovu.php | 11 | 533 | 3e02364b1a3c4fb3… |
| sqm.php | 11 | 500 | b6cf017d0dc3d309… |
| weatherlink.php | 11 | 548 | 3a1d3cd46e1a4dfa… |
docs/
| File | Lines | Bytes | SHA-256 |
|---|---|---|---|
| schema.sql | 94 | 3,270 | a0979cb34aff4cfc… |
inc/
| File | Lines | Bytes | SHA-256 |
|---|---|---|---|
| ai.php 8 functions | 117 | 7,575 | 8903577c20328e7a… |
| code-allowlist.php | 24 | 1,999 | f2fc55c2c617ec89… |
| code-snapshot.php | 130 | 8,508 | 3022420d25260e3d… |
| db.php 2 functions | 21 | 807 | 62d133f26334fc0d… |
| defaults.php | 31 | 1,431 | ff9c255ceb0dd472… |
| helpers.php 9 functions | 54 | 2,944 | 287c881d9ae5317f… |
| layout.php 4 functions | 72 | 6,690 | 528ddb80bc30a1b4… |
| streampage.php 1 function | 30 | 2,223 | aa298edcdb72d00b… |
pages/
| File | Lines | Bytes | SHA-256 |
|---|---|---|---|
| about.php | 16 | 3,422 | 614c25276f517543… |
| apidocs.php | 15 | 1,554 | 78e7451b8aa1f7e9… |
| aquifer.php | 4 | 340 | 1c483f224713e3d9… |
| ask.php | 36 | 3,977 | 924c25fc6943c4f6… |
| birds.php | 25 | 2,226 | d6445399959599d8… |
| cameras.php | 20 | 1,732 | 4281fc8bfd7d7b7a… |
| code.php 4 functions | 147 | 14,856 | f777036a4c1aa44d… |
| construction.php | 11 | 895 | 78a18e521088659c… |
| control.php | 21 | 2,687 | ae867741b2799b0f… |
| correlate.php | 49 | 3,707 | 3da5d4344f22d0eb… |
| darksky.php | 4 | 339 | 34e971e8afe2c3bd… |
| faults.php | 13 | 916 | c3318131fa64f493… |
| footfall.php | 4 | 345 | f962b67c63247d22… |
| health.php | 27 | 2,545 | a2a14e6519d2740f… |
| heritage.php | 19 | 1,695 | cebd2619e584d188… |
| live.php | 45 | 3,748 | 9bfde60e9dab4a84… |
| log.php | 10 | 593 | d2dcca3ce3f704a3… |
| marine.php | 4 | 366 | c0d0cca8e5079321… |
| methods.php | 14 | 1,451 | b79278d6d77507c7… |
| resources.php | 4 | 408 | d99155f4637d0e3b… |
| species.php 5 functions | 435 | 32,793 | dfa4a48f1e0915d5… |
| vault.php | 17 | 1,822 | 1163203674475518… |
| water.php | 4 | 405 | 241bf838d93e3180… |
| weather.php | 4 | 376 | 7000dfe6caafed1d… |
| wellbeing.php | 13 | 2,586 | 39d1ef9570fbb22c… |
| wellness.php 1 function | 94 | 12,407 | dc992921b27b6019… |
Source shown for scrutiny of the research platform. All rights reserved. Not offered as installable software. To verify a file: download it as plain text, compute its SHA-256, compare with the manifest.