Write the code yourself

Paste or type HTML or React in the code view, use several files, see problems as you type, preview before saving and save a version with Cmd or Ctrl+S.

You do not have to use the AI builder. In an app note you can type or paste your own HTML or React code, split it into several files, and see it run before you save. The AI builder and the code editor work on the same files, so you can mix them: let the AI start, then edit by hand, or the reverse.

Open the code view

  1. Open a note and choose App.

  2. In the toolbar, choose View code. Choose View the app to go back to the running app.

  3. Type or paste your code. A new app starts with a short starter page that says What are we going to build today?.

  4. Press Cmd+S (Ctrl+S on Windows and Linux). The first save creates the app, with your code as its first version. Every later save makes a new version.

The code view: files, editor and problems.

HTML or React

Above the editor a quiet line says how your code will run, for example Runs as React (App.jsx) or Runs as HTML (index.html), and why. SeeMyNotes decides from your code:

If it guessed wrong, choose Change and then Run as HTML, Run as React or Detect from the code. Switching renames the entry file and keeps your code.

SeeMyNotes shows how the code will run and lets you change it.

Several files

Open the file list to add files.

In React apps, files import each other with relative paths. A .css file you import becomes a style, a .json file becomes data. In HTML apps, files link to each other normally: <script src="js/app.js">, <link rel="stylesheet" href="css/site.css"> and links to other pages.

A server function lives in server/api.js or server/api.ts; it is not part of the page. See Server functions.

Samples

A React app with one file:

import { useState } from 'react';
import { Heart } from 'lucide-react';

export default function App() {
  const [likes, setLikes] = useState(0);
  return (
    <main style={{ fontFamily: 'Inter, sans-serif', padding: 24 }}>
      <h1>My first app</h1>
      <button onClick={() => setLikes(likes + 1)}>
        <Heart size={16} /> {likes}
      </button>
    </main>
  );
}

An HTML app with one file:

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Tip calculator</title>
  </head>
  <body>
    <label>Bill <input id="bill" type="number" value="40"></label>
    <p>Tip at 10 percent: <strong id="tip"></strong></p>
    <script>
      const bill = document.getElementById('bill');
      const tip = document.getElementById('tip');
      const update = () => { tip.textContent = (Number(bill.value) * 0.1).toFixed(2); };
      bill.addEventListener('input', update);
      update();
    </script>
  </body>
</html>

Problems as you type

A syntax or build problem appears under the editor as Problems in the code, with the file, line and column, for example "line 12, column 5". Choose one to jump to the line. A save that fails and names a line shows it the same way. When the preview cannot run, it shows the problem instead of a blank page.

Problems with file, line and column.

Preview before you save

The preview next to the editor runs your unsaved code with the same transformation as the real build, so what you see is what saving produces. It runs in a locked frame that can load libraries only from the SeeMyNotes mirror. Links to other pages of your app open inside the preview; Back to index.html takes you back.

Libraries

Your code can import only libraries from the library catalog, such as React, Tailwind, shadcn/ui, lucide-react, Recharts, D3 or Papa Parse. An import of anything else is refused when you save, with a message that names the library and points to the catalog. Scripts loaded by web address are rewritten to the SeeMyNotes mirror when they are catalog libraries and refused otherwise.

The helper and data

Every app can use the smn helper to read its variables, call configured services and use its database. See the helper reference. A database, its tables and the operations visitors may run are created with the AI builder: describe them in a message, then call them from your code. See App data.

Versions

Each save is a new version, checked like any other version before it goes live. Restore earlier ones from History. See History, checkpoints and export. There is a limit on how many versions you can make per hour and per day; the editor tells you if you reach it.

Related pages