Skip to content

Build with AI

Give an AI assistant the NMRLink documentation to help build your own Web UI. The llms.txt file collects installation instructions, APIs, examples and device operation constraints.

On this page

Share llms.txt

Give your assistant this URL together with a description of what you want to build.

text
https://masabando.github.io/nmrlink/llms.txt

Open llms.txt. Whether a URL is fetched automatically depends on the assistant and its tools. If it cannot read the URL, paste the text into the conversation or attach it as a text file.

Prompt for static HTML

This uses Live Server or another static server without a build step, with the folder layout shown in installation.

text
Read this documentation and build a Web UI using NMRLink:
https://masabando.github.io/nmrlink/llms.txt

Use index.html beside a nmrlink/ folder containing all files from packages/nmrlink/src.
Serve with Live Server, without npm or a build step.
Import from ./nmrlink/index.js, ./nmrlink/graphs.js and ./nmrlink/browser.js.

Include:
- Connect/disconnect, measurement settings and Single measurement
- FID/FFT graphs and JSON save/load
- Buttons reflecting operation state, plus error messages

Use NMRController and the NMRLink analysis, graph and save APIs.
Request the port from a user click. Do not measure or resend commands automatically.
Explain that initial settings are examples to be checked for the apparatus and sample.
Keep the current record and graphs if a JSON import fails.
Do not overwrite existing files. Provide the HTML, folder layout and startup instructions.

Prompt for npm

text
Read this documentation and build a Vite browser app:
https://masabando.github.io/nmrlink/llms.txt

Install with npm install nmrlink and use nmrlink, nmrlink/graphs and nmrlink/browser.
Include connect/disconnect, Single measurement, FID/FFT and JSON save/load.
Use NMRController for state and errors. Do not reimplement serial communication or FFT.
Connect from a user click; do not measure or resend commands automatically.
Provide simulated data for checking the UI without hardware, clearly separate from real measurements.
Explain disconnecting, unsubscribing and disposing graph observers when removing a view.
Provide the files, dependencies and startup instructions.

For an existing project, specify the framework and files you want to change. NMRLink is framework independent. In Next.js, browser API operations belong on the client side.

Check the generated UI

  1. Use simulated data to check the layout, inputs, analysis, save/load and error handling.
  2. Prepare compatible hardware, a supported browser and HTTPS or localhost on the same PC.
  3. Check frequency, RF cycle counts, phases, repetition interval and scan count for the apparatus and sample.
  4. Check for unintended automatic measurements or retries before operating the instrument.

A successful simulated preview does not verify hardware operation. NMRLink cannot stop an ongoing measurement immediately. Remote operation is unverified in a real environment; begin with a direct connection.

When troubleshooting, share the error message, relevant code, OS, browser and serving method. Check generated API names and arguments against the documentation.

Related examples