# nkipk-nk/bingr architecture

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

- Interactive diagram: https://gitdiagram.com/nkipk-nk/bingr
- Repository: https://github.com/nkipk-nk/bingr

## Overview

bingr is a movie and TV tracking app: users discover titles, add them to a library, record ratings and episode progress, and explore diary, stats, lists, and social activity. App.jsx coordinates authentication and the domain hooks, while route-level pages and shared components present those capabilities. The README identifies Supabase for persistence and auth and TMDB for catalogue data. Some feature pages and hooks were not sampled; their inclusion and connections rely on the README and SOURCE INDEX, so uncertain runtime links are omitted.

Main entry points: [`src/App.jsx`](https://github.com/nkipk-nk/bingr/blob/main/src/App.jsx) (App coordinator), [`src/lib/supabase.js`](https://github.com/nkipk-nk/bingr/blob/main/src/lib/supabase.js) (Supabase client), [`src/components/DetailPanel.jsx`](https://github.com/nkipk-nk/bingr/blob/main/src/components/DetailPanel.jsx) (Title details), [`src/lib/tmdb.js`](https://github.com/nkipk-nk/bingr/blob/main/src/lib/tmdb.js) (TMDB catalogue client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_app["App coordinator<br/>[App.jsx]"]
  node_nav["Navigation shell<br/>[NavShell.jsx]"]
end

subgraph group_catalogue["Catalogue and tracking"]
  node_discover["Discover titles<br/>[DiscoverPage.jsx]"]
  node_detail["Title details<br/>[DetailPanel.jsx]"]
  node_library["Watch library<br/>[useLibrary.js]"]
  node_episodes["Episode progress<br/>[useEpisodes.js]"]
  node_diary["Viewing diary<br/>[useDiary.js]"]
  node_stats["Viewing statistics<br/>[StatsPage.jsx]"]
  node_lists["Curated lists<br/>[useLists.js]"]
end

subgraph group_social["Community features"]
  node_feed["Activity feed<br/>[useFeed.js]"]
  node_follows["People and follows<br/>[useFollows.js]"]
  node_comments["Title comments<br/>[useComments.js]"]
  node_profile["User profiles"]
end

subgraph group_data["Data and services"]
  node_supabase_client["Supabase client<br/>[supabase.js]"]
  node_postgres[("Supabase database")]
  node_tmdb_client["TMDB catalogue client<br/>[tmdb.js]"]
  node_tmdb["TMDB service"]
  node_logger["Error logging<br/>[logger.js]"]
  node_sentry["Sentry"]
end

subgraph group_account["Account and operations"]
  node_auth["Authentication<br/>[useAuth.js]"]
  node_admin["Administration<br/>[AdminPanel.jsx]"]
  node_delete_account["Account deletion<br/>[index.ts]"]
end

node_viewer(("Viewer"))

node_viewer -->|"uses"| node_app
node_app -->|"manages session"| node_auth
node_app -->|"loads library"| node_library
node_app -->|"loads progress"| node_episodes
node_app -->|"loads lists"| node_lists
node_app -->|"loads diary"| node_diary
node_app -->|"loads follows"| node_follows
node_app -->|"loads feed"| node_feed
node_app -->|"renders shell"| node_nav
node_app -->|"routes to"| node_discover
node_app -->|"routes to"| node_stats
node_app -->|"routes to"| node_profile
node_discover -->|"searches catalogue"| node_tmdb_client
node_detail -->|"loads title data"| node_tmdb_client
node_detail -->|"uses progress"| node_episodes
node_detail -.->|"adds title"| node_lists
node_detail -->|"shows comments"| node_comments
node_profile -.->|"uses follow data"| node_follows
node_library -->|"reads and writes"| node_supabase_client
node_episodes -->|"reads and writes"| node_supabase_client
node_lists -->|"reads and writes"| node_supabase_client
node_auth -->|"authenticates"| node_supabase_client
node_follows -->|"reads and writes"| node_supabase_client
node_profile -->|"loads profile"| node_supabase_client
node_admin -->|"admin queries"| node_supabase_client
node_comments -.->|"reads and writes"| node_supabase_client
node_diary -.->|"reads and writes"| node_supabase_client
node_feed -.->|"reads activity"| node_supabase_client
node_stats -.->|"summarizes viewing"| node_library
node_supabase_client -->|"queries data"| node_postgres
node_tmdb_client -->|"requests metadata"| node_tmdb
node_supabase_client -->|"logs auth events"| node_logger
node_tmdb_client -->|"logs failures"| node_logger
node_logger -->|"reports errors"| node_sentry
node_delete_account -.->|"deletes account data"| node_postgres

click node_app "https://github.com/nkipk-nk/bingr/blob/main/src/App.jsx"
click node_nav "https://github.com/nkipk-nk/bingr/blob/main/src/components/nav/NavShell.jsx"
click node_discover "https://github.com/nkipk-nk/bingr/blob/main/src/pages/DiscoverPage.jsx"
click node_detail "https://github.com/nkipk-nk/bingr/blob/main/src/components/DetailPanel.jsx"
click node_library "https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useLibrary.js"
click node_episodes "https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useEpisodes.js"
click node_diary "https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useDiary.js"
click node_stats "https://github.com/nkipk-nk/bingr/blob/main/src/pages/StatsPage.jsx"
click node_lists "https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useLists.js"
click node_feed "https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useFeed.js"
click node_follows "https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useFollows.js"
click node_comments "https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useComments.js"
click node_profile "https://github.com/nkipk-nk/bingr/blob/main/src/pages/UserProfilePage.jsx"
click node_auth "https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useAuth.js"
click node_admin "https://github.com/nkipk-nk/bingr/blob/main/src/pages/AdminPanel.jsx"
click node_supabase_client "https://github.com/nkipk-nk/bingr/blob/main/src/lib/supabase.js"
click node_tmdb_client "https://github.com/nkipk-nk/bingr/blob/main/src/lib/tmdb.js"
click node_logger "https://github.com/nkipk-nk/bingr/blob/main/src/lib/logger.js"
click node_delete_account "https://github.com/nkipk-nk/bingr/blob/main/supabase/functions/delete-account/index.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_app,node_nav,node_viewer toneBlue
class node_discover,node_detail,node_library,node_episodes,node_diary,node_stats,node_lists toneAmber
class node_feed,node_follows,node_comments,node_profile toneMint
class node_supabase_client,node_postgres,node_tmdb_client,node_tmdb,node_logger,node_sentry toneRose
class node_auth,node_admin,node_delete_account toneIndigo
```

## Components

### App and navigation

- [App coordinator](https://github.com/nkipk-nk/bingr/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation shell](https://github.com/nkipk-nk/bingr/blob/main/src/components/nav/NavShell.jsx): `src/components/nav/NavShell.jsx`

### Catalogue and tracking

- [Discover titles](https://github.com/nkipk-nk/bingr/blob/main/src/pages/DiscoverPage.jsx): `src/pages/DiscoverPage.jsx`
- [Title details](https://github.com/nkipk-nk/bingr/blob/main/src/components/DetailPanel.jsx): `src/components/DetailPanel.jsx`
- [Watch library](https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useLibrary.js): `src/hooks/useLibrary.js`
- [Episode progress](https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useEpisodes.js): `src/hooks/useEpisodes.js`
- [Viewing diary](https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useDiary.js): `src/hooks/useDiary.js`
- [Viewing statistics](https://github.com/nkipk-nk/bingr/blob/main/src/pages/StatsPage.jsx): `src/pages/StatsPage.jsx`
- [Curated lists](https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useLists.js): `src/hooks/useLists.js`

### Community features

- [Activity feed](https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useFeed.js): `src/hooks/useFeed.js`
- [People and follows](https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useFollows.js): `src/hooks/useFollows.js`
- [Title comments](https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useComments.js): `src/hooks/useComments.js`
- [User profiles](https://github.com/nkipk-nk/bingr/blob/main/src/pages/UserProfilePage.jsx): `src/pages/UserProfilePage.jsx`

### Data and services

- [Supabase client](https://github.com/nkipk-nk/bingr/blob/main/src/lib/supabase.js): `src/lib/supabase.js`
- **Supabase database**
- [TMDB catalogue client](https://github.com/nkipk-nk/bingr/blob/main/src/lib/tmdb.js): `src/lib/tmdb.js`
- **TMDB service**
- [Error logging](https://github.com/nkipk-nk/bingr/blob/main/src/lib/logger.js): `src/lib/logger.js`
- **Sentry**

### Account and operations

- [Authentication](https://github.com/nkipk-nk/bingr/blob/main/src/hooks/useAuth.js): `src/hooks/useAuth.js`
- [Administration](https://github.com/nkipk-nk/bingr/blob/main/src/pages/AdminPanel.jsx): `src/pages/AdminPanel.jsx`
- [Account deletion](https://github.com/nkipk-nk/bingr/blob/main/supabase/functions/delete-account/index.ts): `supabase/functions/delete-account/index.ts`

### Other components

- **Viewer**

## Connections

- Viewer → App coordinator: uses (evidence: `src/App.jsx`)
- App coordinator → Authentication: manages session (evidence: `src/App.jsx`)
- App coordinator → Watch library: loads library (evidence: `src/App.jsx`)
- App coordinator → Episode progress: loads progress (evidence: `src/App.jsx`)
- App coordinator → Curated lists: loads lists (evidence: `src/App.jsx`)
- App coordinator → Viewing diary: loads diary (evidence: `src/App.jsx`)
- App coordinator → People and follows: loads follows (evidence: `src/App.jsx`)
- App coordinator → Activity feed: loads feed (evidence: `src/App.jsx`)
- App coordinator → Navigation shell: renders shell (evidence: `src/App.jsx`)
- App coordinator → Discover titles: routes to (evidence: `src/App.jsx`)
- App coordinator → Viewing statistics: routes to (evidence: `src/App.jsx`)
- App coordinator → User profiles: routes to (evidence: `src/App.jsx`)
- Discover titles → TMDB catalogue client: searches catalogue (evidence: `src/pages/DiscoverPage.jsx`)
- Title details → TMDB catalogue client: loads title data (evidence: `src/components/DetailPanel.jsx`)
- Title details → Episode progress: uses progress (evidence: `src/components/DetailPanel.jsx`)
- Title details → Curated lists: adds title
- Title details → Title comments: shows comments (evidence: `src/components/DetailPanel.jsx`)
- User profiles → People and follows: uses follow data
- Watch library → Supabase client: reads and writes (evidence: `src/hooks/useLibrary.js`)
- Episode progress → Supabase client: reads and writes (evidence: `src/hooks/useEpisodes.js`)
- Curated lists → Supabase client: reads and writes (evidence: `src/hooks/useLists.js`)
- Authentication → Supabase client: authenticates (evidence: `src/hooks/useAuth.js`)
- People and follows → Supabase client: reads and writes (evidence: `src/hooks/useFollows.js`)
- User profiles → Supabase client: loads profile (evidence: `src/pages/UserProfilePage.jsx`)
- Administration → Supabase client: admin queries
- Title comments → Supabase client: reads and writes
- Viewing diary → Supabase client: reads and writes
- Activity feed → Supabase client: reads activity
- Viewing statistics → Watch library: summarizes viewing
- Supabase client → Supabase database: queries data (evidence: `README.md`)
- TMDB catalogue client → TMDB service: requests metadata (evidence: `src/lib/tmdb.js`)
- Supabase client → Error logging: logs auth events (evidence: `src/lib/supabase.js`)
- TMDB catalogue client → Error logging: logs failures (evidence: `src/lib/tmdb.js`)
- Error logging → Sentry: reports errors (evidence: `src/lib/logger.js`)
- Account deletion → Supabase database: deletes account data
