Technical
How the site is built, and the reasoning behind the choices a future maintainer will inherit.
Stack
Python, FastAPI, SQLAlchemy, Jinja2 templates, one hand-written stylesheet. SQLite for development, PostgreSQL in production — the only difference is a connection string.
There is no front-end build step. No bundler, no framework, no node_modules.
Pages are rendered server-side and progressively enhanced by a single small
script for the structure viewer, which is optional.
Why it looks like this
The binding constraint is that one to two part-time developers maintain it, indefinitely. Every choice above follows from that:
- Server-rendered HTML because a page that works without JavaScript has fewer ways to break and fewer things to keep up to date.
- No build step because a build step is a second system that rots independently of the first, and rots fastest when nobody has touched the project for six months.
- One CSS file because changing a colour should not require installing a toolchain.
- Few dependencies, each one something a maintainer would have written worse by hand.
Three API surfaces, one implementation
The REST core, the /ff/ client surface and the XML-RPC adapter are three
presentations of the same service functions. Neither compatibility surface
contains logic of its own — that is what stops them drifting apart, and it is
what makes the XML-RPC adapter genuinely deletable on its sunset date rather
than quietly permanent.
Accessibility
Targeting WCAG 2.2 AA. In practice: semantic HTML, a skip link, visible focus indicators, 24×24 px minimum hit targets, contrast checked in both light and dark themes, and nothing that conveys meaning by colour alone.
Net record pages draw their topology as inline SVG, computed in the browser from the geometry the record serves. It is a few hundred lines in this repository rather than a third-party bundle, it makes no external request, and it handles the thing a molecular viewer gets wrong for nets: an edge that leaves the unit cell is drawn into the periodic image it actually crosses to, not stretched across the cell to the wrong vertex.
It rotates by drag and by arrow key, because a control that only answers a
pointer is unusable without one. Every element carries a <title>, and the
figure has a caption stating in words what the drawing shows — vertex and edge
counts, how many edges leave the cell, what the two vertex shapes mean. Cell
parameters, coordination numbers and download links are in the page as text
whether or not the drawing renders. The canvas is never the only way to learn
what a record contains.
A molecular viewer is a separate, optional slot for building blocks and
framework structures, which are hundreds to thousands of atoms rather than tens
of vertices. Nothing is loaded from a CDN; see
src/mofpp/static/vendor/README.md.
External requests
The site makes none on your behalf. No analytics, no fonts from a third party, no CDN scripts. The structure viewer, when enabled, is served from this domain. See Privacy.
Source and licence
The code is MIT-licensed. Data is licensed per record, by default CC BY 4.0 — see Licensing.