# malsebasmal/linkmalsebas architecture

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

- Interactive diagram: https://gitdiagram.com/malsebasmal/linkmalsebas
- Repository: https://github.com/malsebasmal/linkmalsebas

## Overview

##### Project Type and Purpose
- This is a static, front-end-only “link-tree” style site built with Astro (a modern static site generator).
- Its goal is to render a single page of social links ("Linkmalsebas") in a minimal, brutalist design.

##### File Structure
- Top-level:
- astro.config.mjs – Astro build & integration settings
- package.json & pnpm-lock.yaml – Node.js dependencies and scripts
- public/ – truly static assets served “as-is” (e.g., favicon, robots.txt, images)
- src/ – application source code, subdivided into:
· assets/ – dynamic assets or data modules (socialLinks.ts)
· components/ – reusable Astro UI components (Links.astro, Nav.astro, PopUp.astro)
· layouts/ – top-level page templates (Layout.astro)
· metadata/ – site-wide meta data (metadata.ts)
· pages/ – routeable pages (index.astro)
· styles/ – global CSS (styles.css)
- Config files: tsconfig.json defines path aliases.

##### README
- Confirms this is a static site using Astro, with standard dev/build/preview scripts via pnpm.
- No backend, database, or external APIs are described.

##### Components & Interactions
a. Main Components
1. Developer Environment
- Editor/IDE (e.g. VSCode)
- Git (clone, commit, push)
2. Build Toolchain
- pnpm & Node.js
- Astro CLI (astro.config.mjs)
3. Source Folders
- src/pages → input pages
- src/layouts → templates
- src/components → UI building blocks
- src/assets + src/metadata → data inputs
- src/styles → global CSS
- public/ → static pass-through assets
4. Hosting & CDN
- e.g. Vercel, Netlify, GitHub Pages (not in repo, but implied)
b. Relationships & Data Flow
1. Developer edits source in src/.
2. pnpm run dev/build invokes Astro CLI.
3. Astro reads astro.config.mjs, loads pages + layouts + components + assets + metadata + styles.
4. Astro compiles them into static HTML/CSS/JS in a dist/ (output) folder.
5. The dist/ folder (plus any public/) is deployed to the hosting/CDN.
6. End-user HTTP request → CDN cache → serves pre-built static files.
c. Architectural Patterns & Principles
- Component-based UI (Astro components)
- Single-page entry with layout + slots pattern
- Data-driven rendering (socialLinks.ts supplying link data)
- Static site generation (SSG) for performance
d. Key Technologies
- Astro framework
- Node.js & pnpm
- TypeScript (tsconfig.json)
- Vanilla CSS (styles.css)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Environment
    subgraph "Developer Environment"
        editor["Editor/IDE"]:::devEnv
        git["Git"]:::devEnv
        readme["README.md"]:::devEnv
        gitignore[".gitignore"]:::devEnv
        vscode[".vscode/"]:::devEnv
    end

    %% Source Modules
    subgraph "Source Modules"
        pages["src/pages/index.astro"]:::source
        layouts["src/layouts/Layout.astro"]:::source
        compLinks["src/components/Links.astro"]:::source
        compNav["src/components/Nav.astro"]:::source
        compPopUp["src/components/PopUp.astro"]:::source
        iconInstagram["src/images/icons/Instagram.astro"]:::source
        iconLink["src/images/icons/Link.astro"]:::source
        iconMastodon["src/images/icons/Mastodon.astro"]:::source
        iconMoon["src/images/icons/Moon.astro"]:::source
        iconPinterest["src/images/icons/Pinterest.astro"]:::source
        iconReddit["src/images/icons/Reddit.astro"]:::source
        iconShare["src/images/icons/Share.astro"]:::source
        iconSpotify["src/images/icons/Spotify.astro"]:::source
        iconSubStack["src/images/icons/SubStack.astro"]:::source
        iconSun["src/images/icons/Sun.astro"]:::source
        iconThreads["src/images/icons/Threads.astro"]:::source
        iconTumblr["src/images/icons/Tumblr.astro"]:::source
        iconX["src/images/icons/X.astro"]:::source
        iconXSocial["src/images/icons/XSocial.astro"]:::source
        assets["src/assets/socialLinks.ts"]:::source
        metadata["src/metadata/metadata.ts"]:::source
        styles["src/styles/styles.css"]:::source
        public["public/"]:::source
    end

    %% Build Toolchain
    subgraph "Build Toolchain"
        node["Node.js & pnpm\n(package.json, pnpm-lock.yaml)"]:::build
        astro["Astro CLI\n(astro.config.mjs)"]:::build
        tsconfig["tsconfig.json"]:::build
    end

    %% Output & Hosting
    dist["Static Output (dist/)"]:::output
    hosting["Hosting/CDN\n(Vercel/Netlify/GitHub Pages)"]:::hosting
    endUser["End User"]:::hosting

    %% Relationships
    editor -.-> pages
    editor -.-> layouts
    editor -.-> compLinks
    git -.-> readme
    git -.-> gitignore
    git -.-> vscode

    pages --> astro
    layouts --> astro
    compLinks --> astro
    compNav --> astro
    compPopUp --> astro
    iconInstagram --> astro
    iconLink --> astro
    iconMastodon --> astro
    iconMoon --> astro
    iconPinterest --> astro
    iconReddit --> astro
    iconShare --> astro
    iconSpotify --> astro
    iconSubStack --> astro
    iconSun --> astro
    iconThreads --> astro
    iconTumblr --> astro
    iconX --> astro
    iconXSocial --> astro
    assets --> astro
    metadata --> astro
    styles --> astro
    public --> astro

    node --> astro
    tsconfig --> astro

    astro --> dist
    dist --> hosting
    hosting --> endUser

    %% Click Events
    click astro.config.mjs "https://github.com/malsebasmal/linkmalsebas/blob/main/astro.config.mjs"
    click node "https://github.com/malsebasmal/linkmalsebas/blob/main/package.json"
    click node "https://github.com/malsebasmal/linkmalsebas/blob/main/pnpm-lock.yaml"
    click tsconfig "https://github.com/malsebasmal/linkmalsebas/blob/main/tsconfig.json"
    click public "https://github.com/malsebasmal/linkmalsebas/tree/main/public/"
    click pages "https://github.com/malsebasmal/linkmalsebas/blob/main/src/pages/index.astro"
    click layouts "https://github.com/malsebasmal/linkmalsebas/blob/main/src/layouts/Layout.astro"
    click compLinks "https://github.com/malsebasmal/linkmalsebas/blob/main/src/components/Links.astro"
    click compNav "https://github.com/malsebasmal/linkmalsebas/blob/main/src/components/Nav.astro"
    click compPopUp "https://github.com/malsebasmal/linkmalsebas/blob/main/src/components/PopUp.astro"
    click iconInstagram "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Instagram.astro"
    click iconLink "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Link.astro"
    click iconMastodon "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Mastodon.astro"
    click iconMoon "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Moon.astro"
    click iconPinterest "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Pinterest.astro"
    click iconReddit "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Reddit.astro"
    click iconShare "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Share.astro"
    click iconSpotify "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Spotify.astro"
    click iconSubStack "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/SubStack.astro"
    click iconSun "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Sun.astro"
    click iconThreads "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Threads.astro"
    click iconTumblr "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/Tumblr.astro"
    click iconX "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/X.astro"
    click iconXSocial "https://github.com/malsebasmal/linkmalsebas/blob/main/src/images/icons/XSocial.astro"
    click assets "https://github.com/malsebasmal/linkmalsebas/blob/main/src/assets/socialLinks.ts"
    click metadata "https://github.com/malsebasmal/linkmalsebas/blob/main/src/metadata/metadata.ts"
    click styles "https://github.com/malsebasmal/linkmalsebas/blob/main/src/styles/styles.css"
    click readme "https://github.com/malsebasmal/linkmalsebas/blob/main/README.md"
    click gitignore "https://github.com/malsebasmal/linkmalsebas/blob/main/.gitignore"
    click vscode "https://github.com/malsebasmal/linkmalsebas/tree/main/.vscode/"

    %% Styles
    classDef devEnv fill:#F0E68C,stroke:#333,stroke-width:1px
    classDef source fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef build fill:#90EE90,stroke:#333,stroke-width:1px
    classDef output fill:#FFA500,stroke:#333,stroke-width:1px
    classDef hosting fill:#DDA0DD,stroke:#333,stroke-width:1px
```
