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.
How it works
- You send a
prompt(Doconda writes the page) or your owncontentin Markdown (Doconda turns it into the page, keeping your text). - Doconda builds one HTML file, with its pictures inside, made for desktop and phone. The page saves its data through
doconda.db. - When it is
ready,outputshas anhtmloutput whoseurlis the page. - Doconda serves the page on its own subdomain until the artifact’s retention ends.
Create an artifact
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.
Configuration
Where it stores its data
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.
Share the link
Thehtml output’s url never changes and works until the artifact’s expires_at. Share it, or embed it in your
product:
allow-same-origin refers to that subdomain. To take the page down sooner, delete the artifact with
DELETE /documents/{id}.
Save data from the page
Doconda addswindow.doconda.db to the page. It stores JSON by collection and key:
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,subscribeand 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 (fromcdnjs.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
shareddata 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. Withretention: "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.