# kushwanthpallenna-alt/cine-social architecture

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

- Interactive diagram: https://gitdiagram.com/kushwanthpallenna-alt/cine-social
- Repository: https://github.com/kushwanthpallenna-alt/cine-social

## Overview

Cine Social is a Next.js movie and TV tracking app with catalog, watch-history, lists, reviews, profiles, and social features. A typical user explores a title, records ratings or rewatches, organizes titles into lists, and interacts with other users. The graph preserves those distinct feature areas and the shared UI/API layer. Evidence is limited: the README is a generic Next.js starter, and many routes and pages were indexed but not excerpted, so uncertain connections are omitted.

Main entry points: [`src/components/MovieDetailsClient.tsx`](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/MovieDetailsClient.tsx) (Movie details), [`src/components/NotificationBell.tsx`](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/NotificationBell.tsx) (Notifications UI), [`src/components/ReviewCard.tsx`](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/ReviewCard.tsx) (Review interactions), [`src/components/TvDetailsClient.tsx`](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/TvDetailsClient.tsx) (TV details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Catalog discovery"]
  node_movie_detail["Movie details"]
  node_tv_detail["TV details"]
  node_person_detail["Person details"]
  node_recommendations["Recommendations<br/>[page.tsx]"]
  node_tmdb_api["TMDB API<br/>[route.ts]"]
end

subgraph group_tracking["Tracking and lists"]
  node_watch_tracking["Watch tracking<br/>[route.ts]"]
  node_rewatch["Rewatch logging<br/>[RewatchModal.tsx]"]
  node_watch_log_api["Watch log API<br/>[route.ts]"]
  node_lists_ui["List management UI<br/>[AddToListModal.tsx]"]
  node_lists_api["Lists API<br/>[route.ts]"]
  node_list_items_api["List items API<br/>[route.ts]"]
end

subgraph group_community["Social community"]
  node_reviews["Review interactions<br/>[ReviewCard.tsx]"]
  node_review_likes["Review likes API<br/>[route.ts]"]
  node_review_replies["Review replies API<br/>[route.ts]"]
  node_social_feed["Social feed<br/>[route.ts]"]
  node_notifications_ui["Notifications UI"]
  node_notifications_api["Notifications API<br/>[route.ts]"]
end

subgraph group_platform["App and services"]
  node_auth["Authentication<br/>[route.ts]"]
  node_auth_prompt["Sign-in prompt"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_slug_utils["Media URL helpers<br/>[slug.ts]"]
  node_avatar_utils["Avatar validation<br/>[avatar.ts]"]
end

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

node_user -->|"opens title"| node_movie_detail
node_movie_detail -->|"uses client"| node_supabase_client
node_tv_detail -.->|"uses client"| node_supabase_client
node_supabase_client -->|"connects"| node_supabase
node_movie_detail -->|"builds URLs"| node_slug_utils
node_tv_detail -->|"builds URLs"| node_slug_utils
node_person_detail -->|"builds URLs"| node_slug_utils
node_movie_detail -->|"renders"| node_notifications_ui
node_tv_detail -.->|"renders"| node_notifications_ui
node_person_detail -->|"renders"| node_notifications_ui
node_movie_detail -.->|"requests data"| node_tmdb_api
node_rewatch -->|"submits log"| node_watch_log_api
node_lists_ui -->|"creates list"| node_lists_api
node_lists_ui -->|"adds title"| node_list_items_api
node_reviews -->|"submits likes"| node_review_likes
node_reviews -->|"submits replies"| node_review_replies
node_notifications_ui -->|"fetches and updates"| node_notifications_api
node_notifications_ui -->|"validates avatars"| node_avatar_utils
node_reviews -->|"validates avatars"| node_avatar_utils
node_reviews -->|"requests sign-in"| node_auth_prompt
node_auth_prompt -.->|"routes to sign-in"| node_auth

click node_movie_detail "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/MovieDetailsClient.tsx"
click node_tv_detail "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/TvDetailsClient.tsx"
click node_person_detail "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/PersonDetailClient.tsx"
click node_recommendations "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/recommendations/page.tsx"
click node_tmdb_api "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/tmdb/route.ts"
click node_watch_tracking "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/watched/route.ts"
click node_rewatch "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/RewatchModal.tsx"
click node_watch_log_api "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/watch-log/route.ts"
click node_lists_ui "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/AddToListModal.tsx"
click node_lists_api "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/lists/route.ts"
click node_list_items_api "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/list-items/route.ts"
click node_reviews "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/ReviewCard.tsx"
click node_review_likes "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/reviews/likes/route.ts"
click node_review_replies "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/reviews/replies/route.ts"
click node_social_feed "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/social-feed/route.ts"
click node_notifications_ui "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/NotificationBell.tsx"
click node_notifications_api "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/notifications/route.ts"
click node_auth "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/auth/%5B...nextauth%5D/route.ts"
click node_auth_prompt "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/AuthPromptProvider.tsx"
click node_supabase_client "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/lib/supabase.ts"
click node_slug_utils "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/lib/slug.ts"
click node_avatar_utils "https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/lib/avatar.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_movie_detail,node_tv_detail,node_person_detail,node_recommendations,node_tmdb_api,node_user toneBlue
class node_watch_tracking,node_rewatch,node_watch_log_api,node_lists_ui,node_lists_api,node_list_items_api,node_supabase toneAmber
class node_reviews,node_review_likes,node_review_replies,node_social_feed,node_notifications_ui,node_notifications_api toneMint
class node_auth,node_auth_prompt,node_supabase_client,node_slug_utils,node_avatar_utils toneRose
```

## Components

### Catalog discovery

- [Movie details](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/MovieDetailsClient.tsx): `src/components/MovieDetailsClient.tsx`
- [TV details](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/TvDetailsClient.tsx): `src/components/TvDetailsClient.tsx`
- [Person details](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/PersonDetailClient.tsx): `src/components/PersonDetailClient.tsx`
- [Recommendations](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/recommendations/page.tsx): `src/app/recommendations/page.tsx`
- [TMDB API](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/tmdb/route.ts): `src/app/api/tmdb/route.ts`

### Tracking and lists

- [Watch tracking](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/watched/route.ts): `src/app/api/watched/route.ts`
- [Rewatch logging](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/RewatchModal.tsx): `src/components/RewatchModal.tsx`
- [Watch log API](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/watch-log/route.ts): `src/app/api/watch-log/route.ts`
- [List management UI](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/AddToListModal.tsx): `src/components/AddToListModal.tsx`
- [Lists API](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/lists/route.ts): `src/app/api/lists/route.ts`
- [List items API](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/list-items/route.ts): `src/app/api/list-items/route.ts`

### Social community

- [Review interactions](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/ReviewCard.tsx): `src/components/ReviewCard.tsx`
- [Review likes API](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/reviews/likes/route.ts): `src/app/api/reviews/likes/route.ts`
- [Review replies API](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/reviews/replies/route.ts): `src/app/api/reviews/replies/route.ts`
- [Social feed](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/social-feed/route.ts): `src/app/api/social-feed/route.ts`
- [Notifications UI](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/NotificationBell.tsx): `src/components/NotificationBell.tsx`
- [Notifications API](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/notifications/route.ts): `src/app/api/notifications/route.ts`

### App and services

- [Authentication](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/app/api/auth/%5B...nextauth%5D/route.ts): `src/app/api/auth/[...nextauth]/route.ts`
- [Sign-in prompt](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/components/AuthPromptProvider.tsx): `src/components/AuthPromptProvider.tsx`
- [Supabase client](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Media URL helpers](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/lib/slug.ts): `src/lib/slug.ts`
- [Avatar validation](https://github.com/kushwanthpallenna-alt/cine-social/blob/main/src/lib/avatar.ts): `src/lib/avatar.ts`

### Other components

- **Viewer**
- **Supabase**

## Connections

- Viewer → Movie details: opens title (evidence: `README.md`)
- Movie details → Supabase client: uses client (evidence: `src/components/MovieDetailsClient.tsx`)
- TV details → Supabase client: uses client (evidence: `src/components/TvDetailsClient.tsx`)
- Supabase client → Supabase: connects (evidence: `src/lib/supabase.ts`)
- Movie details → Media URL helpers: builds URLs (evidence: `src/components/MovieDetailsClient.tsx`)
- TV details → Media URL helpers: builds URLs (evidence: `src/components/TvDetailsClient.tsx`)
- Person details → Media URL helpers: builds URLs (evidence: `src/components/PersonDetailClient.tsx`)
- Movie details → Notifications UI: renders (evidence: `src/components/MovieDetailsClient.tsx`)
- TV details → Notifications UI: renders (evidence: `src/components/TvDetailsClient.tsx`)
- Person details → Notifications UI: renders (evidence: `src/components/PersonDetailClient.tsx`)
- Movie details → TMDB API: requests data
- Rewatch logging → Watch log API: submits log (evidence: `src/components/RewatchModal.tsx`)
- List management UI → Lists API: creates list (evidence: `src/components/AddToListModal.tsx`)
- List management UI → List items API: adds title (evidence: `src/components/AddToListModal.tsx`)
- Review interactions → Review likes API: submits likes (evidence: `src/components/ReviewCard.tsx`)
- Review interactions → Review replies API: submits replies (evidence: `src/components/ReviewCard.tsx`)
- Notifications UI → Notifications API: fetches and updates (evidence: `src/components/NotificationBell.tsx`)
- Notifications UI → Avatar validation: validates avatars (evidence: `src/components/NotificationBell.tsx`)
- Review interactions → Avatar validation: validates avatars (evidence: `src/components/ReviewCard.tsx`)
- Review interactions → Sign-in prompt: requests sign-in (evidence: `src/components/ReviewCard.tsx`)
- Sign-in prompt → Authentication: routes to sign-in
