Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ api/
│ │ ├── info.ts # GET /info
│ │ ├── brand.ts # GET /favicon.ico, /favicon.svg, /apple-touch-icon.png
│ │ ├── auth.ts # Passkey: /auth/passkey/register|authenticate begin/finish
│ │ ├── me.ts # GET /me; POST /me/name; POST /me/forum-laws-dismissed; POST /me/rules-agreement; link/unlink + address verification
│ │ ├── me.ts # GET /me; POST /me/setup/skip; POST /me/name; POST /me/forum-laws-dismissed; POST /me/rules-agreement; link/unlink + address verification
│ │ ├── members.ts # GET /members/:accountId (Bearer; live identity + profile note)
│ │ ├── view.ts # GET /view/:viewKey (public profile card)
│ │ ├── lightning-address.ts # GET /lightning-address (public LUD-16 resolve)
│ │ ├── debug.ts # GET/POST /debug/accounts; PATCH /debug/accounts/:id; POST /debug/accounts/:id/session (DEBUG_TOKEN)
Expand Down Expand Up @@ -93,7 +94,9 @@ api/
│ │ ├── nostr/ # Custodial nsec, kind:0/1/10002 worker, NIP-17/kind:4 DMs, NIP-57 zap, write-set relays
│ │ └── auth/
│ │ ├── account-json.ts # Public account JSON (no nsec)
│ │ ├── account-setup.ts # Next owner setup step (name, Lightning Address, rules)
│ │ ├── account-setup.ts # Next owner setup step + factual missing fields
│ │ ├── requirements.ts # Action→fields gates (`requireAction`)
│ │ ├── profile-message.ts # First-name profile forum note (`ensureProfileMessage`)
│ │ ├── hex.ts # CSPRNG hex tokens
│ │ ├── passkey.ts # WebAuthn register/authenticate domain logic
│ │ ├── service.ts # Session issuance and bearer resolution
Expand Down Expand Up @@ -152,6 +155,8 @@ api/
│ │ └── auth/
│ │ ├── account-json.test.ts
│ │ ├── account-setup.test.ts
│ │ ├── requirements.test.ts
│ │ ├── profile-message.test.ts
│ │ ├── hex.test.ts
│ │ ├── passkey.test.ts
│ │ ├── service.test.ts
Expand All @@ -167,6 +172,7 @@ api/
│ ├── brand.test.ts
│ ├── auth.test.ts
│ ├── me.test.ts
│ ├── members.test.ts
│ ├── lightning-address.test.ts
│ ├── debug.test.ts
│ ├── stats.test.ts
Expand Down
29 changes: 19 additions & 10 deletions FLOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,20 @@ Login is passkey-only. LNURL-auth has been removed.

The signed-in view currently lives on `/login` — there is no separate
`/profile` route yet. It shows a name form, a Lightning Address form, and
**Sign out**.
**Sign out**. Name and Lightning Address are each skippable via
`POST /me/setup/skip`; living-room rules stay required.

After name and address, the app records living-room rules agreement via
`POST /me/rules-agreement`. `GET /me` carries `rulesAgreedAt` (epoch ms of
After name/skip and address/skip, the app records living-room rules agreement
via `POST /me/rules-agreement`. `GET /me` carries `setup` (wizard; skip counts
as done), `missing` (facts; skip does not), and `rulesAgreedAt` (epoch ms of
the first agreement, or `null`).

No email, no password. Losing the passkey (and platform sync) loses the
account.

HTTP cited: `/auth/passkey/register/begin`, `/auth/passkey/register/finish`,
`/auth/passkey/authenticate/begin`, `/auth/passkey/authenticate/finish`,
`/me`, `/me/name`, `/me/rules-agreement`.
`/me`, `/me/setup/skip`, `/me/name`, `/me/rules-agreement`.

---

Expand All @@ -73,7 +75,8 @@ or unlink a LUD-16 Lightning Address:
resolve that requires zap metadata (`allowsNostr` + `nostrPubkey`). Always
leaves the address **unverified**. Unreachable or non-zap addresses are
rejected and not stored.
- `DELETE /me/lightning-address` — unlink
- `DELETE /me/lightning-address` — unlink (also clears the LN skip timestamp
so `setup` returns to `lightning-address` when a name is set or name-skipped)

Proof-of-control of the linked Lightning Address is the flag
`lightningAddressVerified` (not the forum role **Verified**):
Expand All @@ -91,9 +94,13 @@ any pending verification (`SPEC.md`).

### Identity copy — **Shipped** (name) + **Sketch** (photo / story)

Receiver name is stored on the account (`POST /me/name`). Photo and story
will become custodial `kind:0` metadata signed server-side. **No HTTP for
photo/story yet**. Do not invent `POST /me/profile`.
Receiver name is stored on the account (`POST /me/name`). The first persisted
non-empty name also creates exactly one top-level profile forum note; rename
does not create a second note or change its text. Other members read live
identity plus that note via `GET /members/:accountId` (Bearer; rules required).
Photo and story beyond that note stay custodial `kind:0` metadata signed
server-side (`about` is the profile-note text when present, else `21.gifts`).
**Do not invent** `POST /me/profile`.

### View-key link — **Shipped**

Expand Down Expand Up @@ -148,8 +155,10 @@ HTTP that exists today is only the spend-worker invoice pair above (`SPEC.md`).
## 5. Message — **Shipped**

Public comment / encouragement is a v1 surface. The composer POSTs
`{ text }` and/or `{ photo: { contentType, data } }` to `POST /messages`;
the public thread is listed via `GET /messages` (newest first, name
`{ text }` and/or `{ photo: { contentType, data } }` to `POST /messages`
(requires rules + name; Lightning Address is not required to post — missing
requirements are **409** `missing_requirements`);
the public thread is listed via `GET /messages` (requires rules; newest first, name
snapshotted at post, `sats`, `payable`, `hasPhoto`, and live author `role`
— never photo bytes). Bytes are public `GET /messages/:id/photo` (Nostr `imeta`). The shipped UI
is a messenger-group thread: oldest notes at the top, newest at the bottom,
Expand Down
Loading
Loading