# definiteiymaybe/dostoevsky-website architecture

> Architecture diagram of the GitHub repository definiteiymaybe/dostoevsky-website, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/definiteiymaybe/dostoevsky-website
- Repository: https://github.com/definiteiymaybe/dostoevsky-website

## Overview

##### Main Components Identification

The system should be represented with these key components:

a) Frontend Layer:
- Gatsby Static Site Generator
- React Components (src/components)
- UI Kit Components
- Templates Layer
- Routing System

b) Data Layer:
- Content Management (content/)
- Static Files (static/)
- JSON Data Sources (content/*.json)
- Markdown/MDX Files (content/posts/)

c) Build & Deployment:
- GitHub Actions Pipeline
- Netlify/Vercel Deployment
- Crowdin Translation System Integration

**[Client Browser] ←→ [CDN/Static Hosting]**
- ↑                    ↑

**[Static Assets] ←── [Build Output]**
- ↑
- [Gatsby Build]
- ↑
- ┌────────────────┴─────────────────┐
- ↓                ↓                 ↓
**[React Components] [Templates]    [Data Sources]**
- ↓                ↓                 ↓
**[UI Kit] [Page Templates] [Content (MD/JSON/Static)]**
- ↓
- [Translation System]

##### Key Relationships to Highlight

a) Component Architecture:
- Hierarchy between UI Kit → Components → Templates → Pages
- Data flow from content sources through Gatsby's build process
- Demonstrate the translation system's integration

b) Build Process:
- How content flows through the Gatsby build pipeline
- Where translations are injected
- Deployment paths to different environments (production/beta)

##### Technical Details

- TypeScript integration
- Testing infrastructure
- Style management (CSS modules)
- State management
- Route handling

Remember to highlight the project's unique features like:
- Multi-language support
- Feature flag system
- Analytics integration
- Content management workflow
- Component library organization

This will provide a clear understanding of how the various parts of the system interact while maintaining a focus on the project's specific requirements and architecture.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Browser/Client"]
    end

    subgraph Infrastructure
        CDN["CDN/Static Hosting"]:::infra
        StaticAssets["Static Assets"]:::infra
        click StaticAssets "https://github.com/definiteIymaybe/dostoevsky-website/tree/develop/static/"
    end

    subgraph BuildSystem
        GatsbyBuild["Gatsby Build Process"]:::build
        BuildOutput["Build Output"]:::build
    end

    subgraph Frontend
        ReactComponents["React Components"]:::frontend
        click ReactComponents "https://github.com/definiteIymaybe/dostoevsky-website/tree/develop/src/components/"
        UIKit["UI Kit"]:::frontend
        click UIKit "https://github.com/definiteIymaybe/dostoevsky-website/tree/develop/src/components/ui-kit/"
        Templates["Templates Layer"]:::frontend
        click Templates "https://github.com/definiteIymaybe/dostoevsky-website/tree/develop/src/templates/"
        Router["Routing System"]:::frontend
        click Router "https://github.com/definiteIymaybe/dostoevsky-website/blob/develop/src/config/routes.ts"
        Styles["Style Management"]:::frontend
        click Styles "https://github.com/definiteIymaybe/dostoevsky-website/tree/develop/src/styles/"
    end

    subgraph DataLayer
        ContentMgmt["Content Management"]:::data
        click ContentMgmt "https://github.com/definiteIymaybe/dostoevsky-website/tree/develop/content/"
        JsonData["JSON Data Sources"]:::data
        click JsonData "https://github.com/definiteIymaybe/dostoevsky-website/blob/develop/content/api-data.json"
        MarkdownFiles["Markdown/MDX Files"]:::data
        click MarkdownFiles "https://github.com/definiteIymaybe/dostoevsky-website/tree/develop/content/posts/"
    end

    subgraph DevTools
        Storybook["Storybook"]:::tool
        click Storybook "https://github.com/definiteIymaybe/dostoevsky-website/tree/develop/.storybook/"
        Testing["Testing Infrastructure"]:::tool
        click Testing "https://github.com/definiteIymaybe/dostoevsky-website/blob/develop/jest.config.js"
        TypeScript["TypeScript Config"]:::tool
        click TypeScript "https://github.com/definiteIymaybe/dostoevsky-website/blob/develop/tsconfig.json"
    end

    subgraph Deployment
        GithubActions["GitHub Actions"]:::deploy
        click GithubActions "https://github.com/definiteIymaybe/dostoevsky-website/tree/develop/.github/workflows/"
        EnvConfig["Environment Configs"]:::deploy
        click EnvConfig "https://github.com/definiteIymaybe/dostoevsky-website/blob/develop/.env.development"
    end

    subgraph I18n
        CrowdinSystem["Crowdin Translation"]:::i18n
        click CrowdinSystem "https://github.com/definiteIymaybe/dostoevsky-website/blob/develop/crowdin.yml"
        I18nConfig["i18n Configuration"]:::i18n
        click I18nConfig "https://github.com/definiteIymaybe/dostoevsky-website/tree/develop/src/i18n/"
    end

    Browser --> CDN
    CDN --> StaticAssets
    StaticAssets --> Browser

    GatsbyBuild --> BuildOutput
    BuildOutput --> CDN

    ReactComponents --> GatsbyBuild
    UIKit --> ReactComponents
    Templates --> GatsbyBuild
    Router --> GatsbyBuild
    Styles --> GatsbyBuild

    ContentMgmt --> GatsbyBuild
    JsonData --> GatsbyBuild
    MarkdownFiles --> GatsbyBuild

    CrowdinSystem --> ContentMgmt
    I18nConfig --> GatsbyBuild

    Storybook -.-> ReactComponents
    Testing -.-> ReactComponents
    TypeScript -.-> GatsbyBuild
    
    GatsbyBuild --> GithubActions
    EnvConfig -.-> GatsbyBuild
    GithubActions --> CDN

    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef data fill:#2ecc71,stroke:#27ae60,color:white
    classDef build fill:#e67e22,stroke:#d35400,color:white
    classDef i18n fill:#9b59b6,stroke:#8e44ad,color:white
    classDef infra fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef deploy fill:#e74c3c,stroke:#c0392b,color:white
    classDef tool fill:#f1c40f,stroke:#f39c12,color:black
```
