# muratsungu/my_spotify_data architecture

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

- Interactive diagram: https://gitdiagram.com/muratsungu/my_spotify_data
- Repository: https://github.com/muratsungu/my_spotify_data

## Overview

##### Project type and purpose
- This is a simple data‐ingestion/demo project whose sole purpose is to import JSON‐formatted Spotify data into SQL Server.
- It is not a multi‐service application; it’s effectively a one‐off ETL (Extract‐Transform‐Load) script example.

##### File structure
Top-level files:
- JSON_import.sql           – main import script
- JSON_import_basic.sql     – minimal or alternate import script
- YourLibrary.json          – sample Spotify library data in JSON
- README.md                 – project description

There are no “frontend” or “backend” directories, no microservices, no build scripts—just scripts and a sample data file.

##### README for additional insights
- The README confirms that the incoming data is JSON from Spotify, and the scripts demonstrate loading that JSON into SQL Server.

##### Detail
- Even though the project is small, call out each SQL step (e.g., staging table, OPENJSON call, target table).

## Diagram (Mermaid)

```mermaid
graph TB
    User["User / Scheduler"]:::user
    README["README / Instructions"]:::doc
    JSON["Spotify JSON File"]:::json
    Basic["Basic Import Script"]:::script
    Adv["Advanced Import Script"]:::script
    subgraph "Advanced Script Details"
        Stage["Staging Table Load"]:::step
        Parse["OPENJSON Parsing"]:::step
        Normalize["Normalization & Insert"]:::step
    end
    DB["SQL Server Database"]:::db

    User -->|initiates| Basic
    User -->|initiates| Adv
    README -->|describes| User
    JSON -->|feeds data| Basic
    JSON -->|feeds data| Adv
    Basic -->|loads into| DB
    Adv -->|stage data in| Stage
    Stage -->|parse JSON with| Parse
    Parse -->|normalize and insert into| Normalize
    Normalize -->|inserts into| DB

    click JSON "https://github.com/muratsungu/my_spotify_data/blob/main/YourLibrary.json"
    click Basic "https://github.com/muratsungu/my_spotify_data/blob/main/JSON_import_basic.sql"
    click Adv "https://github.com/muratsungu/my_spotify_data/blob/main/JSON_import.sql"
    click README "https://github.com/muratsungu/my_spotify_data/blob/main/README.md"

    classDef json fill:#fdfd96,stroke:#333,stroke-width:1px
    classDef script fill:#98fb98,stroke:#333,stroke-width:1px
    classDef step fill:#b3ffb3,stroke:#333,stroke-width:1px
    classDef db fill:#add8e6,stroke:#333,stroke-width:1px
    classDef user fill:#ffb347,stroke:#333,stroke-width:1px
    classDef doc fill:#ffd1dc,stroke:#333,stroke-width:1px
```
