Skip to content
sophieshipsPublic

About

An open-source data platform that collects all the data a bioprocess run produces into one shared record that a lab team can plot, compare, analyze and publish from.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8,337 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

fermPlot

Checks on main License Python

fermPlot keeps a shared record of bioprocess runs. A run is one fermentation in one vessel. You upload the online data from the bioreactor and the offline assay results from the lab. fermPlot reads each file in full or refuses it with the row, column and cell that failed. It stores the raw value, the normalized value and your curations separately. You can then plot a run, compare runs and export a run with its provenance.

fermPlot is self-hosted. One deployment serves one organization. Each team works in its own workspace. A read-only demo with simulated data runs at https://alpha.fermplot.com/demo.

The demo's Compare page: product concentration and methanol concentration for 12 simulated runs at four methanol setpoints, aligned to inoculation

Try it

The demo needs no sign-in, and a demo session lasts four hours. It opens on the Compare page above. Besides runs, it shows studies, saved results, boards and a published report.

To run it on your own machine, you need Docker with Compose and Git. No secrets and no .env file are needed.

  1. Clone the repository and start the stack from its root:

    docker compose -f docker-compose.base.yml -f docker-compose.dev.yml up -d --build

    The first start builds the images, migrates the database and loads the demo data. It takes several minutes, and the command returns when the stack is up.

  2. Open http://localhost:3100. Sign-in is off in development. In the user menu, the development profile Company Scientist shows the 12 demo runs of Fictional Company History. API http://localhost:8100, OpenAPI http://localhost:8100/docs.

Stop it with docker compose -f docker-compose.base.yml -f docker-compose.dev.yml down. Add -v to delete the data. .env.example lists the settings you can override in a .env file; DEV_DATA_PROFILE is demo when it is empty. docker/README.md has the other modes, and backend/README.md and frontend/README.md run one service natively.

The demo data is synthetic. It does not represent a real organism or process. It comes from a mechanistic reactor simulator that writes the true values for every run, so the analysis can be scored against them (docs/synthetic-corpus-simulators.md).

A local start has the run features below. Studies, study results, saved results, reports and agent access are five capabilities that a local start keeps off, and its demo data holds no studies, boards or reports. Turning them on needs workspace enforcement, and study results also need a retained-storage plan and an active catalog plan (docs/ops/workbench-capabilities.md). Use the hosted demo to see them.

Files it reads

File How
Time-series CSV Plain parser. A Time (h) column (elapsed hours) or a Timestamp column, then one column per channel.
Assay CSV Plain parser. Columns sample_code, analyte, value, unit, and sample_time_hours or sample_timestamp.
Other tables (.csv, .tsv, .txt, .xlsx) Layout review. fermPlot proposes a layout profile from the file. You check a preview and approve it. The next file in the same layout uses the approved profile.
ambr 250 station export A ZIP built with scripts/pack_ambr_station.py. You select channels and an optional time interval.
Roche Cedex Bio HT export, Beckman Vi-CELL XR report, ChemoMetec NucleoView NC-200 report Analyser readers. You map each test or result line to a metric.

A naive timestamp is read in the timezone you give at upload. A local time that does not exist or is ambiguous in that zone is refused, not shifted.

The upload rules and refusal codes are in backend/docs/UPLOAD.md.

What you can do with runs

  • Overlay offline assays on online data. The run's Data tab plots assay results on the same time axis as the online channels.
  • Compare runs. Overlay a channel across runs, aligned to inoculation, to induction, to each run's start or on clock time. A summary table gives the last, maximum, minimum or mean value, or the value at a time.
  • Curate with history. Mark a reading suspect or invalid, change a value, change a channel's metric or add a deviation note. Each curation is a recorded action that you can reverse. The raw and normalized values stay as ingested. When a source is reprocessed, fermPlot applies the eligible curations again and records why any could not apply.
  • Export a run bundle. One ZIP holds the run's time series, assay results, events, phases, source files, curation actions and a manifest with the run's data revision.
  • Find a growth window. fermPlot suggests an exponential window on a biomass channel.

Rates and other values that fermPlot calculates today do not correct for feed additions or sample withdrawals.

Studies, results and reports

  • Plan a study. Declare the factors, their levels and the replicates, attach runs, and calculate one result per run for each response (docs/contracts/study-planning.md).
  • Estimate effects. The Effects view of a study's Results tab fits one model to one response and estimates the effect of each factor against its reference level. When the design cannot support an answer, it gives a named refusal and no number: for example no residual degrees of freedom, a rank-deficient design or undeclared replicates (docs/contracts/study-effects.md).
  • Save a result. A saved result is a fixed snapshot of its definition and evidence. A refresh saves new evidence beside the old one (docs/contracts/artifacts.md).
  • Arrange a board. A board holds saved results and written notes. Each note pins the exact versions of the results it was written against (docs/contracts/boards.md).
  • Publish a report. Publishing a document board makes a frozen report edition. Each figure in it is pinned to the exact data behind it, and each written note cites the results it relies on. Only a person can publish (docs/contracts/report-publication.md).

