# hoanguyen2805/trac_nghiem_js architecture

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

- Interactive diagram: https://gitdiagram.com/hoanguyen2805/trac_nghiem_js
- Repository: https://github.com/hoanguyen2805/trac_nghiem_js

## Overview

##### Project type and purpose
- This is *not* a full-stack app or a microservice system. It’s a *static content repository* of advanced JavaScript multiple-choice questions in Markdown, with translations maintained in parallel folders (each language has its own `README_xx-YY.md`). Its primary purpose is to host educational Q&A on GitHub (and mirror/link from Instagram).

##### File structure
- Top-level: a single `README.md` (the Vietnamese version).
- Underneath (mentioned in the README): language subdirectories like `ar-AR/`, `de-DE/`, `zh-CN/` each containing their localized README.
- No `src/`, no `frontend/`, no `backend/` code—pure content.
- No build scripts or config files in the provided tree; presumably served via GitHub’s Markdown renderer or a simple static-site generator (SSG) like Jekyll or Hugo.

##### README
- Shows the question list, code snippets, answers, and “other languages” links pointing to subdirectories.
- No mention of runtime components, databases, or servers—just Markdown content and translation folders.

##### Main components
a. Content layer
- **Markdown files** (one per language)
- **Translations** organized under language subfolders
b. Build/deployment layer
- (Optional) **Static-site generator** (e.g. Jekyll/Hugo/Next.js-SSG) or direct GitHub-Pages renderer
- **CI/CD** or GitHub Actions: on push → build → deploy
c. Hosting layer
- **GitHub Pages** (or Netlify/Vercel)
- **CDN** (GitHub’s global mirror or your own CDN)
d. Delivery layer
- **End users**: Browser clients reading the site
- **Instagram**: Author posts questions → drives traffic via links to GitHub site
- Author edits → Git commit → GitHub repo
- Push triggers SSG (if any) → static assets
- Assets deployed to hosting/CDN → served to end users’ browsers

##### Architectural patterns and principles
- **Static-site pattern**: content in Markdown → prebuilt → served as static HTML
- **Multilingual structure**: one folder per locale, same file hierarchy under each
- **Content-driven**: all logic lives in the SSG or markdown renderer
- **CI/CD integration**: automated builds on every commit

##### Technologies and libraries
- Markdown (content)
- SSG (optional): Jekyll/Hugo/Eleventy/Next.js SSG
- GitHub Pages or similar static host
- GitHub Actions for build/deploy (if used)
- Instagram as an external marketing channel

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Content Layer
    subgraph "Content Layer"
        direction TB
        Author["Author"]:::content
        README["README.md"]:::content
        AR["ar-AR/ (translations)"]:::content
        DE["de-DE/ (translations)"]:::content
        ZH["zh-CN/ (translations)"]:::content
    end

    %% Build Layer
    subgraph "Build Layer"
        direction TB
        CI["GitHub Actions (CI/CD)"]:::build
        SSG["Static-Site Generator (Jekyll/Hugo/Eleventy)"]:::build
        Assets["Static Assets"]:::build
    end

    %% Hosting Layer
    subgraph "Hosting Layer"
        direction TB
        Hosting["GitHub Pages / CDN"]:::hosting
    end

    %% Consumption Layer
    subgraph "Consumption Layer"
        direction TB
        Browser["Browser Clients"]:::consume
        Instagram["Instagram"]:::consume
    end

    %% Data Flows
    Author -->|"edits"| README
    README -->|"git push"| CI
    README --> AR
    README --> DE
    README --> ZH
    CI -->|"trigger build"| SSG
    SSG -->|"static build"| Assets
    Assets -->|"deploy"| Hosting
    Hosting -->|"HTTP GET"| Browser
    Instagram -->|"links to site"| Browser

    %% Click Events
    click README "https://github.com/hoanguyen2805/trac_nghiem_js/blob/master/README.md"

    %% Styles
    classDef content fill:#1f77b4,stroke:#000,color:#fff;
    classDef build fill:#ff7f0e,stroke:#000,color:#000;
    classDef hosting fill:#2ca02c,stroke:#000,color:#000;
    classDef consume fill:#9467bd,stroke:#000,color:#fff;
```
