Doklo

leaf-web

Dok Hub

IA9Roles4Lexicon0Code mapping

Doks

Doks 7·Domains 7

All 7Needs review 2Active 5Stale 3
7 Doks shown

Admin

ADMIN-MODERATIONAdmin review moderation

Sign in

AUTH-SIGNINEmail and password sign-in

Sign up

AUTH-SIGNUPNew account registrationdrift

Reading circles

CIRCLESReading circle membership managementdrift

Reading journal

JOURNALBook reflection journal

Bookshelf

LIBRARYPersonal reading shelf tracker

Notifications

NOTICESClub update notificationsdrift
Read-only demo

Product preview

Dok Hub

You’re browsing a read-only sample workspace — a fictional reading-circle app, read by Doklo and reviewed by a person. Nothing here can be changed. Free to start: 40 credits on your first GitHub connection, and every repository’s first generation free (up to 30 Doks). Get started free · Back to doklo.io

JOURNALactivecritical

Book reflection journal

The reading journal lets signed-in members write a text reflection on a book they have finished, choosing public or private visibility and an optional spoiler flag, and lets any visitor browse the resulting community reflections. Spoiler-flagged reflections are hidden behind a reveal toggle until the reader chooses to show them.

Document details · v1
5 steps · 4 rules · 6 criteriaweb#reviews #reflections #journal #spoiler #reading
approved 2026-10-15
User flow 4Business rules 4Acceptance criteria 6

User flow

4
  1. 01

    member

    Open the reading journal to see community reflections

    Result

    The page shows the list of existing reflections (reviews) with book title, date, author name, and a count of how many reflections exist; if not signed in, a sign-in prompt is shown above the list

    Interaction details
    • all · navigate
  2. 02

    member

    Write a reflection on a finished book

    Result

    The member picks a book, chooses visibility (PUBLIC or PRIVATE), optionally marks the entry as containing a spoiler, enters reflection text (up to 1000 characters) and publishes it; on success the form is cleared and the reflection appears in the list

    Starts when · Member is signed in · The selected book is marked FINISHED on the member's shelf

    Interaction details
    • desktop · submit
    • mobile · submit
  3. 03

    member

    Update a previously written reflection for the same book

    Result

    Submitting the form again for a book the member already reflected on replaces the existing reflection's text, visibility, and spoiler flag instead of creating a second entry

    Starts when · Member already has a reflection saved for that book

    Interaction details
    • all · submit
  4. 04

    member

    Read the content of a spoiler-flagged reflection

    Result

    The reflection text is hidden behind a spoiler warning notice until the reader clicks to reveal it, after which the full text is shown and can be hidden again

    Starts when · The reflection is marked as containing a spoiler

    Interaction details
    • all · click

Business rules

4

Policies and constraints the product must keep.

  • 01PermissionBR-JOURNAL-01

    Only an authenticated member with a valid session can submit a reflection; otherwise the request fails with status 401 and error code UNAUTHENTICATED.

    Rule scope and code anchor

    Roles · ROLE-MEMBER, ROLE-USER

    Linked criteria 2Criterion 01Criterion 02
    Read linked criteria here
    • AC-JOURNAL-01A signed-in member who has finished a book can submit a reflection for it and receives a successful result (status 200), after which the form clears and the reflection is listed.
    • AC-JOURNAL-02An unauthenticated submission attempt is rejected with status 401 and error code UNAUTHENTICATED.
  • 02RestrictionBR-JOURNAL-02

    A reflection can only be submitted for a book the member has marked FINISHED on their shelf; otherwise the request fails with status 409 and error code REVIEW_REQUIRES_FINISHED.

    Rule scope and code anchor

    Roles · ROLE-MEMBER

    Linked criteria 2Criterion 01Criterion 03
    Read linked criteria here
    • AC-JOURNAL-01A signed-in member who has finished a book can submit a reflection for it and receives a successful result (status 200), after which the form clears and the reflection is listed.
    • AC-JOURNAL-03A reflection submitted for a book the member has not finished is rejected with status 409 and error code REVIEW_REQUIRES_FINISHED.
  • 03ValidationBR-JOURNAL-03

    Reflection text must be a non-empty string (after trimming) of at most 1000 characters, visibility must be either PUBLIC or PRIVATE, and the spoiler flag must be a boolean; any violation produces a VALIDATION error.

    Rule scope and code anchor

    Roles · ROLE-MEMBER

    Linked criteria 1Criterion 04
    Read linked criteria here
    • AC-JOURNAL-04A reflection with empty text, text longer than 1000 characters, an invalid visibility value, or a non-boolean spoiler flag is rejected with a VALIDATION error.
  • 04PolicyBR-JOURNAL-04

    A member can hold at most one reflection per book; resubmitting for the same book overwrites the stored text, visibility and spoiler flag rather than creating a duplicate entry.

    Rule scope and code anchor

    Roles · ROLE-MEMBER

    Linked criteria 1Criterion 05
    Read linked criteria here
    • AC-JOURNAL-05Resubmitting a reflection for a book the member already reviewed updates the existing reflection's text, visibility, and spoiler flag instead of adding a second entry.

