# ldelbel/music-store-website architecture

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

- Interactive diagram: https://gitdiagram.com/ldelbel/music-store-website
- Repository: https://github.com/ldelbel/music-store-website

## Overview

##### Project type and purpose
- This is a simple static front-end website (an online musical instruments store prototype) built with HTML, CSS (Sass), Bootstrap 4, and FontAwesome.
- There is no application server or database; it’s deployed as a set of static assets (HTML, CSS, fonts, images).

##### File structure
- Top-level:
- index.html, search.html – the two HTML pages served to users
- css/ – contains Sass build config, fonts, and the compiled styles.css
- images/ – static image assets
- .github/workflows/linters.yml – CI pipeline for style and code linting
- README.md, .gitignore
- Build tooling:
- sass CLI invoked via npm script (npm run compile:sass)
- stylelint config in css/stylelint.config.js
- Stickler config for CSS linting

##### README for additional insights
- Built with HTML, CSS (Sass), Bootstrap 4, FontAwesome
- Live demo hosted on GitHub Pages
- Developer uses Sass CLI globally and GitHub Actions for linting

##### Main components
a. Local Development Environment
- Developer workstation
- Tools: Code editor, Sass CLI, stylelint, Git
b. Version Control & CI
- GitHub Repository
- GitHub Actions (linters.yml) for stylelint and Stickler checks
c. Build Process
- Sass compiler transforms .scss → css/styles.css
d. Hosting
- GitHub Pages (static file hosting)
e. Client
- Web browser loading index.html/search.html and their CSS, fonts, images

##### Relationships and data flow
1. Developer writes HTML, Sass, commits to GitHub.
2. Push triggers GitHub Actions: run stylelint + Stickler.
3. Upon passing, code is deployed to GitHub Pages.
4. Client browser requests index.html or search.html.
5. Browser fetches styles.css, font files, images.
6. Sass source files are local only; production sees only compiled CSS.

##### Architectural patterns/design principles
- Static Website Architecture
- CI-as-code: GitHub Actions for linting
- Separation of concerns:
- HTML markup (index.html/search.html)
- Styles (Sass → CSS)
- Assets (fonts, images)
- Build pipeline: local compile vs. CI lint checks

##### Detail to capture
- Directory breakdown: css/ (fonts, stylelint config, styles.css), images/, HTML pages
- Build commands: npm run compile:sass
- CI workflow file location and purpose
- Technologies: Sass, Bootstrap 4, FontAwesome, GitHub Actions, GitHub Pages
- Client resource loading sequence (HTML → CSS → fonts/images)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Development Environment
    subgraph "Development Environment"
        Developer["Developer Workstation"]:::dev
        CodeEditor["Code Editor"]:::dev
        SassCLI["Sass CLI"]:::dev
        StylelintTool["stylelint"]:::dev
        GitTool["Git"]:::dev
    end

    %% Version Control Repository
    subgraph "GitHub Repository"
        Repo["Repository"]:::ci
        README["README.md"]:::doc
        Gitignore[".gitignore"]:::doc
    end

    %% CI Build Pipeline
    subgraph "CI Build"
        CIWorkflow["GitHub Actions"]:::ci
        StylelintCfg["css/stylelint.config.js"]:::ci
        SticklerCfg["css/.stickler.yml"]:::ci
    end

    %% Local Build Process
    subgraph "Local Build"
        SassCompile["npm run compile:sass"]:::build
        CompiledCSS["css/styles.css"]:::build
    end

    %% Hosting
    subgraph "Hosting (GitHub Pages)"
        Pages["GitHub Pages"]:::host
        IndexHTML["index.html"]:::ci
        SearchHTML["search.html"]:::ci
        Fonts["css/fonts/"]:::asset
        Images["images/"]:::asset
    end

    %% Client
    subgraph "Client"
        Browser["Web Browser"]:::client
    end

    %% Relationships
    Developer -->|writes code & commits| Repo
    Developer -->|uses tools| CodeEditor
    Developer --> SassCLI
    Developer --> StylelintTool
    Developer --> GitTool

    Repo -->|push triggers| CIWorkflow
    CIWorkflow -->|runs stylelint rules| StylelintCfg
    CIWorkflow -->|runs Stickler checks| SticklerCfg
    CIWorkflow -->|deploys on success| Pages

    Developer -->|compile .scss→.css| SassCompile
    SassCompile --> CompiledCSS

    Pages --> IndexHTML
    Pages --> SearchHTML
    Pages --> CompiledCSS
    Pages --> Fonts
    Pages --> Images

    Browser -->|HTTP GET index.html| Pages
    Browser -->|HTTP GET search.html| Pages
    Browser -->|loads CSS| Pages
    Browser -->|loads fonts/images| Pages

    %% Click Events
    click CIWorkflow "https://github.com/ldelbel/music-store-website/blob/master/.github/workflows/linters.yml"
    click StylelintCfg "https://github.com/ldelbel/music-store-website/blob/master/css/stylelint.config.js"
    click SticklerCfg "https://github.com/ldelbel/music-store-website/blob/master/css/.stickler.yml"
    click CompiledCSS "https://github.com/ldelbel/music-store-website/blob/master/css/styles.css"
    click Fonts "https://github.com/ldelbel/music-store-website/tree/master/css/fonts/"
    click Images "https://github.com/ldelbel/music-store-website/tree/master/images/"
    click IndexHTML "https://github.com/ldelbel/music-store-website/blob/master/index.html"
    click SearchHTML "https://github.com/ldelbel/music-store-website/blob/master/search.html"
    click README "https://github.com/ldelbel/music-store-website/blob/master/README.md"
    click Gitignore "https://github.com/ldelbel/music-store-website/blob/master/.gitignore"

    %% Styles
    classDef dev fill:#D0E8FF,stroke:#333,stroke-width:1px
    classDef ci fill:#FFE0B2,stroke:#333,stroke-width:1px
    classDef build fill:#FFD54F,stroke:#333,stroke-width:1px
    classDef host fill:#C8E6C9,stroke:#333,stroke-width:1px
    classDef client fill:#E1BEE7,stroke:#333,stroke-width:1px
    classDef doc fill:#CFD8DC,stroke:#333,stroke-width:1px
    classDef asset fill:#F0F4C3,stroke:#333,stroke-width:1px
```
