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

AUTH-SIGNUPactivestale — code movedcritical

New account registration

Visitors create a new account on the /register screen by supplying a name, email and password; a successful submission creates a MEMBER-role account, starts a 7-day session, and signs the visitor in immediately. Invalid input or an already-registered email is rejected with a specific error instead of creating an account.

Document details · v1
5 steps · 4 rules · 4 criteriaweb#signup #registration #authentication #session #validation
approved 2026-10-03

Drift detectedapp/register/actions.ts — This dok may no longer match the code beneath it.

User flow 2Business rules 4Acceptance criteria 4

User flow

2
  1. 01

    user

    Switch the authentication panel to registration mode

    Result

    The form reveals a name field in addition to email and password, and the panel heading reads "register" (register).

    Interaction details
    • all · click
  2. 02

    user

    Submit name, email and password to create a new account

    Result

    The request is sent to the sign-up action with the entered name, email and password.

    Interaction details
    • all · submit

Business rules

4

Policies and constraints the product must keep.

  • 01ValidationBR-AUTH-SIGNUP-01

    Registration requires a name between 2 and 40 trimmed characters, an email matching a standard local@domain.tld pattern, and a password between 8 and 128 characters; otherwise the request is rejected with status 400 and error code VALIDATION.

    Linked criteria 2Criterion 01Criterion 03
    Read linked criteria here
    • AC-AUTH-SIGNUP-01When a visitor submits a name of 2-40 characters, a valid-format email, and a password of 8-128 characters that is not already registered, the account is created with role MEMBER, a session cookie is set, and the response is ok:true with status 200.
    • AC-AUTH-SIGNUP-03When the name, email format, or password length fails the stated bounds, the response is ok:false with status 400 and error code VALIDATION, and no account is created.
  • 02RestrictionBR-AUTH-SIGNUP-02

    The email address (trimmed and lower-cased) must be unique among existing accounts; registering with an email already in use is rejected with status 409 and error code EMAIL_EXISTS.

    Linked criteria 1Criterion 02
    Read linked criteria here
    • AC-AUTH-SIGNUP-02When the submitted email already belongs to an existing account, the response is ok:false with status 409 and error code EMAIL_EXISTS, and no new account is created.
  • 03PolicyBR-AUTH-SIGNUP-03

    Every account created through registration is assigned the MEMBER role; no other role can be selected at signup.

    Linked criteria 1Criterion 01
    Read linked criteria here
    • AC-AUTH-SIGNUP-01When a visitor submits a name of 2-40 characters, a valid-format email, and a password of 8-128 characters that is not already registered, the account is created with role MEMBER, a session cookie is set, and the response is ok:true with status 200.
  • 04PolicyBR-AUTH-SIGNUP-04

    A successful registration immediately starts an authenticated session for the new account via a 7-day (604800-second) httpOnly session cookie, and any unexpected failure not covered by a known validation or duplication error returns status 500 with error code INTERNAL.

    Linked criteria 2Criterion 01Criterion 04
    Read linked criteria here
    • AC-AUTH-SIGNUP-01When a visitor submits a name of 2-40 characters, a valid-format email, and a password of 8-128 characters that is not already registered, the account is created with role MEMBER, a session cookie is set, and the response is ok:true with status 200.
    • AC-AUTH-SIGNUP-04After a successful registration the session cookie expires after 7 days (604800 seconds), after which the visitor must sign in again.

Acceptance criteria

4

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

  1. 01CriterionAC-AUTH-SIGNUP-01

    When a visitor submits a name of 2-40 characters, a valid-format email, and a password of 8-128 characters that is not already registered, the account is created with role MEMBER, a session cookie is set, and the response is ok:true with status 200.

    Linked rules 3Rule 01Rule 03Rule 04
  2. 02CriterionAC-AUTH-SIGNUP-02

    When the submitted email already belongs to an existing account, the response is ok:false with status 409 and error code EMAIL_EXISTS, and no new account is created.

    Linked rules 1Rule 02
  3. 03CriterionAC-AUTH-SIGNUP-03

    When the name, email format, or password length fails the stated bounds, the response is ok:false with status 400 and error code VALIDATION, and no account is created.

    Linked rules 1Rule 01
  4. 04CriterionAC-AUTH-SIGNUP-04

    After a successful registration the session cookie expires after 7 days (604800 seconds), after which the visitor must sign in again.

    Linked rules 1Rule 04
Source files 19
  • 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
  • auth.tsx
  • actions.tschanged
  • auth.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("AUTH-SIGNUP")

New account registration
5 steps · 4 rules · 4 criteria
is_stale: true
anchors: 19 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

19 source files recorded for this Dok.

View source files →

Document

Version 1

web · critical

About this status

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

Source changes were detected.

Hub context & agents →