Acceptance criteria

6

Expected outcomes. These entries do not claim a test was run or passed.

  1. 01CriterionAC-JOURNAL-01

    A signed-in member who has finished a book can submit a reflection for it and receives a successful result (status 200), after which the form clears and the reflection is listed.

    Linked rules 2Rule 01Rule 02
  2. 02CriterionAC-JOURNAL-02

    An unauthenticated submission attempt is rejected with status 401 and error code UNAUTHENTICATED.

    Linked rules 1Rule 01
  3. 03CriterionAC-JOURNAL-03

    A reflection submitted for a book the member has not finished is rejected with status 409 and error code REVIEW_REQUIRES_FINISHED.

    Linked rules 1Rule 02
  4. 04CriterionAC-JOURNAL-04

    A reflection with empty text, text longer than 1000 characters, an invalid visibility value, or a non-boolean spoiler flag is rejected with a VALIDATION error.

    Linked rules 1Rule 03
  5. 05CriterionAC-JOURNAL-05

    Resubmitting a reflection for a book the member already reviewed updates the existing reflection's text, visibility, and spoiler flag instead of adding a second entry.

    Linked rules 1Rule 04
  6. 06CriterionAC-JOURNAL-06

    A reflection marked as a spoiler displays a warning notice instead of its text until the reader toggles it open, and can be hidden again afterward.

    Linked rules 0
Source files 21
  • page.tsx
  • LeafProvider.tsx
  • useLeafState.ts
  • useLeafLocale.ts
  • locale.ts
  • layout.tsx
  • headings.tsx
  • store.mjs
  • initial-state.mjs
  • password.mjs
  • action-support.ts
  • domain-error.mjs
  • session.mjs
  • validation.mjs
  • types.ts
  • FeatureFrame.tsx
  • journal.tsx
  • reviews.tsx
  • actions.ts
  • reviews.mjs
  • actionView.ts

Source anchors are injected deterministically. No GitHub repository is connected. File links are unavailable.

Hub context & agents

Hub trust

Doks
7
Source anchors
133
Model-generated anchors
0
Average confidence
—

Source anchors are injected deterministically. This is not a check of every statement in a Dok.

Agents query this hub

doklo.get_dok("JOURNAL")

Book reflection journal
5 steps · 4 rules · 6 criteria
is_stale: false
anchors: 21 files

search_doks · get_dok · list_doks

Cursor and Claude Code can use Doklo’s MCP tools to read Doks and their code references.

Storage

Your Hub lives in Doklo Cloud, reviewed here and used by agents and published docs. Sync back to your own git is on the roadmap.

On this Dok

User flowBusiness rulesAcceptance criteria

Evidence

21 source files recorded for this Dok.

View source files →

Document

Version 1

web · critical

About this status

Approved 2026-10-15. Approval and source freshness are separate facts.

Tracked source files match the recorded baseline.

Hub context & agents →