From 4d776c5c16c031f2ace5fe735020d7e8032b478b Mon Sep 17 00:00:00 2001
From: Mathis HERRIOT <197931332+0x485254@users.noreply.github.com>
Date: Mon, 5 Jan 2026 10:16:29 +0100
Subject: [PATCH] refactor: simplify documentation structure by removing
multi-language i18n support and unused components
---
.../content/docs/conception/index.fr.mdx | 116 ------------------
.../content/docs/conception/index.mdx | 116 ------------------
.../content/docs/conception/meta.en.json | 3 -
.../content/docs/conception/meta.json | 3 -
documentation/content/docs/index.fr.mdx | 13 --
documentation/content/docs/index.mdx | 18 +--
documentation/content/docs/stack/index.fr.mdx | 17 ---
documentation/content/docs/stack/index.mdx | 17 ---
documentation/content/docs/stack/meta.en.json | 3 -
documentation/content/docs/stack/meta.json | 3 -
documentation/content/docs/test.mdx | 17 +++
documentation/package.json | 8 +-
.../src/app/{[lang] => }/(home)/layout.tsx | 2 +-
.../src/app/{[lang] => }/(home)/page.tsx | 2 +-
documentation/src/app/[lang]/layout.tsx | 38 ------
documentation/src/app/api/search/route.ts | 6 +-
.../{[lang] => }/docs/[[...slug]]/page.tsx | 8 +-
.../src/app/{[lang] => }/docs/layout.tsx | 2 +-
documentation/src/app/{[lang] => }/global.css | 0
documentation/src/app/layout.tsx | 17 +++
.../src/app/og/docs/[...slug]/route.tsx | 2 +-
documentation/src/components/mdx/mermaid.tsx | 56 ---------
documentation/src/lib/i18n.ts | 6 -
documentation/src/lib/layout.shared.tsx | 4 +-
documentation/src/lib/source.ts | 2 -
documentation/src/mdx-components.tsx | 13 --
documentation/src/proxy.ts | 10 --
27 files changed, 57 insertions(+), 445 deletions(-)
delete mode 100644 documentation/content/docs/conception/index.fr.mdx
delete mode 100644 documentation/content/docs/conception/index.mdx
delete mode 100644 documentation/content/docs/conception/meta.en.json
delete mode 100644 documentation/content/docs/conception/meta.json
delete mode 100644 documentation/content/docs/index.fr.mdx
delete mode 100644 documentation/content/docs/stack/index.fr.mdx
delete mode 100644 documentation/content/docs/stack/index.mdx
delete mode 100644 documentation/content/docs/stack/meta.en.json
delete mode 100644 documentation/content/docs/stack/meta.json
create mode 100644 documentation/content/docs/test.mdx
rename documentation/src/app/{[lang] => }/(home)/layout.tsx (60%)
rename documentation/src/app/{[lang] => }/(home)/page.tsx (82%)
delete mode 100644 documentation/src/app/[lang]/layout.tsx
rename documentation/src/app/{[lang] => }/docs/[[...slug]]/page.tsx (79%)
rename documentation/src/app/{[lang] => }/docs/layout.tsx (76%)
rename documentation/src/app/{[lang] => }/global.css (100%)
create mode 100644 documentation/src/app/layout.tsx
delete mode 100644 documentation/src/components/mdx/mermaid.tsx
delete mode 100644 documentation/src/lib/i18n.ts
delete mode 100644 documentation/src/proxy.ts
diff --git a/documentation/content/docs/conception/index.fr.mdx b/documentation/content/docs/conception/index.fr.mdx
deleted file mode 100644
index 71e3e2e..0000000
--- a/documentation/content/docs/conception/index.fr.mdx
+++ /dev/null
@@ -1,116 +0,0 @@
----
-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
-);
-```
diff --git a/documentation/content/docs/conception/index.mdx b/documentation/content/docs/conception/index.mdx
deleted file mode 100644
index 67509b4..0000000
--- a/documentation/content/docs/conception/index.mdx
+++ /dev/null
@@ -1,116 +0,0 @@
----
-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
-);
-```
diff --git a/documentation/content/docs/conception/meta.en.json b/documentation/content/docs/conception/meta.en.json
deleted file mode 100644
index 3eb69fa..0000000
--- a/documentation/content/docs/conception/meta.en.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "title": "Design"
-}
diff --git a/documentation/content/docs/conception/meta.json b/documentation/content/docs/conception/meta.json
deleted file mode 100644
index 4ef1132..0000000
--- a/documentation/content/docs/conception/meta.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "title": "Conception"
-}
diff --git a/documentation/content/docs/index.fr.mdx b/documentation/content/docs/index.fr.mdx
deleted file mode 100644
index 5484829..0000000
--- a/documentation/content/docs/index.fr.mdx
+++ /dev/null
@@ -1,13 +0,0 @@
----
-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.
diff --git a/documentation/content/docs/index.mdx b/documentation/content/docs/index.mdx
index 53457a3..1ede18e 100644
--- a/documentation/content/docs/index.mdx
+++ b/documentation/content/docs/index.mdx
@@ -1,13 +1,13 @@
---
-title: Introduction
-description: Welcome to MemeGoat, the MEME and GIF library.
+title: Hello World
+description: Your first document
---
-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.
+Welcome to the docs! You can start writing documents in `/content/docs`.
-## Goals
-- Fast and intuitive search.
-- Sharing original content.
-- Community-driven library.
+## What is Next?
+
+
You can open{" "} - + /docs {" "} and see the documentation. diff --git a/documentation/src/app/[lang]/layout.tsx b/documentation/src/app/[lang]/layout.tsx deleted file mode 100644 index 8167380..0000000 --- a/documentation/src/app/[lang]/layout.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { RootProvider } from "fumadocs-ui/provider/next"; -import "./global.css"; -import { Inter } from "next/font/google"; -import { defineI18nUI } from "fumadocs-ui/i18n"; -import { i18n } from "@/lib/i18n"; - -const inter = Inter({ - subsets: ["latin"], -}); - -const { provider } = defineI18nUI(i18n, { - translations: { - en: { - displayName: "English", - }, - fr: { - displayName: "French", - }, - }, -}); - -export default async function RootLayout({ - params, - children, -}: { - params: Promise<{ lang: string }>; - children: React.ReactNode; -}) { - const lang = (await params).lang; - - return ( - -
-