refactor: migrate documentation to support multi-language structure with i18n integration
Some checks failed
Documentation Lint / lint (push) Failing after 4m46s
Some checks failed
Documentation Lint / lint (push) Failing after 4m46s
This commit is contained in:
116
documentation/content/docs/conception/index.fr.mdx
Normal file
116
documentation/content/docs/conception/index.fr.mdx
Normal file
@@ -0,0 +1,116 @@
|
||||
---
|
||||
title: Conception de la Base de Données
|
||||
description: MCD, MLD et MPD de MemeGoat.
|
||||
---
|
||||
|
||||
## Modèle Conceptuel des Données (MCD)
|
||||
Le MCD définit les entités et leurs relations.
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
UTILISATEUR ||--o{ MEME : "crée"
|
||||
UTILISATEUR ||--o{ COMMENTAIRE : "écrit"
|
||||
MEME ||--o{ COMMENTAIRE : "reçoit"
|
||||
MEME }o--o{ TAG : "possède"
|
||||
|
||||
UTILISATEUR {
|
||||
string pseudo
|
||||
string email
|
||||
string mot_de_passe
|
||||
datetime date_creation
|
||||
}
|
||||
MEME {
|
||||
string titre
|
||||
string url_image
|
||||
datetime date_creation
|
||||
}
|
||||
TAG {
|
||||
string nom
|
||||
}
|
||||
COMMENTAIRE {
|
||||
string contenu
|
||||
datetime date_creation
|
||||
}
|
||||
```
|
||||
|
||||
## Modèle Logique des Données (MLD)
|
||||
Le MLD traduit le MCD en tables avec les clés étrangères.
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
users ||--o{ memes : "user_id"
|
||||
users ||--o{ comments : "user_id"
|
||||
memes ||--o{ comments : "meme_id"
|
||||
memes ||--o{ meme_tags : "meme_id"
|
||||
tags ||--o{ meme_tags : "tag_id"
|
||||
|
||||
users {
|
||||
uuid id PK
|
||||
varchar username
|
||||
varchar email
|
||||
text password_hash
|
||||
timestamp created_at
|
||||
}
|
||||
memes {
|
||||
uuid id PK
|
||||
varchar title
|
||||
text image_url
|
||||
uuid user_id FK
|
||||
timestamp created_at
|
||||
}
|
||||
tags {
|
||||
uuid id PK
|
||||
varchar name
|
||||
}
|
||||
meme_tags {
|
||||
uuid meme_id FK
|
||||
uuid tag_id FK
|
||||
}
|
||||
comments {
|
||||
uuid id PK
|
||||
text content
|
||||
uuid user_id FK
|
||||
uuid meme_id FK
|
||||
timestamp created_at
|
||||
}
|
||||
```
|
||||
|
||||
## Modèle Physique des Données (MPD)
|
||||
Implémentation SQL pour PostgreSQL.
|
||||
|
||||
```sql
|
||||
CREATE TABLE users (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
username VARCHAR(50) UNIQUE NOT NULL,
|
||||
email VARCHAR(255) UNIQUE NOT NULL,
|
||||
password_hash TEXT NOT NULL,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE memes (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
title VARCHAR(255) NOT NULL,
|
||||
image_url TEXT NOT NULL,
|
||||
user_id UUID REFERENCES users(id) ON DELETE SET NULL,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE tags (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
name VARCHAR(50) UNIQUE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE meme_tags (
|
||||
meme_id UUID REFERENCES memes(id) ON DELETE CASCADE,
|
||||
tag_id UUID REFERENCES tags(id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (meme_id, tag_id)
|
||||
);
|
||||
|
||||
CREATE TABLE comments (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
content TEXT NOT NULL,
|
||||
user_id UUID REFERENCES users(id) ON DELETE SET NULL,
|
||||
meme_id UUID REFERENCES memes(id) ON DELETE CASCADE,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
116
documentation/content/docs/conception/index.mdx
Normal file
116
documentation/content/docs/conception/index.mdx
Normal file
@@ -0,0 +1,116 @@
|
||||
---
|
||||
title: Database Design
|
||||
description: MCD, MLD and MPD for MemeGoat.
|
||||
---
|
||||
|
||||
## Conceptual Data Model (MCD)
|
||||
The MCD defines entities and their relationships.
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
USER ||--o{ MEME : "creates"
|
||||
USER ||--o{ COMMENT : "writes"
|
||||
MEME ||--o{ COMMENT : "receives"
|
||||
MEME }o--o{ TAG : "has"
|
||||
|
||||
USER {
|
||||
string username
|
||||
string email
|
||||
string password
|
||||
datetime created_at
|
||||
}
|
||||
MEME {
|
||||
string title
|
||||
string image_url
|
||||
datetime created_at
|
||||
}
|
||||
TAG {
|
||||
string name
|
||||
}
|
||||
COMMENT {
|
||||
string content
|
||||
datetime created_at
|
||||
}
|
||||
```
|
||||
|
||||
## Logical Data Model (MLD)
|
||||
The MLD translates the MCD into tables with foreign keys.
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
users ||--o{ memes : "user_id"
|
||||
users ||--o{ comments : "user_id"
|
||||
memes ||--o{ comments : "meme_id"
|
||||
memes ||--o{ meme_tags : "meme_id"
|
||||
tags ||--o{ meme_tags : "tag_id"
|
||||
|
||||
users {
|
||||
uuid id PK
|
||||
varchar username
|
||||
varchar email
|
||||
text password_hash
|
||||
timestamp created_at
|
||||
}
|
||||
memes {
|
||||
uuid id PK
|
||||
varchar title
|
||||
text image_url
|
||||
uuid user_id FK
|
||||
timestamp created_at
|
||||
}
|
||||
tags {
|
||||
uuid id PK
|
||||
varchar name
|
||||
}
|
||||
meme_tags {
|
||||
uuid meme_id FK
|
||||
uuid tag_id FK
|
||||
}
|
||||
comments {
|
||||
uuid id PK
|
||||
text content
|
||||
uuid user_id FK
|
||||
uuid meme_id FK
|
||||
timestamp created_at
|
||||
}
|
||||
```
|
||||
|
||||
## Physical Data Model (MPD)
|
||||
SQL implementation for PostgreSQL.
|
||||
|
||||
```sql
|
||||
CREATE TABLE users (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
username VARCHAR(50) UNIQUE NOT NULL,
|
||||
email VARCHAR(255) UNIQUE NOT NULL,
|
||||
password_hash TEXT NOT NULL,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE memes (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
title VARCHAR(255) NOT NULL,
|
||||
image_url TEXT NOT NULL,
|
||||
user_id UUID REFERENCES users(id) ON DELETE SET NULL,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE tags (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
name VARCHAR(50) UNIQUE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE meme_tags (
|
||||
meme_id UUID REFERENCES memes(id) ON DELETE CASCADE,
|
||||
tag_id UUID REFERENCES tags(id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (meme_id, tag_id)
|
||||
);
|
||||
|
||||
CREATE TABLE comments (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
content TEXT NOT NULL,
|
||||
user_id UUID REFERENCES users(id) ON DELETE SET NULL,
|
||||
meme_id UUID REFERENCES memes(id) ON DELETE CASCADE,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
3
documentation/content/docs/conception/meta.en.json
Normal file
3
documentation/content/docs/conception/meta.en.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"title": "Design"
|
||||
}
|
||||
3
documentation/content/docs/conception/meta.json
Normal file
3
documentation/content/docs/conception/meta.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"title": "Conception"
|
||||
}
|
||||
13
documentation/content/docs/index.fr.mdx
Normal file
13
documentation/content/docs/index.fr.mdx
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: Introduction
|
||||
description: Bienvenue sur MemeGoat, la bibliothèque de MEME et GIF.
|
||||
---
|
||||
|
||||
MemeGoat est un site bibliothèque de MEME et de GIF.
|
||||
Le but est de permettre de retrouver une image adaptée à son besoin par une simple recherche.
|
||||
Il est aussi possible de créer du contenu sur le site.
|
||||
|
||||
## Objectifs
|
||||
- Recherche rapide et intuitive.
|
||||
- Partage de contenu original.
|
||||
- Bibliothèque communautaire.
|
||||
@@ -1,13 +1,13 @@
|
||||
---
|
||||
title: Hello World
|
||||
description: Your first document
|
||||
title: Introduction
|
||||
description: Welcome to MemeGoat, the MEME and GIF library.
|
||||
---
|
||||
|
||||
Welcome to the docs! You can start writing documents in `/content/docs`.
|
||||
MemeGoat is a MEME and GIF library website.
|
||||
The goal is to allow finding an image suited to one's needs through a simple search.
|
||||
It is also possible to create content on the site.
|
||||
|
||||
## What is Next?
|
||||
|
||||
<Cards>
|
||||
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
|
||||
<Card title="Learn more about Fumadocs" href="https://fumadocs.dev" />
|
||||
</Cards>
|
||||
## Goals
|
||||
- Fast and intuitive search.
|
||||
- Sharing original content.
|
||||
- Community-driven library.
|
||||
|
||||
17
documentation/content/docs/stack/index.fr.mdx
Normal file
17
documentation/content/docs/stack/index.fr.mdx
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: Stack Technique
|
||||
description: Choix technologiques pour MemeGoat.
|
||||
---
|
||||
|
||||
## Frontend
|
||||
- **Framework**: Next.js 15
|
||||
- **Style**: Tailwind CSS
|
||||
- **Bibliothèque UI**: Lucide React, Radix UI
|
||||
|
||||
## Backend
|
||||
- **Langage**: Node.js (TypeScript) / NestJS ou Go
|
||||
- **Base de données**: PostgreSQL
|
||||
- **Stockage d'images**: S3 ou similaire (Cloudinary, Uploadcare)
|
||||
|
||||
## Documentation
|
||||
- **Framework**: Fumadocs
|
||||
17
documentation/content/docs/stack/index.mdx
Normal file
17
documentation/content/docs/stack/index.mdx
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: Tech Stack
|
||||
description: Technological choices for MemeGoat.
|
||||
---
|
||||
|
||||
## Frontend
|
||||
- **Framework**: Next.js 15
|
||||
- **Style**: Tailwind CSS
|
||||
- **UI Library**: Lucide React, Radix UI
|
||||
|
||||
## Backend
|
||||
- **Language**: Node.js (TypeScript) / NestJS or Go
|
||||
- **Database**: PostgreSQL
|
||||
- **Image Storage**: S3 or similar (Cloudinary, Uploadcare)
|
||||
|
||||
## Documentation
|
||||
- **Framework**: Fumadocs
|
||||
3
documentation/content/docs/stack/meta.en.json
Normal file
3
documentation/content/docs/stack/meta.en.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"title": "Stack"
|
||||
}
|
||||
3
documentation/content/docs/stack/meta.json
Normal file
3
documentation/content/docs/stack/meta.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"title": "Stack"
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
---
|
||||
title: Components
|
||||
description: Components
|
||||
---
|
||||
|
||||
## Code Block
|
||||
|
||||
```js
|
||||
console.log('Hello World');
|
||||
```
|
||||
|
||||
## Cards
|
||||
|
||||
<Cards>
|
||||
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
|
||||
<Card title="Learn more about Fumadocs" href="https://fumadocs.dev" />
|
||||
</Cards>
|
||||
Reference in New Issue
Block a user