# nolanbeaujault/cortest-docs architecture

> Architecture diagram of the GitHub repository nolanbeaujault/cortest-docs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nolanbeaujault/cortest-docs
- Repository: https://github.com/nolanbeaujault/cortest-docs

## Overview

##### Project type and purpose
- This is a documentation website built with Docusaurus (a React-based static site generator).
- Purpose: serve technical docs (MDX, custom TSX pages, assets) for the Cortest mobile seizure testing platform, hosted on GitHub Pages.

##### File structure
- Top-level:
- docs/ – all MDX documentation pages, organized into backend/frontend categories.
- src/pages/ – custom React/TSX pages and layouts (e.g., team page, gestion_tests).
- static/ – images, fonts, assets copied verbatim to output.
- docusaurus.config.js & sidebars.js – config and sidebar definitions.
- package.json – dependencies (Docusaurus, React, MDX, etc.) and build scripts.

##### README for additional insights
- Confirms tech stack: Docusaurus v3.8.1, React 18, MDX, custom CSS.
- Dev workflow: `npm run start` (local dev server), `npm run build` + `npm run deploy` (GitHub Pages CI/CD).
- Structure summary matches file tree.

##### Main components
a. Local Development Environment
- Node.js runtime + NPM packages
- Docusaurus CLI / dev server (hot-reload)
b. Content Sources
- docs/ MDX files
- src/pages/ custom TSX pages
- static/ assets (images, fonts, CSS)
c. Build Pipeline
- MDX → JSX transformer
- React + Webpack bundling
- Docusaurus theming + plugin system
d. Deployment Target
- GitHub Actions or CI/CD runner
- GitHub Pages hosting (static site)

##### Relationships & Data Flow
- Build Pipeline → generates static output (HTML, JS bundles, CSS, assets).
- Deployment step pushes output to GitHub Pages.
- Local Development step runs same pipeline in memory and serves via localhost:3000.

##### Architectural patterns & design principles
- Static Site Generation (SSG) – all pages pre-rendered at build time.
- Component-based UI (React) – reuse via src/components.
- MDX for composable docs (mix Markdown + JSX).
- Configuration-driven (docusaurus.config.js, sidebars.js) for routing & theming.

## Diagram (Mermaid)

```mermaid
flowchart TD
    classDef content fill:#ccf,stroke:#333,stroke-width:1px
    classDef build fill:#fc9,stroke:#333,stroke-width:1px
    classDef commands fill:#eee,stroke:#333,stroke-width:1px
    classDef hosting fill:#9f9,stroke:#333,stroke-width:1px

    subgraph "Dev Machine"
        subgraph "Content Sources"  
            docs["docs/"]:::content
            srcPages["src/pages/"]:::content
            staticAssets["static/"]:::content
        end
        subgraph "Configs & Assets"
            config["docusaurus.config.js"]:::content
            sidebars["sidebars.js"]:::content
            components["src/components/"]:::content
            css["src/css/custom.css"]:::content
            pkgjson["package.json"]:::content
            pkgloc["package-lock.json"]:::content
            nojekyll["static/.nojekyll"]:::content
        end
        devServer["Local Dev Server\n(npm start)"]:::commands
    end

    subgraph "Build Engine"
        mdx["MDX → JSX Transformer"]:::build
        webpack["Webpack Bundler"]:::build
        react["React Renderer"]:::build
        theme["Docusaurus Theme & Plugins"]:::build
    end

    subgraph "CI/CD Pipeline"
        actions["GitHub Actions Runner"]:::commands
        buildTask["Build (npm run build)"]:::commands
        deployTask["Deploy (npm run deploy)"]:::commands
    end

    subgraph "Hosting"
        ghpages["GitHub Pages"]:::hosting
    end

    %% Data flows
    docs --> mdx
    srcPages --> mdx
    staticAssets --> webpack
    config --> theme
    sidebars --> theme
    components --> webpack
    css --> webpack
    pkgjson --> actions
    pkgloc --> actions
    nojekyll --> ghpages

    mdx --> webpack
    webpack --> react
    react --> theme

    %% Local dev flow
    theme --> devServer

    %% CI/CD flow
    theme --> actions
    actions --> buildTask
    buildTask --> deployTask
    deployTask --> ghpages

    %% Click Events
    click docs "https://github.com/nolanbeaujault/cortest-docs/tree/main/docs/"
    click srcPages "https://github.com/nolanbeaujault/cortest-docs/tree/main/src/pages/"
    click staticAssets "https://github.com/nolanbeaujault/cortest-docs/tree/main/static/"
    click config "https://github.com/nolanbeaujault/cortest-docs/blob/main/docusaurus.config.js"
    click sidebars "https://github.com/nolanbeaujault/cortest-docs/blob/main/sidebars.js"
    click components "https://github.com/nolanbeaujault/cortest-docs/tree/main/src/components/"
    click css "https://github.com/nolanbeaujault/cortest-docs/blob/main/src/css/custom.css"
    click pkgjson "https://github.com/nolanbeaujault/cortest-docs/blob/main/package.json"
    click pkgloc "https://github.com/nolanbeaujault/cortest-docs/blob/main/package-lock.json"
    click nojekyll "https://github.com/nolanbeaujault/cortest-docs/blob/main/static/.nojekyll"
```
