peer paste updates

This commit is contained in:
Raven Scott
2026-05-27 23:08:45 -04:00
parent 1974145b79
commit 30153bf958
8 changed files with 570 additions and 33 deletions
+12 -2
View File
@@ -7,7 +7,10 @@
- Store paste metadata/content in HyperDB.
- Share via link (`/p/:id`) or API (`/api/pastes/:id/raw`).
- Supports expiration, burn-after-read, and max-read limits.
- Includes a lightweight web UI for create/list flows.
- Includes a websocket-first lightweight web UI with infinite scroll.
- Supports `text` and `markdown` formats with client preview.
- Uses encryption by default with optional public mode and optional passphrase-derived mode.
- Supports bounded inline attachments metadata/payloads.
## Routes
@@ -16,6 +19,8 @@
- `GET /api/pastes/mine` list active pastes owned by local peer
- `GET /api/pastes/:id` get paste metadata
- `GET /api/pastes/:id/raw` consume/read paste content
- `GET /api/pastes/:id/attachments` list attachment metadata
- `GET /api/pastes/:id/attachments/:attachmentId` get attachment payload
- `PUT /api/pastes/:id` update paste (owner only; authenticated)
- `DELETE /api/pastes/:id` delete paste (owner only; authenticated)
- `GET /api/stats` get aggregate service stats
@@ -31,10 +36,14 @@ Collection: `@peerpaste/pastes`
Fields:
- `id` (string, key)
- `title` (string)
- `content` (string)
- `format` (string: `text` or `markdown`)
- `language` (string)
- `ownerPeerId` (string)
- `isPublic` (bool)
- `encryptionMode` (string)
- `checksum` (string)
- `attachmentRefs` (stringified JSON array)
- `destroyOnRead` (bool)
- `maxReads` (uint)
- `readCount` (uint)
@@ -57,3 +66,4 @@ Index:
- Raw consumption increments read count and can auto-delete on read constraints.
- The `/api/docs` endpoint provides copy/paste-ready endpoint summaries.
- The `/api/openapi.json` endpoint can be imported by API tooling.
- Burn-after-first-read entries are hidden from recent active websocket list views.