# markvandendool/novaxe-seb-million-song-mind architecture

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

- Interactive diagram: https://gitdiagram.com/markvandendool/novaxe-seb-million-song-mind
- Repository: https://github.com/markvandendool/novaxe-seb-million-song-mind

## Overview

##### Project type and purpose
- This is a full-stack “Musical Intelligence Platform” whose primary mission is to preserve a decade-old, 50K-line Angular 11 “Novaxe Brain” (the mature musical-algorithm core) while adding modern data-processing and visualization via a React “MSM Bridge.”
- The Angular 11 app (novaxe-seb-ng11) is the primary UI and algorithm host; the React app (Novaxe A20 Oracle React/apps/msm) is a secondary analysis/visualization interface. A PHP-based API layer serves data persistence and external-service integration.

##### File structure
- Top-level modules:
– novaxe-seb-ng11/ – Angular 11 “Mature Brain”
– “Novaxe A20 Oracle React”/apps/msm – React “Bridge”
– scripts/ – orchestration, data-processing, migration, forensics
– forensics/, logs/ – audit trails and forensic reports
– Old Viper Scripts, dual-machine tests, kill-switches, CPU monitors (operational tooling)
– Angular has src/app/components, services, models, API endpoints (PHP under src/api), DB schema (src/db/mysongs.sql)
– React has its own package.json and dev server for MSM
- A variety of bash, Python and Node scripts orchestrate data flows (Million Song dataset, migration tests).

##### README for additional insights
- Two primary subsystems:
– 🧠 Novaxe Brain (Angular 11) – decade of musical algorithms, sub-ms MIDI latency, advanced theory
– 🌉 MSM Bridge (React) – modern analysis & real-time visualization, million-song dataset integration
- Preservation mandates: never rewrite existing algorithms, only integrate/supplement
- Data flows: UI → algorithm core → database → external services (Spotify, YouTube-dl, Discogs) → React

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        AngularCore["Novaxe Brain\n(Angular 11 UI / TypeScript / RxJS)"]:::green
        ReactBridge["MSM Bridge\n(React / Node.js)"]:::blue
    end

    %% Backend Layer
    subgraph "Backend Layer"
        API["PHP API Layer\n(REST endpoints)"]:::orange
        DB["MySQL Database\n(mysongs.sql)"]:::orange
    end

    %% Batch & Tooling
    subgraph "Batch & Tooling"
        Scripts["Batch Scripts\n(Python, Bash, Node)"]:::gray
        MigrationWS["Migration Workspace"]:::gray
        OpsTooling["Operational Tooling\n(Kill-switches, CPU monitors)"]:::gray
    end

    %% Logging & Forensics
    subgraph "Logging & Forensics"
        Logs["Logging Subsystem\n(audit trails)"]:::gray
        Forensics["Forensics Reports"]:::gray
    end

    %% External Services
    subgraph "External Services"
        Spotify["Spotify API"]:::red
        Discogs["Discogs API"]:::red
        YoutubeDL["YouTube-dl"]:::red
        PHPMailer["PHPMailer"]:::red
        MIDIDev["MIDI Devices"]:::red
    end

    %% Relationships
    AngularCore -->|API calls| API
    API -->|CRUD| DB
    AngularCore -->|uses service| Spotify
    AngularCore -->|uses service| Discogs
    AngularCore -->|uses service| YoutubeDL
    AngularCore -->|interfaces| MIDIDev
    ReactBridge <-->|real-time data| AngularCore
    Scripts -->|reads/writes| DB
    Scripts -->|feeds| AngularCore
    MigrationWS -->|mirrors| API
    MigrationWS -->|mirrors| DB
    API -->|logs events| Logs
    AngularCore -->|logs events| Logs
    Scripts -->|forensics data| Forensics
    OpsTooling -->|monitors| AngularCore
    OpsTooling -->|kills on errors| API

    %% Click Events
    click AngularCore "https://github.com/markvandendool/novaxe-seb-million-song-mind/tree/main/novaxe-seb-ng11/"
    click API "https://github.com/markvandendool/novaxe-seb-million-song-mind/tree/main/novaxe-seb-ng11/src/api/"
    click DB "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/novaxe-seb-ng11/src/db/mysongs.sql"
    click Scripts "https://github.com/markvandendool/novaxe-seb-million-song-mind/tree/main/scripts/"
    click MigrationWS "https://github.com/markvandendool/novaxe-seb-million-song-mind/tree/main/novaxe-seb-MIGRATION-WORKSPACE/"
    click OpsTooling "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/cpu-monitor.sh"
    click Logs "https://github.com/markvandendool/novaxe-seb-million-song-mind/tree/main/logs/"
    click Forensics "https://github.com/markvandendool/novaxe-seb-million-song-mind/tree/main/forensics/"

    %% Angular API files
    click createUser "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/novaxe-seb-ng11/src/api/createUser.php"
    click deleteSong "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/novaxe-seb-ng11/src/api/deleteSong.php"
    click discogsAPI "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/novaxe-seb-ng11/src/api/discogs/discogs.php"
    click getChords "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/novaxe-seb-ng11/src/api/getChords/getChordsFromYoutube.php"

    %% Angular Services
    click SpotifyService "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/novaxe-seb-ng11/src/app/services/spotify/spotify.service.ts"
    click DiscogsService "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/novaxe-seb-ng11/src/app/services/discogs/discogs.service.ts"
    click YoutubeService "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/novaxe-seb-ng11/src/app/services/youtube-service/youtube.service.ts"
    click TransportWorker "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/novaxe-seb-ng11/src/app/services/transport/chrono.worker.ts"

    %% Angular Components & Models
    click AppSrc "https://github.com/markvandendool/novaxe-seb-million-song-mind/tree/main/novaxe-seb-ng11/src/app/"

    %% Scripts examples
    click Enricher "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/scripts/spotify-data-enricher.py"
    click MigrationScript "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/scripts/angular-migration-v2.sh"
    click ForensicsCollect "https://github.com/markvandendool/novaxe-seb-million-song-mind/blob/main/scripts/collect-forensics.sh"

    %% Styles
    classDef green fill:#e0f2e9,stroke:#2d7a4b,color:#07411d;
    classDef blue fill:#e0f0ff,stroke:#3366cc,color:#003399;
    classDef orange fill:#fff4e5,stroke:#cc8400,color:#663d00;
    classDef gray fill:#f0f0f0,stroke:#999999,color:#333333;
    classDef red fill:#ffe5e5,stroke:#cc0000,color:#990000;
```
