Interactive Three.js nutrient relationship graph with live slider-driven updates, animated directional edges, and a server-persisted relationship table.
npm install
npm run dev- Frontend: http://localhost:5173
- API: http://localhost:4321
The editable nutrient relationship table is stored in data/mulders-graph.json.
- The server reads the file on startup.
- The UI saves changes back through
PUT /api/graph. - Override the storage path with
GRAPH_DATA_FILE=/absolute/path/to/mulders-graph.json. - If the target file does not exist yet, the server seeds it from the bundled
data/mulders-graph.json.
This app is set up to run on Render as a single Web Service with a persistent disk for the editable graph JSON.
render.yamldefines the Web Service.- The app builds with
npm install && npm run build. - The runtime uses
npm run start. - Graph edits are stored on the mounted disk via
GRAPH_DATA_FILE=/var/data/mulders-graph.json.
- Push this project to GitHub.
- In Render, create a new Blueprint from the repository, or create a Web Service manually.
- If using the included blueprint, Render will provision:
- a Web Service
- a persistent disk mounted at
/var/data
- Deploy the service.
- On first boot, the server copies the bundled seed data into the persistent disk file if it is missing.
- Future edits made in the UI are written to the persistent disk copy, so they survive restarts and redeploys.
- If you later move to your own production stack, replace
GRAPH_DATA_FILEwith a database-backed persistence layer.
src/: React UI and Three.js sceneserver/: Express API for graph persistencedata/: nutrient nodes and relationship rules.vscode/: basic VS Code tasks and extension recommendations