Build a Website on InfiniteOcean
Store pages as drops, serve them with entity reads. This tutorial — and the entire infiniteocean.io website — is stored this way.
POST /exec or paste directly into the live editor.
1The Idea
Traditional websites need a web server, a build pipeline, and a deploy process. With InfiniteOcean, your pages are the database. Write HTML as a drop, read it back to serve. Update a page? Write a new drop. No restart, no redeploy, instant.
Every page is just a key-value entity. The key is the page name, the payload is the HTML. The append log keeps every version, so you get history for free. The entity read always returns the latest.
2Write Your First Page
A single write creates your page. The payload is raw HTML — whatever you put in, you get back out.
write my-site @index "<!DOCTYPE html><html><head><title>My Site</title></head><body><h1>Hello, Ocean!</h1><p>This page is a drop.</p></body></html>"
- route
- Like a folder. Groups related pages together.
- key
- Like a filename. Identifies this page within the route.
- payload
- The raw HTML string. Whatever you write here is what gets served.
3Read It Back
Use the read command to get the latest version of your page:
read my-site @index
This returns the entity object with the payload field containing your HTML. In a server, you would extract response.payload and serve it with Content-Type: text/html. The read command always returns the latest version — no cache busting, no stale reads.
4Update Instantly
To update a page, write with the same route and key. That is the entire deploy process.
write my-site @index "<!DOCTYPE html><html><head><title>My Site</title></head><body><h1>Hello, Ocean!</h1><p>Updated at 2026-02-10. No deploy needed.</p></body></html>"
The entity read now returns the updated version. The old version is still in the append log — you get versioning for free. Every write is recorded, nothing is overwritten, and you can always query the history.
5Multiple Pages
A website is just multiple keys under the same route. Different pages use different keys. Nested routes work like subdirectories.
-- About page
write my-site @about "<html>..."
-- Blog post
write my-site/blog @first-post "<html>..."
- my-site/about
- The about page, at the top level of your site route.
- my-site/blog/first-post
- A blog post, nested under a blog sub-route.
You can have as many pages as you want. Each is independent — updating one does not affect the others.
6Serve with View
InfiniteOcean has a built-in view server at view.infiniteocean.io that serves entity payloads as web pages directly — no custom server needed. Any entity with an HTML payload can be viewed in a browser by visiting its view URL.
For production sites, you can attach a custom domain via the domains API:
curl -X POST https://api.infiniteocean.io/domains \
-H "Content-Type: application/json" \
-H "X-Ocean-Key: YOUR_KEY" \
-d '{"domain": "mysite.com", "route": "my-site"}'
TLS certificates are provisioned automatically. Once DNS is pointed, your custom domain serves pages straight from InfiniteOcean with no infrastructure to manage.
7How infiniteocean.io Does It
This is not a theoretical pattern. The actual infiniteocean.io website uses this exact approach. Every page — the landing page, the docs, the dashboard, this tutorial — is stored as a drop in the _site route.
Writing a new page is a single command:
-- Write the tutorials page
write _site @tutorials "<!DOCTYPE html><html>...full page HTML...</html>"
-- Read it back
read _site @tutorials
Every page on the site is just a key under the _site route: index, dashboard, docs, tutorials, and so on. To update any page, write with the same key. To add a new page, write with a new key. No restart, no redeploy.
This pattern scales from a single-page landing site to a full application with dozens of routes. Every revision is preserved automatically. Rollback is reading an older drop. Deployment is a single write command.