These implementation notes describe my original Shatimi website, built with static HTML, CSS and JavaScript.
The first community API resolved every visitor through the same profile helper. That helper created a guest profile when no signed cookie existed. Because the browser requested account state on page load, reading a page unexpectedly became a database write.
The fix separated lookup from creation. The account endpoint now returns person: null for a new guest. Public comment reads use an optional signed identity to mark the visitor’s own comments, without allocating a profile.
Only a comment submission can create a guest profile. The API validates input first, sends the comment through database moderation checks, and sets the identity cookie after the write succeeds. A failed submission cleans up its newly created unused profile.
The client now waits until the comment section approaches the viewport before loading it. Account state and the first comment page load concurrently. The write response supplies the new comment, so posting no longer waits for a second full read.
Regression tests verify that browsing leaves both profile count and guest cookies unchanged, that the first successful comment creates one identity, and that subsequent reads preserve its name. These checks cover behavior rather than relying on a faster-looking animation.