# mikom8/mtmovies_product architecture

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

- Interactive diagram: https://gitdiagram.com/mikom8/mtmovies_product
- Repository: https://github.com/mikom8/mtmovies_product

## Overview

MT Movies is a subscription streaming product with mobile and web clients backed by an Express API. The main user journey is authenticate, browse or search movies and series, open details, and watch; account, watchlist, plans, and administration are additional product areas. The backend also handles streaming, payments, recommendations, and catalog management. Relationships are limited to excerpted calls, route registrations, and SOURCE INDEX references; unsampled screens and route internals are not assumed.

Main entry points: [`backend/server.js`](https://github.com/mikom8/mtmovies_product/blob/main/backend/server.js) (API server), [`dashboard/src/App.jsx`](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/App.jsx) (Web routes), [`dashboard/src/main.jsx`](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/main.jsx) (Web bootstrap), [`backend/routes/stream.js`](https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/stream.js) (Streaming routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_mobile_app["App shell<br/>[App.js]"]
  node_mobile_auth["Mobile auth<br/>[AuthContext.js]"]
  node_mobile_api["Mobile API client<br/>[client.js]"]
  node_mobile_search["Mobile search<br/>[SearchScreen.js]"]
  node_mobile_nav["Mobile navigation<br/>[AppNavigator.js]"]
end

subgraph group_web["Web dashboard"]
  node_web_boot["Web bootstrap<br/>[main.jsx]"]
  node_web_routes["Web routes<br/>[App.jsx]"]
  node_web_auth["Web auth<br/>[AuthContext.jsx]"]
  node_web_movie_context["Movie context<br/>[MovieContext.jsx]"]
  node_web_search["Web search<br/>[SearchPage.jsx]"]
  node_web_landing["Landing<br/>[Landing.jsx]"]
  node_web_login["Login<br/>[Login.jsx]"]
  node_web_admin["Administration<br/>[Admin.jsx]"]
  node_web_movie_watch["Movie playback<br/>[WatchPage.jsx]"]
  node_web_series_details["Series details<br/>[SeriesDetails.jsx]"]
  node_web_series_watch["Series playback"]
end

subgraph group_api["Backend API"]
  node_api_server["API server<br/>[server.js]"]
  node_api_auth["Authentication routes<br/>[auth.js]"]
  node_api_movies["Movie catalog routes<br/>[movies.js]"]
  node_api_series["Series routes<br/>[series.js]"]
  node_api_stream["Streaming routes<br/>[stream.js]"]
  node_api_users["User routes<br/>[users.js]"]
  node_api_payments["Payment routes<br/>[payments.js]"]
  node_api_recommendations["Recommendations<br/>[recommendations.js]"]
  node_api_admin["Admin routes<br/>[admin.js]"]
  node_payment_controller["Payment submission"]
  node_telegram_service["Telegram streaming service<br/>[telegram.js]"]
end

subgraph group_data["Catalog and accounts"]
  node_movie_model[("Movie records<br/>[Movie.js]")]
  node_series_model[("Series records<br/>[Series.js]")]
  node_user_model[("User records<br/>[User.js]")]
  node_transaction_model[("Transactions<br/>[Transaction.js]")]
end

node_user(("Viewer"))
node_mongo[("MongoDB")]

node_user -->|"uses"| node_mobile_app
node_mobile_app -->|"provides auth"| node_mobile_auth
node_mobile_app -->|"renders"| node_mobile_nav
node_mobile_auth -->|"calls"| node_mobile_api
node_mobile_search -->|"searches via"| node_mobile_api
node_mobile_search -->|"requests movies"| node_api_movies
node_mobile_search -->|"requests series"| node_api_series
node_user -->|"uses"| node_web_boot
node_web_boot -->|"renders"| node_web_routes
node_web_boot -->|"provides"| node_web_auth
node_web_boot -->|"provides"| node_web_movie_context
node_web_routes -->|"routes to"| node_web_landing
node_web_routes -->|"routes to"| node_web_login
node_web_routes -->|"routes to"| node_web_search
node_web_routes -->|"routes to"| node_web_admin
node_web_routes -->|"routes to"| node_web_movie_watch
node_web_routes -->|"routes to"| node_web_series_details
node_web_routes -->|"routes to"| node_web_series_watch
node_web_search -->|"requests movies"| node_api_movies
node_web_search -->|"requests series"| node_api_series
node_api_server -->|"registers"| node_api_auth
node_api_server -->|"registers"| node_api_movies
node_api_server -->|"registers"| node_api_series
node_api_server -->|"registers"| node_api_stream
node_api_server -->|"registers"| node_api_users
node_api_server -->|"registers"| node_api_payments
node_api_server -->|"registers"| node_api_recommendations
node_api_server -->|"registers"| node_api_admin
node_api_server -->|"connects to"| node_mongo
node_api_auth -->|"reads and writes"| node_user_model
node_api_stream -->|"uses"| node_movie_model
node_api_stream -->|"uses"| node_series_model
node_api_stream -->|"calls"| node_telegram_service
node_payment_controller -->|"creates"| node_transaction_model
node_payment_controller -->|"uses"| node_user_model

click node_mobile_app "https://github.com/mikom8/mtmovies_product/blob/main/Mobile/App.js"
click node_mobile_auth "https://github.com/mikom8/mtmovies_product/blob/main/Mobile/src/context/AuthContext.js"
click node_mobile_api "https://github.com/mikom8/mtmovies_product/blob/main/Mobile/src/api/client.js"
click node_mobile_search "https://github.com/mikom8/mtmovies_product/blob/main/Mobile/src/screens/SearchScreen.js"
click node_mobile_nav "https://github.com/mikom8/mtmovies_product/blob/main/Mobile/src/navigation/AppNavigator.js"
click node_web_boot "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/main.jsx"
click node_web_routes "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/App.jsx"
click node_web_auth "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/context/AuthContext.jsx"
click node_web_movie_context "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/context/MovieContext.jsx"
click node_web_search "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/SearchPage.jsx"
click node_web_landing "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/Landing.jsx"
click node_web_login "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/Login.jsx"
click node_web_admin "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/Admin.jsx"
click node_web_movie_watch "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/WatchPage.jsx"
click node_web_series_details "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/SeriesDetails.jsx"
click node_web_series_watch "https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/WatchSeriesPage.jsx"
click node_api_server "https://github.com/mikom8/mtmovies_product/blob/main/backend/server.js"
click node_api_auth "https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/auth.js"
click node_api_movies "https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/movies.js"
click node_api_series "https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/series.js"
click node_api_stream "https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/stream.js"
click node_api_users "https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/users.js"
click node_api_payments "https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/payments.js"
click node_api_recommendations "https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/recommendations.js"
click node_api_admin "https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/admin.js"
click node_payment_controller "https://github.com/mikom8/mtmovies_product/blob/main/backend/controllers/paymentController.js"
click node_telegram_service "https://github.com/mikom8/mtmovies_product/blob/main/backend/services/telegram.js"
click node_movie_model "https://github.com/mikom8/mtmovies_product/blob/main/backend/models/Movie.js"
click node_series_model "https://github.com/mikom8/mtmovies_product/blob/main/backend/models/Series.js"
click node_user_model "https://github.com/mikom8/mtmovies_product/blob/main/backend/models/User.js"
click node_transaction_model "https://github.com/mikom8/mtmovies_product/blob/main/backend/models/Transaction.js"

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_mobile_app,node_mobile_auth,node_mobile_api,node_mobile_search,node_mobile_nav,node_user toneBlue
class node_web_boot,node_web_routes,node_web_auth,node_web_movie_context,node_web_search,node_web_landing,node_web_login,node_web_admin,node_web_movie_watch,node_web_series_details,node_web_series_watch,node_mongo toneAmber
class node_api_server,node_api_auth,node_api_movies,node_api_series,node_api_stream,node_api_users,node_api_payments,node_api_recommendations,node_api_admin,node_payment_controller,node_telegram_service toneMint
class node_movie_model,node_series_model,node_user_model,node_transaction_model toneRose
```

## Components

### Mobile app

- [App shell](https://github.com/mikom8/mtmovies_product/blob/main/Mobile/App.js): `Mobile/App.js`
- [Mobile auth](https://github.com/mikom8/mtmovies_product/blob/main/Mobile/src/context/AuthContext.js): `Mobile/src/context/AuthContext.js`
- [Mobile API client](https://github.com/mikom8/mtmovies_product/blob/main/Mobile/src/api/client.js): `Mobile/src/api/client.js`
- [Mobile search](https://github.com/mikom8/mtmovies_product/blob/main/Mobile/src/screens/SearchScreen.js): `Mobile/src/screens/SearchScreen.js`
- [Mobile navigation](https://github.com/mikom8/mtmovies_product/blob/main/Mobile/src/navigation/AppNavigator.js): `Mobile/src/navigation/AppNavigator.js`

### Web dashboard

- [Web bootstrap](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/main.jsx): `dashboard/src/main.jsx`
- [Web routes](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/App.jsx): `dashboard/src/App.jsx`
- [Web auth](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/context/AuthContext.jsx): `dashboard/src/context/AuthContext.jsx`
- [Movie context](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/context/MovieContext.jsx): `dashboard/src/context/MovieContext.jsx`
- [Web search](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/SearchPage.jsx): `dashboard/src/pages/SearchPage.jsx`
- [Landing](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/Landing.jsx): `dashboard/src/pages/Landing.jsx`
- [Login](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/Login.jsx): `dashboard/src/pages/Login.jsx`
- [Administration](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/Admin.jsx): `dashboard/src/pages/Admin.jsx`
- [Movie playback](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/WatchPage.jsx): `dashboard/src/pages/WatchPage.jsx`
- [Series details](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/SeriesDetails.jsx): `dashboard/src/pages/SeriesDetails.jsx`
- [Series playback](https://github.com/mikom8/mtmovies_product/blob/main/dashboard/src/pages/WatchSeriesPage.jsx): `dashboard/src/pages/WatchSeriesPage.jsx`

### Backend API

- [API server](https://github.com/mikom8/mtmovies_product/blob/main/backend/server.js): `backend/server.js`
- [Authentication routes](https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [Movie catalog routes](https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/movies.js): `backend/routes/movies.js`
- [Series routes](https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/series.js): `backend/routes/series.js`
- [Streaming routes](https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/stream.js): `backend/routes/stream.js`
- [User routes](https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/users.js): `backend/routes/users.js`
- [Payment routes](https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/payments.js): `backend/routes/payments.js`
- [Recommendations](https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/recommendations.js): `backend/routes/recommendations.js`
- [Admin routes](https://github.com/mikom8/mtmovies_product/blob/main/backend/routes/admin.js): `backend/routes/admin.js`
- [Payment submission](https://github.com/mikom8/mtmovies_product/blob/main/backend/controllers/paymentController.js): `backend/controllers/paymentController.js`
- [Telegram streaming service](https://github.com/mikom8/mtmovies_product/blob/main/backend/services/telegram.js): `backend/services/telegram.js`

### Catalog and accounts

- [Movie records](https://github.com/mikom8/mtmovies_product/blob/main/backend/models/Movie.js): `backend/models/Movie.js`
- [Series records](https://github.com/mikom8/mtmovies_product/blob/main/backend/models/Series.js): `backend/models/Series.js`
- [User records](https://github.com/mikom8/mtmovies_product/blob/main/backend/models/User.js): `backend/models/User.js`
- [Transactions](https://github.com/mikom8/mtmovies_product/blob/main/backend/models/Transaction.js): `backend/models/Transaction.js`

### Other components

- **Viewer**
- **MongoDB**

## Connections

- Viewer → App shell: uses (evidence: `Mobile/App.js`)
- App shell → Mobile auth: provides auth (evidence: `Mobile/App.js`)
- App shell → Mobile navigation: renders (evidence: `Mobile/App.js`)
- Mobile auth → Mobile API client: calls (evidence: `Mobile/src/context/AuthContext.js`)
- Mobile search → Mobile API client: searches via (evidence: `Mobile/src/screens/SearchScreen.js`)
- Mobile search → Movie catalog routes: requests movies (evidence: `Mobile/src/screens/SearchScreen.js`)
- Mobile search → Series routes: requests series (evidence: `Mobile/src/screens/SearchScreen.js`)
- Viewer → Web bootstrap: uses (evidence: `dashboard/src/main.jsx`)
- Web bootstrap → Web routes: renders (evidence: `dashboard/src/main.jsx`)
- Web bootstrap → Web auth: provides (evidence: `dashboard/src/main.jsx`)
- Web bootstrap → Movie context: provides (evidence: `dashboard/src/main.jsx`)
- Web routes → Landing: routes to (evidence: `dashboard/src/App.jsx`)
- Web routes → Login: routes to (evidence: `dashboard/src/App.jsx`)
- Web routes → Web search: routes to (evidence: `dashboard/src/App.jsx`)
- Web routes → Administration: routes to (evidence: `dashboard/src/App.jsx`)
- Web routes → Movie playback: routes to (evidence: `dashboard/src/App.jsx`)
- Web routes → Series details: routes to (evidence: `dashboard/src/App.jsx`)
- Web routes → Series playback: routes to (evidence: `dashboard/src/App.jsx`)
- Web search → Movie catalog routes: requests movies (evidence: `dashboard/src/pages/SearchPage.jsx`)
- Web search → Series routes: requests series (evidence: `dashboard/src/pages/SearchPage.jsx`)
- API server → Authentication routes: registers (evidence: `backend/server.js`)
- API server → Movie catalog routes: registers (evidence: `backend/server.js`)
- API server → Series routes: registers (evidence: `backend/server.js`)
- API server → Streaming routes: registers (evidence: `backend/server.js`)
- API server → User routes: registers (evidence: `backend/server.js`)
- API server → Payment routes: registers (evidence: `backend/server.js`)
- API server → Recommendations: registers (evidence: `backend/server.js`)
- API server → Admin routes: registers (evidence: `backend/server.js`)
- API server → MongoDB: connects to (evidence: `backend/server.js`)
- Authentication routes → User records: reads and writes (evidence: `backend/routes/auth.js`)
- Streaming routes → Movie records: uses (evidence: `backend/routes/stream.js`)
- Streaming routes → Series records: uses (evidence: `backend/routes/stream.js`)
- Streaming routes → Telegram streaming service: calls (evidence: `backend/routes/stream.js`)
- Payment submission → Transactions: creates (evidence: `backend/controllers/paymentController.js`)
- Payment submission → User records: uses (evidence: `backend/controllers/paymentController.js`)
