# lauraevan/polarisbeta architecture

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

- Interactive diagram: https://gitdiagram.com/lauraevan/polarisbeta
- Repository: https://github.com/lauraevan/polarisbeta

## Overview

Polaris One is a browser-based multi-service app presented through a desktop-style shell. Users enter through routed pages, then use browser/app discovery, games and emulation, media and music, AI tools, chat, and account or personalization features. The source index and excerpts confirm the router, shell, settings, authentication, chat, and storage relationships shown; most feature implementations were not sampled, so their links are dashed where the tree alone suggests the capability but does not establish its wiring.

Main entry points: [`src/routeTree.gen.ts`](https://github.com/lauraevan/polarisbeta/blob/main/src/routeTree.gen.ts) (Page routes), [`src/routes/settings.tsx`](https://github.com/lauraevan/polarisbeta/blob/main/src/routes/settings.tsx) (Settings), [`src/components/polaris/AppShell.tsx`](https://github.com/lauraevan/polarisbeta/blob/main/src/components/polaris/AppShell.tsx) (Desktop shell), [`src/components/polaris/chat/ChatRoom.tsx`](https://github.com/lauraevan/polarisbeta/blob/main/src/components/polaris/chat/ChatRoom.tsx) (Chat rooms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_router["Router<br/>[router.tsx]"]
  node_route_tree["Page routes<br/>[routeTree.gen.ts]"]
  node_app_shell["Desktop shell<br/>[AppShell.tsx]"]
end

subgraph group_features["Product features"]
  node_browser_apps["Browser and apps<br/>[apps.tsx]"]
  node_games["Games and emulation"]
  node_media["Streaming and media"]
  node_music["Music"]
  node_ai["AI tools"]
  node_chat["Chat rooms<br/>[ChatRoom.tsx]"]
end

subgraph group_identity["Identity and settings"]
  node_settings_page["Settings<br/>[settings.tsx]"]
  node_profile["Profile<br/>[ProfileSheet.tsx]"]
  node_auth["Authentication<br/>[auth-context.tsx]"]
  node_customization["Customization"]
end

subgraph group_services["Data services"]
  node_safe_storage["Safe browser storage<br/>[safe-storage.ts]"]
  node_music_storage["Music library storage<br/>[music-storage.ts]"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_bot_commands["Bot commands<br/>[polaris-bot.ts]"]
end

node_user(("User"))
node_supabase[("Supabase")]

node_user -->|"opens app"| node_router
node_router -->|"loads routes"| node_route_tree
node_route_tree -->|"registers page"| node_browser_apps
node_browser_apps -->|"renders in"| node_app_shell
node_route_tree -.->|"routes to"| node_games
node_route_tree -.->|"routes to"| node_media
node_route_tree -.->|"routes to"| node_music
node_route_tree -.->|"routes to"| node_ai
node_route_tree -.->|"routes to"| node_chat
node_route_tree -->|"routes to"| node_settings_page
node_app_shell -.->|"opens settings"| node_settings_page
node_app_shell -->|"shows profile"| node_profile
node_settings_page -->|"renders"| node_customization
node_settings_page -.->|"uses preferences"| node_safe_storage
node_customization -->|"persists settings"| node_safe_storage
node_auth -->|"queries auth"| node_supabase_client
node_supabase_client -.->|"connects"| node_supabase
node_profile -->|"reads identity"| node_auth
node_chat -->|"reads and writes"| node_supabase_client
node_chat -->|"runs commands"| node_bot_commands
node_music_storage -->|"persists library"| node_safe_storage
node_music -.->|"uses library"| node_music_storage

click node_router "https://github.com/lauraevan/polarisbeta/blob/main/src/router.tsx"
click node_route_tree "https://github.com/lauraevan/polarisbeta/blob/main/src/routeTree.gen.ts"
click node_app_shell "https://github.com/lauraevan/polarisbeta/blob/main/src/components/polaris/AppShell.tsx"
click node_browser_apps "https://github.com/lauraevan/polarisbeta/blob/main/src/routes/apps.tsx"
click node_games "https://github.com/lauraevan/polarisbeta/tree/main/src/components/polaris/games"
click node_media "https://github.com/lauraevan/polarisbeta/tree/main/src/components/polaris/streaming"
click node_music "https://github.com/lauraevan/polarisbeta/tree/main/src/components/polaris/music"
click node_ai "https://github.com/lauraevan/polarisbeta/tree/main/src/components/polaris/ai"
click node_chat "https://github.com/lauraevan/polarisbeta/blob/main/src/components/polaris/chat/ChatRoom.tsx"
click node_settings_page "https://github.com/lauraevan/polarisbeta/blob/main/src/routes/settings.tsx"
click node_profile "https://github.com/lauraevan/polarisbeta/blob/main/src/components/polaris/ProfileSheet.tsx"
click node_auth "https://github.com/lauraevan/polarisbeta/blob/main/src/lib/auth-context.tsx"
click node_customization "https://github.com/lauraevan/polarisbeta/blob/main/src/components/polaris/premium/ProCustomization.tsx"
click node_safe_storage "https://github.com/lauraevan/polarisbeta/blob/main/src/lib/safe-storage.ts"
click node_music_storage "https://github.com/lauraevan/polarisbeta/blob/main/src/lib/music-storage.ts"
click node_supabase_client "https://github.com/lauraevan/polarisbeta/blob/main/src/integrations/supabase/client.ts"
click node_bot_commands "https://github.com/lauraevan/polarisbeta/blob/main/src/lib/polaris-bot.ts"

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_router,node_route_tree,node_app_shell,node_user toneBlue
class node_browser_apps,node_games,node_media,node_music,node_ai,node_chat,node_supabase toneAmber
class node_settings_page,node_profile,node_auth,node_customization toneMint
class node_safe_storage,node_music_storage,node_supabase_client,node_bot_commands toneRose
```

## Components

### App experience

- [Router](https://github.com/lauraevan/polarisbeta/blob/main/src/router.tsx): `src/router.tsx`
- [Page routes](https://github.com/lauraevan/polarisbeta/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`
- [Desktop shell](https://github.com/lauraevan/polarisbeta/blob/main/src/components/polaris/AppShell.tsx): `src/components/polaris/AppShell.tsx`

### Product features

- [Browser and apps](https://github.com/lauraevan/polarisbeta/blob/main/src/routes/apps.tsx): `src/routes/apps.tsx`
- [Games and emulation](https://github.com/lauraevan/polarisbeta/tree/main/src/components/polaris/games): `src/components/polaris/games`
- [Streaming and media](https://github.com/lauraevan/polarisbeta/tree/main/src/components/polaris/streaming): `src/components/polaris/streaming`
- [Music](https://github.com/lauraevan/polarisbeta/tree/main/src/components/polaris/music): `src/components/polaris/music`
- [AI tools](https://github.com/lauraevan/polarisbeta/tree/main/src/components/polaris/ai): `src/components/polaris/ai`
- [Chat rooms](https://github.com/lauraevan/polarisbeta/blob/main/src/components/polaris/chat/ChatRoom.tsx): `src/components/polaris/chat/ChatRoom.tsx`

### Identity and settings

- [Settings](https://github.com/lauraevan/polarisbeta/blob/main/src/routes/settings.tsx): `src/routes/settings.tsx`
- [Profile](https://github.com/lauraevan/polarisbeta/blob/main/src/components/polaris/ProfileSheet.tsx): `src/components/polaris/ProfileSheet.tsx`
- [Authentication](https://github.com/lauraevan/polarisbeta/blob/main/src/lib/auth-context.tsx): `src/lib/auth-context.tsx`
- [Customization](https://github.com/lauraevan/polarisbeta/blob/main/src/components/polaris/premium/ProCustomization.tsx): `src/components/polaris/premium/ProCustomization.tsx`

### Data services

- [Safe browser storage](https://github.com/lauraevan/polarisbeta/blob/main/src/lib/safe-storage.ts): `src/lib/safe-storage.ts`
- [Music library storage](https://github.com/lauraevan/polarisbeta/blob/main/src/lib/music-storage.ts): `src/lib/music-storage.ts`
- [Supabase client](https://github.com/lauraevan/polarisbeta/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Bot commands](https://github.com/lauraevan/polarisbeta/blob/main/src/lib/polaris-bot.ts): `src/lib/polaris-bot.ts`

### Other components

- **User**
- **Supabase**

## Connections

- User → Router: opens app (evidence: `src/router.tsx`)
- Router → Page routes: loads routes (evidence: `src/router.tsx`)
- Page routes → Browser and apps: registers page (evidence: `src/routeTree.gen.ts`)
- Browser and apps → Desktop shell: renders in (evidence: `src/routes/apps.tsx`)
- Page routes → Games and emulation: routes to
- Page routes → Streaming and media: routes to
- Page routes → Music: routes to
- Page routes → AI tools: routes to
- Page routes → Chat rooms: routes to
- Page routes → Settings: routes to (evidence: `src/routeTree.gen.ts`)
- Desktop shell → Settings: opens settings (evidence: `src/routes/settings.tsx`)
- Desktop shell → Profile: shows profile (evidence: `src/components/polaris/AppShell.tsx`)
- Settings → Customization: renders (evidence: `src/routes/settings.tsx`)
- Settings → Safe browser storage: uses preferences
- Customization → Safe browser storage: persists settings (evidence: `src/components/polaris/premium/ProCustomization.tsx`)
- Authentication → Supabase client: queries auth (evidence: `src/lib/auth-context.tsx`)
- Supabase client → Supabase: connects
- Profile → Authentication: reads identity (evidence: `src/components/polaris/ProfileSheet.tsx`)
- Chat rooms → Supabase client: reads and writes (evidence: `src/components/polaris/chat/ChatRoom.tsx`)
- Chat rooms → Bot commands: runs commands (evidence: `src/components/polaris/chat/ChatRoom.tsx`)
- Music library storage → Safe browser storage: persists library (evidence: `src/lib/music-storage.ts`)
- Music → Music library storage: uses library
