# Sudo

> Realtime website generator

Published: 2025/06/01 • Author: Surya Dantuluri • Canonical: https://sdan.net/projects/sudo

Sudo streams and renders interfaces generated just-in-time.

user intent -> app will be created on the fly. right now it’s 3 months with a team of ~3. soon ~1 and 1 minute.

```
# Jan 2026 (in 2025 the pages were at /generate/<slug>)
URL | `how-gears-…`
Prompt | How Gears … | in the browser
POST | `/api/completion`
Model | `{ html }` | one typed object
```

```
const result = streamObject({
  model: google(
    MODEL_CONFIG.model),
  mode: 'json',
  system: systemPrompt,
  prompt,
  schema: htmlSchema,
});
```

```
# The model's JSON streams back as plain text; an iframe, rewritten with every chunk; nothing saved
fixJson | closes `"` then `}`
JSON.parse | `{ html }`
doc.write, doc.close | the HTML parser closes the open tags | a page, already colored, under the veil
```

```
doc.open();
doc.write(html);
doc.close();
```

```
# As the HTML grows, all of it blurred, under a fading white veil
Blurred | `24 - length/350` px | from the first character
Clear | 8,400 characters | or when the stream ends

# CSS in the head, as the schema asks; the script usually last, the model's habit
`<style>` | colors, layout
`<body>` | panels
`<script>` | cut off, it waits
`</script>` | it runs | the canvas draws
```

← [Surya Dantuluri](https://sdan.net/)

Next [Mirador](https://sdan.net/projects/computer-use) →
