Skip to main content
An artifact is a document with format: "artifact": instead of a Word file or a PDF, Doconda delivers a web page that stores data. What the page saves persists between visits. This is useful for:
  • Polls, sign-up sheets and team lists that several people fill in.
  • Calculators, planners and drafts that each visitor keeps for themselves.
  • Small dashboards built from the data in your files.
An artifact is created, listed, followed and billed like any other document, at its quality level. It is private to your project: you decide who gets the link.

How it works

  1. You send a prompt (Doconda writes the page) or your own content in Markdown (Doconda turns it into the page, keeping your text).
  2. Doconda builds one HTML file, with its pictures inside, made for desktop and phone. The page saves its data through doconda.db.
  3. When it is ready, outputs has an html output whose url is the page.
  4. Doconda serves the page on its own subdomain until the artifact’s retention ends.

Create an artifact

The script prints the page’s link. Both modes work, direct and background. The style, in your own words, describes how the page looks. In sources, as with the other formats:
  • Documents (Word, Excel, PDF and others, up to 5, only with prompt): the page is built from their real data.
  • Pictures (PNG, JPEG, GIF or WebP, up to 10): they go inside the page, made smaller. With content, point to them from the Markdown as ![caption](img:1).
The whole page is 900 KB at most. Pictures that don’t fit are left out of the page.

Configuration

Where it stores its data

The page is the same in both modes: it calls doconda.db, and Doconda decides where the data goes. artifact is only valid with format: "artifact"; on another format the request is rejected with 422 input_invalid. The html output’s url never changes and works until the artifact’s expires_at. Share it, or embed it in your product:
Each artifact is served on its own subdomain, isolated from your website, from Doconda and from other artifacts. allow-same-origin refers to that subdomain. To take the page down sooner, delete the artifact with DELETE /documents/{id}.
Anyone with the link can open the page, and in shared storage, save data to it, until it expires. Give it only to the people who should use it.

Save data from the page

Doconda adds window.doconda.db to the page. It stores JSON by collection and key:
Doconda writes the page to use these calls; you only need them to understand or change it. In local storage the same calls save to the browser’s localStorage.

Read the data from your program

GET /documents/{id}/data lists the collections and their record counts; GET /documents/{id}/data/{collection} returns the collection’s 1,000 most recent records. A local artifact answers 409 artifact_is_local, and a document that isn’t an artifact answers 409 not_an_artifact.

Limitations

  • Names: collection and key names use letters, numbers, _, - or ., up to 64 characters.
  • Size: each record up to 16 KB of JSON (413 record_too_large); each artifact up to 5,000 records (409 too_many_records).
  • Lists: list, subscribe and the API return a collection’s 1,000 most recent records.
  • Rate: per artifact and minute, up to 1,200 reads and 120 writes. Above that, 429 rate_limited.
  • What the page can load: Tailwind (cdn.tailwindcss.com), Chart.js 4.4.1, d3 7.8.5 and dayjs 1.11.10 (from cdnjs.cloudflare.com) and Google Fonts. It can only call its own address. The browser blocks any other script, style, font, picture or request; links can still open other sites.
  • What the page can’t do: external APIs, email, payments or sign-in.
  • Data residency: the page and its shared data are stored in the European Union (Ireland).

How long it lasts

An artifact lasts as long as its retention: 30 days by default, 90 at most. Then its data is deleted, and its link shows a short “This page is no longer available” page in the visitor’s language (HTTP 410); a wrong link shows the same page with a 404. To keep it longer, create it again. With retention: "none", an artifact can only be local, and Doconda doesn’t host it. Its html output is an artifact.html file for you to host on your own website, deleted from Doconda 15 minutes after it is made. That file carries none of the loading limits above, and its data stays in each visitor’s browser.

Next steps

Describe the style

Set the look of the page in your own words.

Choose the retention

Decide how long the page stays online.