# nahiyanasir/cinema-tube-cl architecture

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

- Interactive diagram: https://gitdiagram.com/nahiyanasir/cinema-tube-cl
- Repository: https://github.com/nahiyanasir/cinema-tube-cl

## Overview

Cinema Tube is a movie and series portal for discovering and watching media, managing a personal profile, reviewing titles, and purchasing or subscribing to premium access. Its principal user journey runs from browsing or searching the catalog to a title detail or watch page, with review and payment flows as related branches. Admin routes provide catalog, genre, user, review, payment, and analytics management. The tree and README establish these product areas; sampled source confirms review submission and the server-side API/authentication client, but not the wiring of most unsampled pages and services.

Main entry points: [`src/lib/axios/httpClient.ts`](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/lib/axios/httpClient.ts) (HTTP client), [`src/service/auth.service.ts`](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/service/auth.service.ts) (Authentication service), [`src/components/Review/ReviewForm.tsx`](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/components/Review/ReviewForm.tsx) (Reviews), [`src/app/(commonLayout)/page.tsx`](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/page.tsx) (Home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Media discovery"]
  node_home["Home<br/>[page.tsx]"]
  node_explore["Explore catalog<br/>[page.tsx]"]
  node_media_detail["Media details<br/>[page.tsx]"]
  node_watch["Watch media<br/>[page.tsx]"]
  node_media_service["Media services<br/>[media.service.ts]"]
end

subgraph group_account["Accounts and community"]
  node_auth_pages["Sign in and register<br/>[page.tsx]"]
  node_auth_service["Authentication service<br/>[auth.service.ts]"]
  node_profile["Profile and collections<br/>[page.tsx]"]
  node_reviews["Reviews<br/>[ReviewForm.tsx]"]
end

subgraph group_commerce["Payments and plans"]
  node_checkout["Media checkout<br/>[page.tsx]"]
  node_subscription["Subscription<br/>[page.tsx]"]
  node_payment_service["Payment services<br/>[payment.service.ts]"]
  node_subscription_service["Subscription services"]
end

subgraph group_admin["Administration"]
  node_review_admin["Review moderation<br/>[page.tsx]"]
  node_admin_media["Media management<br/>[page.tsx]"]
  node_admin_genres["Genre management<br/>[page.tsx]"]
  node_admin_users["User management<br/>[page.tsx]"]
  node_analytics["Analytics dashboard<br/>[page.tsx]"]
end

subgraph group_platform["API access"]
  node_api{{"Backend API"}}
  node_http_client["HTTP client<br/>[httpClient.ts]"]
end

node_viewer(("Viewer"))

node_viewer -->|"opens"| node_home
node_reviews -->|"submits review"| node_media_service
node_http_client -->|"sends requests"| node_api
node_http_client -->|"refreshes tokens"| node_auth_service
node_auth_service -->|"fetches auth data"| node_api

click node_home "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/page.tsx"
click node_explore "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/explore/page.tsx"
click node_media_detail "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/media/%5Bslug%5D/page.tsx"
click node_watch "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/watch/%5Bslug%5D/page.tsx"
click node_media_service "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/service/media.service.ts"
click node_auth_pages "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/(authPages)/login/page.tsx"
click node_auth_service "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/service/auth.service.ts"
click node_profile "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/profile/page.tsx"
click node_reviews "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/components/Review/ReviewForm.tsx"
click node_review_admin "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(adminLayout)/admin/reviews/page.tsx"
click node_checkout "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/payment/media-checkout/page.tsx"
click node_subscription "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/subscription/page.tsx"
click node_payment_service "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/service/payment.service.ts"
click node_subscription_service "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/service/subscription.service.ts"
click node_admin_media "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(adminLayout)/admin/media/page.tsx"
click node_admin_genres "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(adminLayout)/admin/genres/page.tsx"
click node_admin_users "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(adminLayout)/admin/users/page.tsx"
click node_analytics "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(adminLayout)/admin/analytics/page.tsx"
click node_http_client "https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/lib/axios/httpClient.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_home,node_explore,node_media_detail,node_watch,node_media_service,node_viewer toneBlue
class node_auth_pages,node_auth_service,node_profile,node_reviews toneAmber
class node_checkout,node_subscription,node_payment_service,node_subscription_service toneMint
class node_review_admin,node_admin_media,node_admin_genres,node_admin_users,node_analytics toneRose
class node_api,node_http_client toneIndigo
```

## Components

### Media discovery

- [Home](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/page.tsx): `src/app/(commonLayout)/page.tsx`
- [Explore catalog](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/explore/page.tsx): `src/app/(commonLayout)/explore/page.tsx`
- [Media details](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/media/%5Bslug%5D/page.tsx): `src/app/(commonLayout)/media/[slug]/page.tsx`
- [Watch media](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/watch/%5Bslug%5D/page.tsx): `src/app/(commonLayout)/watch/[slug]/page.tsx`
- [Media services](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/service/media.service.ts): `src/service/media.service.ts`

### Accounts and community

- [Sign in and register](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/(authPages)/login/page.tsx): `src/app/(commonLayout)/(authPages)/login/page.tsx`
- [Authentication service](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/service/auth.service.ts): `src/service/auth.service.ts`
- [Profile and collections](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/profile/page.tsx): `src/app/(commonLayout)/profile/page.tsx`
- [Reviews](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/components/Review/ReviewForm.tsx): `src/components/Review/ReviewForm.tsx`

### Payments and plans

- [Media checkout](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/payment/media-checkout/page.tsx): `src/app/(commonLayout)/payment/media-checkout/page.tsx`
- [Subscription](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(commonLayout)/subscription/page.tsx): `src/app/(commonLayout)/subscription/page.tsx`
- [Payment services](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/service/payment.service.ts): `src/service/payment.service.ts`
- [Subscription services](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/service/subscription.service.ts): `src/service/subscription.service.ts`

### Administration

- [Review moderation](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(adminLayout)/admin/reviews/page.tsx): `src/app/(adminLayout)/admin/reviews/page.tsx`
- [Media management](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(adminLayout)/admin/media/page.tsx): `src/app/(adminLayout)/admin/media/page.tsx`
- [Genre management](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(adminLayout)/admin/genres/page.tsx): `src/app/(adminLayout)/admin/genres/page.tsx`
- [User management](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(adminLayout)/admin/users/page.tsx): `src/app/(adminLayout)/admin/users/page.tsx`
- [Analytics dashboard](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/app/(adminLayout)/admin/analytics/page.tsx): `src/app/(adminLayout)/admin/analytics/page.tsx`

### API access

- **Backend API**
- [HTTP client](https://github.com/nahiyanasir/cinema-tube-cl/blob/main/src/lib/axios/httpClient.ts): `src/lib/axios/httpClient.ts`

### Other components

- **Viewer**

## Connections

- Viewer → Home: opens
- Reviews → Media services: submits review
- HTTP client → Backend API: sends requests
- HTTP client → Authentication service: refreshes tokens
- Authentication service → Backend API: fetches auth data