AI assistants through MCP

make mcp-serve starts a local MCP server that a scientist's AI assistant runs on the scientist's own machine. Each tool call is one request to the fermPlot API under a delegated key that the scientist creates in fermPlot and can revoke. The key has a set of scopes and expires after at most 90 days. It never reaches beyond what the scientist can see.

The assistant can find studies and runs, query data, preview results, and draft studies, saved results and boards. It cannot publish, export, start a study, assign runs, change data or manage keys, so what it drafts waits for a person. docs/contracts/local-mcp.md has the rules and the three environment variables the server needs, and docs/contracts/mcp/ has the tool reference, which make mcp-guide regenerates.

Engineering

Stack

  • Backend: Python 3.13, FastAPI, SQLAlchemy 2, Alembic, PostgreSQL 16, pandas, NumPy, SciPy.
  • Frontend: React 19 single-page app built with Vite, TanStack Router, TypeScript strict, Tailwind CSS v4, shadcn/ui, Apache ECharts, TanStack Query and Table, Zod.
  • A worker process runs ingestion and background jobs from the same database.
  • Docker Compose for development and deployment, with nginx in front in production. alpha.fermplot.com runs the same images.

Architecture

docs/architecture.md explains how the parts connect in plain words. The main rules:

  • A workspace owns its private data. Metrics, units and organisms are global. A workspace or object you cannot see answers a generic 404.
  • Each write goes through one command runner. It takes an advisory lock, checks access again inside the transaction and stores a receipt, so a retry with the same idempotency key returns the stored result.
  • A reading has three layers: raw, normalized and curated.
  • Run, job and file status changes follow declared state machines. Database triggers refuse any other move.
  • Same-workspace links are enforced by the database, not only by application code.

docs/adr/ records the decisions behind these rules, and docs/contracts/ holds the rules themselves. GLOSSARY.md defines the domain terms.

Testing

  • Backend: pytest unit tests, and integration tests against a disposable PostgreSQL database per checkout.
  • Frontend: Vitest component and unit tests, and a Playwright browser journey on the production build.
  • Scientific regression: make ci-scientific runs a fixed synthetic profile through ingestion and evaluation and checks it against independent arithmetic and unit goldens. A changed result needs a new evaluator or resolver version, which marks stored results stale.
  • Contract conformance: golden tests per route against the OpenAPI document, and a generative sweep that runs nightly.
  • Analysis scoring: make analysis-scoring scores the analysis against the known truth of the synthetic data generator.
  • Clean clone: a pull request that changes the setup starts a fresh clone with the command above and draws a demo run in a browser.
  • Coverage: make coverage runs the backend unit and integration tests with coverage.py and writes an HTML report. CI does not run it.

Measured results

Each file in docs/evidence/ records one measurement with its commit, host and command.

Gates

make help lists every target.

  • make ci-fast: static checks and tests that need no services.
  • make test-changed BASE_REF=origin/main: the inner loop, the tests your diff selects.
  • make ci: the full gate. It needs the compose database (docker compose -f docker-compose.base.yml -f docker-compose.dev.yml up -d db).
  • make ci-pr BASE_REF=origin/main: the pull-request gate. It runs static checks, a set of core tests every change must keep, and the tests the diff selects.
  • A merge train runs every lane on the combined tree of queued pull requests before it merges them. Each commit the train merges to main carries its merge train status, which links the CI run that passed on that tree; the "checks on main" badge reads it.
  • Ratchets only tighten: code metrics, import contracts, a type-error baseline and the list of database commits outside the command runners.

Where things are

Path Contents
frontend/ React single-page app; frontend/README.md
backend/ FastAPI service; backend/README.md, backend/docs/API.md, backend/docs/DATABASE.md
docker/ Dockerfiles, nginx; docker/README.md for local Compose operation
docs/ Index in docs/README.md: contracts, ops runbooks, performance evidence, design
docs/design/ The interface's visual language; docs/design/README.md
AGENTS.md Rules for coding agents; CLAUDE.md is a one-line import of it

Contributing

Issues and questions go to the GitHub issue tracker. CONTRIBUTING.md says how to run the tests and what a pull request needs. Report a vulnerability as SECURITY.md says, not in an issue. CODE_OF_CONDUCT.md applies in every project space.

License

Apache-2.0. See LICENSE and NOTICE.

About

An open-source data platform that collects all the data a bioprocess run produces into one shared record that a lab team can plot, compare, analyze and publish from.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages