feat(docs): add detailed features and business flow diagrams
- Introduced new interaction and community features, including comments and private messaging. - Added technical diagrams for critical workflows: authentication, content publication, and messaging. - Enhanced data model documentation with support for comments and messaging tables. - Updated API references with endpoints for comments, messaging, and user search. - Integrated post-quantum cryptography for improved data protection.
This commit is contained in:
@@ -18,13 +18,24 @@ erDiagram
|
||||
USER ||--o{ API_KEY : "genere"
|
||||
USER ||--o{ AUDIT_LOG : "genere"
|
||||
USER ||--o{ FAVORITE : "ajoute"
|
||||
USER ||--o{ COMMENT : "rédige"
|
||||
USER ||--o{ COMMENT_LIKE : "aime"
|
||||
USER ||--o{ CONVERSATION_PARTICIPANT : "participe"
|
||||
USER ||--o{ MESSAGE : "envoie"
|
||||
|
||||
CONTENT ||--o{ CONTENT_TAG : "possede"
|
||||
TAG ||--o{ CONTENT_TAG : "est_lie_a"
|
||||
CONTENT ||--o{ REPORT : "est_signale"
|
||||
CONTENT ||--o{ FAVORITE : "est_mis_en"
|
||||
CONTENT ||--o{ COMMENT : "reçoit"
|
||||
TAG ||--o{ REPORT : "est_signale"
|
||||
|
||||
COMMENT ||--o{ COMMENT : "possède des réponses"
|
||||
COMMENT ||--o{ COMMENT_LIKE : "est aimé par"
|
||||
|
||||
CONVERSATION ||--o{ CONVERSATION_PARTICIPANT : "regroupe"
|
||||
CONVERSATION ||--o{ MESSAGE : "contient"
|
||||
|
||||
CATEGORY ||--o{ CONTENT : "catégorise"
|
||||
|
||||
ROLE ||--o{ USER_ROLE : "attribue_a"
|
||||
@@ -45,6 +56,15 @@ erDiagram
|
||||
string type
|
||||
string storage_key
|
||||
}
|
||||
COMMENT {
|
||||
string text
|
||||
}
|
||||
CONVERSATION {
|
||||
timestamp created_at
|
||||
}
|
||||
MESSAGE {
|
||||
string text
|
||||
}
|
||||
TAG {
|
||||
string name
|
||||
string slug
|
||||
@@ -140,6 +160,39 @@ erDiagram
|
||||
uuid content_id PK, FK
|
||||
uuid tag_id PK, FK
|
||||
}
|
||||
comments {
|
||||
uuid id PK
|
||||
uuid content_id FK
|
||||
uuid user_id FK
|
||||
uuid parent_id FK
|
||||
text text
|
||||
timestamp created_at
|
||||
timestamp updated_at
|
||||
timestamp deleted_at
|
||||
}
|
||||
comment_likes {
|
||||
uuid comment_id PK, FK
|
||||
uuid user_id PK, FK
|
||||
timestamp created_at
|
||||
}
|
||||
conversations {
|
||||
uuid id PK
|
||||
timestamp created_at
|
||||
timestamp updated_at
|
||||
}
|
||||
conversation_participants {
|
||||
uuid conversation_id PK, FK
|
||||
uuid user_id PK, FK
|
||||
timestamp joined_at
|
||||
}
|
||||
messages {
|
||||
uuid id PK
|
||||
uuid conversation_id FK
|
||||
uuid sender_id FK
|
||||
text text
|
||||
timestamp created_at
|
||||
timestamp read_at
|
||||
}
|
||||
roles {
|
||||
uuid id PK
|
||||
varchar name
|
||||
@@ -225,6 +278,15 @@ erDiagram
|
||||
users ||--o{ sessions : "user_id"
|
||||
users ||--o{ api_keys : "user_id"
|
||||
users ||--o{ audit_logs : "user_id"
|
||||
contents ||--o{ comments : "content_id"
|
||||
users ||--o{ comments : "user_id"
|
||||
comments ||--o{ comments : "parent_id"
|
||||
comments ||--o{ comment_likes : "comment_id"
|
||||
users ||--o{ comment_likes : "user_id"
|
||||
conversations ||--o{ conversation_participants : "conversation_id"
|
||||
users ||--o{ conversation_participants : "user_id"
|
||||
conversations ||--o{ messages : "conversation_id"
|
||||
users ||--o{ messages : "sender_id"
|
||||
```
|
||||
|
||||
### Physique (MPD)
|
||||
@@ -278,6 +340,7 @@ erDiagram
|
||||
|
||||
#### Sécurité et Chiffrement
|
||||
- **Chiffrement PGP (Native)** : Les colonnes `email` et `two_factor_secret` sont stockées au format `bytea` et chiffrées/déchiffrées via les fonctions `pgp_sym_encrypt` et `pgp_sym_decrypt` de PostgreSQL (via l'extension `pgcrypto`).
|
||||
- **Cryptographie Post-Quantique** : Utilisation de la bibliothèque `@noble/post-quantum` pour anticiper les futures menaces cryptographiques.
|
||||
- **Hachage aveugle (Blind Indexing)** : La colonne `email_hash` stocke un hash (SHA-256) de l'email pour permettre les recherches d'unicité et les recherches rapides sans déchiffrer la donnée.
|
||||
|
||||
#### Index et Optimisations
|
||||
|
||||
Reference in New Issue
Block a user