# premsai626/vibe_tune architecture

> Architecture diagram of the GitHub repository premsai626/vibe_tune, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/premsai626/vibe_tune
- Repository: https://github.com/premsai626/vibe_tune

## Overview

VibeTune is a browser-based mood-matching music and procedural-audio studio. A user enters through the login/guest experience, submits a vibe prompt or chooses a mood, and the app selects a mood and curated tracks before presenting a playback studio with synthesis, mixing, and visualization. Separate capabilities include camera-based emotion detection, Spotify playback, weather effects, and mindfulness tools. The graph reflects documented features and shown imports/calls; some component wiring and unexcerpted implementations remain uncertain, so those links are omitted.

Main entry points: [`src/App.jsx`](https://github.com/premsai626/vibe_tune/blob/main/src/App.jsx) (App coordinator), [`src/audio/VibeMatcher.js`](https://github.com/premsai626/vibe_tune/blob/main/src/audio/VibeMatcher.js) (Vibe matching), [`src/audio/AudioEngine.js`](https://github.com/premsai626/vibe_tune/blob/main/src/audio/AudioEngine.js) (Web Audio engine), [`src/components/NowPlayingStage.jsx`](https://github.com/premsai626/vibe_tune/blob/main/src/components/NowPlayingStage.jsx) (Now-playing stage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App coordinator<br/>[App.jsx]"]
  node_login["Login and guest entry<br/>[LoginPage.jsx]"]
  node_landing["Landing and mood choices<br/>[LandingPage.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
end

subgraph group_discovery["Mood discovery"]
  node_moodresults["Mood results"]
  node_vibesearch["Vibe prompt search<br/>[VibeSearchHero.jsx]"]
  node_matcher["Vibe matching<br/>[VibeMatcher.js]"]
  node_vibedata["Vibe profiles<br/>[vibes.js]"]
  node_mooddata["Mood and language catalog<br/>[moods.js]"]
  node_trackdata["Procedural track catalog<br/>[tracks.js]"]
end

subgraph group_studio["Audio studio"]
  node_stage["Now-playing stage"]
  node_engine["Web Audio engine<br/>[AudioEngine.js]"]
  node_controls["Playback controls<br/>[PlayerControls.jsx]"]
  node_mixer["Stem and ambient mixers<br/>[StemMixer.jsx]"]
  node_equalizer["Graphic equalizer<br/>[EqualizerModal.jsx]"]
  node_visualizer["Audio visualizer"]
  node_dropzone["Audio import<br/>[AudioDropZone.jsx]"]
  node_weather["Weather atmosphere<br/>[WeatherCanvas.jsx]"]
end

subgraph group_wellness["Wellness features"]
  node_face["Face emotion scanner"]
  node_breathing["Guided breathwork<br/>[BreatheModal.jsx]"]
  node_journal["Mood journal<br/>[JournalModal.jsx]"]
  node_tracker["Mood analytics<br/>[TrackerModal.jsx]"]
end

subgraph group_services["Accounts and integrations"]
  node_auth["Auth interface"]
  node_supabase["Supabase client and local fallback<br/>[supabase.js]"]
  node_spotify["Spotify player dock"]
end

node_user(("Listener"))
node_supabase_service[("Supabase service")]
node_camera(("Camera device"))

node_user -->|"opens"| node_login
node_app -->|"shows before entry"| node_login
node_user -->|"submits prompt"| node_vibesearch
node_app -->|"matches prompt"| node_matcher
node_landing -->|"matches prompt"| node_matcher
node_matcher -->|"scores profiles"| node_vibedata
node_matcher -->|"curates tracks"| node_trackdata
node_app -->|"maps mood"| node_mooddata
node_app -->|"renders results"| node_moodresults
node_app -->|"renders studio"| node_stage
node_stage -->|"renders"| node_visualizer
node_stage -->|"renders"| node_mixer
node_controls -->|"controls playback"| node_engine
node_visualizer -->|"reads audio analysis"| node_engine
node_dropzone -->|"loads imported audio"| node_engine
node_equalizer -->|"adjusts DSP"| node_engine
node_user -->|"starts scan"| node_face
node_camera -.->|"provides frames"| node_face
node_user -->|"starts breathwork"| node_breathing
node_user -->|"writes reflection"| node_journal
node_user -->|"views trends"| node_tracker
node_auth -->|"uses client"| node_supabase
node_supabase -.->|"auth and data requests"| node_supabase_service
node_app -->|"sets atmosphere"| node_weather
node_app -->|"renders dock"| node_spotify

click node_app "https://github.com/premsai626/vibe_tune/blob/main/src/App.jsx"
click node_login "https://github.com/premsai626/vibe_tune/blob/main/src/components/LoginPage.jsx"
click node_landing "https://github.com/premsai626/vibe_tune/blob/main/src/components/LandingPage.jsx"
click node_navbar "https://github.com/premsai626/vibe_tune/blob/main/src/components/Navbar.jsx"
click node_moodresults "https://github.com/premsai626/vibe_tune/blob/main/src/components/MoodResultsView.jsx"
click node_vibesearch "https://github.com/premsai626/vibe_tune/blob/main/src/components/VibeSearchHero.jsx"
click node_matcher "https://github.com/premsai626/vibe_tune/blob/main/src/audio/VibeMatcher.js"
click node_vibedata "https://github.com/premsai626/vibe_tune/blob/main/src/data/vibes.js"
click node_mooddata "https://github.com/premsai626/vibe_tune/blob/main/src/data/moods.js"
click node_trackdata "https://github.com/premsai626/vibe_tune/blob/main/src/data/tracks.js"
click node_stage "https://github.com/premsai626/vibe_tune/blob/main/src/components/NowPlayingStage.jsx"
click node_engine "https://github.com/premsai626/vibe_tune/blob/main/src/audio/AudioEngine.js"
click node_controls "https://github.com/premsai626/vibe_tune/blob/main/src/components/PlayerControls.jsx"
click node_mixer "https://github.com/premsai626/vibe_tune/blob/main/src/components/StemMixer.jsx"
click node_equalizer "https://github.com/premsai626/vibe_tune/blob/main/src/components/EqualizerModal.jsx"
click node_visualizer "https://github.com/premsai626/vibe_tune/blob/main/src/components/VisualizerCanvas.jsx"
click node_dropzone "https://github.com/premsai626/vibe_tune/blob/main/src/components/AudioDropZone.jsx"
click node_weather "https://github.com/premsai626/vibe_tune/blob/main/src/components/WeatherCanvas.jsx"
click node_face "https://github.com/premsai626/vibe_tune/blob/main/src/components/FaceDetectorModal.jsx"
click node_breathing "https://github.com/premsai626/vibe_tune/blob/main/src/components/BreatheModal.jsx"
click node_journal "https://github.com/premsai626/vibe_tune/blob/main/src/components/JournalModal.jsx"
click node_tracker "https://github.com/premsai626/vibe_tune/blob/main/src/components/TrackerModal.jsx"
click node_auth "https://github.com/premsai626/vibe_tune/blob/main/src/components/SupabaseAuthModal.jsx"
click node_supabase "https://github.com/premsai626/vibe_tune/blob/main/src/lib/supabase.js"
click node_spotify "https://github.com/premsai626/vibe_tune/blob/main/src/components/SpotifyPlayerBar.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_login,node_landing,node_navbar toneBlue
class node_moodresults,node_vibesearch,node_matcher,node_vibedata,node_mooddata,node_trackdata,node_supabase_service toneAmber
class node_stage,node_engine,node_controls,node_mixer,node_equalizer,node_visualizer,node_dropzone,node_weather toneMint
class node_face,node_breathing,node_journal,node_tracker toneRose
class node_auth,node_supabase,node_spotify,node_user,node_camera toneIndigo
```

## Components

### App experience

- [App coordinator](https://github.com/premsai626/vibe_tune/blob/main/src/App.jsx): `src/App.jsx`
- [Login and guest entry](https://github.com/premsai626/vibe_tune/blob/main/src/components/LoginPage.jsx): `src/components/LoginPage.jsx`
- [Landing and mood choices](https://github.com/premsai626/vibe_tune/blob/main/src/components/LandingPage.jsx): `src/components/LandingPage.jsx`
- [Navigation](https://github.com/premsai626/vibe_tune/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`

### Mood discovery

- [Mood results](https://github.com/premsai626/vibe_tune/blob/main/src/components/MoodResultsView.jsx): `src/components/MoodResultsView.jsx`
- [Vibe prompt search](https://github.com/premsai626/vibe_tune/blob/main/src/components/VibeSearchHero.jsx): `src/components/VibeSearchHero.jsx`
- [Vibe matching](https://github.com/premsai626/vibe_tune/blob/main/src/audio/VibeMatcher.js): `src/audio/VibeMatcher.js`
- [Vibe profiles](https://github.com/premsai626/vibe_tune/blob/main/src/data/vibes.js): `src/data/vibes.js`
- [Mood and language catalog](https://github.com/premsai626/vibe_tune/blob/main/src/data/moods.js): `src/data/moods.js`
- [Procedural track catalog](https://github.com/premsai626/vibe_tune/blob/main/src/data/tracks.js): `src/data/tracks.js`

### Audio studio

- [Now-playing stage](https://github.com/premsai626/vibe_tune/blob/main/src/components/NowPlayingStage.jsx): `src/components/NowPlayingStage.jsx`
- [Web Audio engine](https://github.com/premsai626/vibe_tune/blob/main/src/audio/AudioEngine.js): `src/audio/AudioEngine.js`
- [Playback controls](https://github.com/premsai626/vibe_tune/blob/main/src/components/PlayerControls.jsx): `src/components/PlayerControls.jsx`
- [Stem and ambient mixers](https://github.com/premsai626/vibe_tune/blob/main/src/components/StemMixer.jsx): `src/components/StemMixer.jsx`
- [Graphic equalizer](https://github.com/premsai626/vibe_tune/blob/main/src/components/EqualizerModal.jsx): `src/components/EqualizerModal.jsx`
- [Audio visualizer](https://github.com/premsai626/vibe_tune/blob/main/src/components/VisualizerCanvas.jsx): `src/components/VisualizerCanvas.jsx`
- [Audio import](https://github.com/premsai626/vibe_tune/blob/main/src/components/AudioDropZone.jsx): `src/components/AudioDropZone.jsx`
- [Weather atmosphere](https://github.com/premsai626/vibe_tune/blob/main/src/components/WeatherCanvas.jsx): `src/components/WeatherCanvas.jsx`

### Wellness features

- [Face emotion scanner](https://github.com/premsai626/vibe_tune/blob/main/src/components/FaceDetectorModal.jsx): `src/components/FaceDetectorModal.jsx`
- [Guided breathwork](https://github.com/premsai626/vibe_tune/blob/main/src/components/BreatheModal.jsx): `src/components/BreatheModal.jsx`
- [Mood journal](https://github.com/premsai626/vibe_tune/blob/main/src/components/JournalModal.jsx): `src/components/JournalModal.jsx`
- [Mood analytics](https://github.com/premsai626/vibe_tune/blob/main/src/components/TrackerModal.jsx): `src/components/TrackerModal.jsx`

### Accounts and integrations

- [Auth interface](https://github.com/premsai626/vibe_tune/blob/main/src/components/SupabaseAuthModal.jsx): `src/components/SupabaseAuthModal.jsx`
- [Supabase client and local fallback](https://github.com/premsai626/vibe_tune/blob/main/src/lib/supabase.js): `src/lib/supabase.js`
- [Spotify player dock](https://github.com/premsai626/vibe_tune/blob/main/src/components/SpotifyPlayerBar.jsx): `src/components/SpotifyPlayerBar.jsx`

### Other components

- **Listener**
- **Supabase service**
- **Camera device**

## Connections

- Listener → Login and guest entry: opens
- App coordinator → Login and guest entry: shows before entry (evidence: `src/App.jsx`)
- Listener → Vibe prompt search: submits prompt (evidence: `README.md`)
- App coordinator → Vibe matching: matches prompt (evidence: `src/App.jsx`)
- Landing and mood choices → Vibe matching: matches prompt (evidence: `src/components/LandingPage.jsx`)
- Vibe matching → Vibe profiles: scores profiles (evidence: `src/audio/VibeMatcher.js`)
- Vibe matching → Procedural track catalog: curates tracks (evidence: `src/audio/VibeMatcher.js`)
- App coordinator → Mood and language catalog: maps mood (evidence: `src/App.jsx`)
- App coordinator → Mood results: renders results (evidence: `src/App.jsx`)
- App coordinator → Now-playing stage: renders studio (evidence: `src/App.jsx`)
- Now-playing stage → Audio visualizer: renders (evidence: `src/components/NowPlayingStage.jsx`)
- Now-playing stage → Stem and ambient mixers: renders (evidence: `src/components/NowPlayingStage.jsx`)
- Playback controls → Web Audio engine: controls playback (evidence: `src/components/PlayerControls.jsx`)
- Audio visualizer → Web Audio engine: reads audio analysis (evidence: `src/components/VisualizerCanvas.jsx`)
- Audio import → Web Audio engine: loads imported audio (evidence: `src/components/AudioDropZone.jsx`)
- Graphic equalizer → Web Audio engine: adjusts DSP (evidence: `src/components/EqualizerModal.jsx`)
- Listener → Face emotion scanner: starts scan (evidence: `README.md`)
- Camera device → Face emotion scanner: provides frames
- Listener → Guided breathwork: starts breathwork (evidence: `README.md`)
- Listener → Mood journal: writes reflection (evidence: `README.md`)
- Listener → Mood analytics: views trends (evidence: `README.md`)
- Auth interface → Supabase client and local fallback: uses client (evidence: `src/components/SupabaseAuthModal.jsx`)
- Supabase client and local fallback → Supabase service: auth and data requests
- App coordinator → Weather atmosphere: sets atmosphere (evidence: `src/App.jsx`)
- App coordinator → Spotify player dock: renders dock (evidence: `src/App.jsx`)
