From 6a9d21bc87f8a738e14f27a1305bf04d0c4b7a0c Mon Sep 17 00:00:00 2001 From: rtkay123 Date: Sun, 1 Feb 2026 12:18:24 +0200 Subject: docs: user and auth entity model --- docs/book/src/SUMMARY.md | 2 +- docs/book/src/chapter_1.md | 47 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 2 deletions(-) (limited to 'docs/book/src') diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md index 7390c82..74bc36b 100644 --- a/docs/book/src/SUMMARY.md +++ b/docs/book/src/SUMMARY.md @@ -1,3 +1,3 @@ # Summary -- [Chapter 1](./chapter_1.md) +- [Entities](./chapter_1.md) diff --git a/docs/book/src/chapter_1.md b/docs/book/src/chapter_1.md index b743fda..b638874 100644 --- a/docs/book/src/chapter_1.md +++ b/docs/book/src/chapter_1.md @@ -1 +1,46 @@ -# Chapter 1 +# Entities + +```mermaid +erDiagram + Account ||--|| Profile : "has" + Account ||--o{ Session : "creates" + Profile ||--o{ Follow : "follows" + Profile ||--o{ Follow : "is followed by" + Profile ||--o{ Like : "likes" + Profile { + string ap_id PK + string username + string description + string inbox + string outbox + enum type + string picture + string public_key + string private_key + timestamp created_at + timestamp last_refreshed_at + } + Account { + string ap_id FK + string oauth_provider_id PK + string oauth_provider_user_id PK + string email + } + Session { + string id PK + timestamp expires_at + string ap_id FK + } + Follow { + string follower_ap_id + string following_ap_id + timestamp created_at + } + Like { + string ap_id PK + string object_id PK + timestamp created_at + } +``` + +Profile.type is an enum supporting the ActivityPub actor type [values](https://www.w3.org/TR/activitystreams-vocabulary/#actor-types) -- cgit v1.2.3