How .work/prototype/ is organised: two live prototypes (A Evolve and C Production line) on one shared mock data set and a few shared helpers. Plain HTML, CSS and JavaScript, no build step and no framework. Each page opens from file:// or from the local no-cache server.
../data.js puts the mock data on window.PMT_DATA, the helpers on window.PMTcore.js sets up state, the router and render()views.js registers the pagessheets.js registers the side sheetsflows.js adds the demo panel and guided flowsshared/*.js enhancers watch the DOM after every renderClassic scripts sharing one global namespace, so the files open straight from disk with no bundler. A and C keep the same file split, so a change in one is easy to carry to the other.
The demo panel, the guided flows, the self-tests and the screenshot scripts exist only for reviews. The real app lives in repo/ and is rebuilt from the approved Final row.
a/Prototype A · Evolvecore.js→views.js→sheets.js→flows.jsc/Prototype C · Production linecore.js→views.js→sheets.js→flows.jsEach prototype only depends downward: on the shared folder, never on the other prototype. A change in shared/ or data.js reaches A and C at once.
flowchart LR url["URL hash<br/>#/as/persona/route"] --> router["core.js<br/>router"] router --> render["render()"] render --> shell["top bar · side panel<br/>core.js + views.js"] render --> page["page view<br/>views.js"] render --> sheet["sheet layer<br/>sheets.js"] render --> lab["demo panel<br/>flows.js"] shell --> ev["one click and input handler<br/>core.js"] page --> ev sheet --> ev ev --> act["action, e.g. save update<br/>A.acts / ACT"] act --> state["state S + mock data D"] state --> render render -. DOM changed .-> enh["shared enhancers<br/>custom select · panel resize"]
The whole app re-renders from state on each action; there is no partial DOM patching. The enhancers rebuild their controls after every render through a MutationObserver.
| File | Responsibility | A lines | C lines |
|---|---|---|---|
core.js | State, router, render loop, top bar, events, sheet engine, toasts, icons, variations | 676 | 654 |
views.js | Home, project, tool, search, companies, users, activity, help, profile; tools toolbar and table, board, phases, timeline; side panel | 936 | 842 |
sheets.js | Approve, thread, new message, upload, update phase, add tool, new project, new company, delete company, invite, access | 678 | 555 |
flows.js | Demo panel: personas, Controls switch, variations, guided flows | 225 | 222 |
app.css (A: + r6-sheets.css) | Tokens, layout, components; one control radius token for fields and buttons | 1,213 | 1,212 |
tests | Self-test that clicks through every flow and checks layout rules | 458 | 416 |
data.js | Shared: 4 projects, 61 tools, phases, messages, files, accounts, audit log | 415 shared | |
shared/*.js | Shared: custom select (174), side panel resize (54) | 228 shared | |