# nourchene-hamrita/streamingapp architecture

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

- Interactive diagram: https://gitdiagram.com/nourchene-hamrita/streamingapp
- Repository: https://github.com/nourchene-hamrita/streamingapp

## Overview

This repository implements a video-sharing product: users sign up or log in, browse and search videos, interact with channels and comments, and manage saved videos and profiles. The React Native app routes users through these screens and uses an Axios service layer to call an Express/Mongoose backend. The backend separates HTTP routes, domain controllers, and MongoDB models. The file tree and excerpts establish much of this structure; the README is empty, and several feature screens and routes were not sampled, so uncertain connections are omitted or marked unverified.

Main entry points: [`Server/Routes`](https://github.com/nourchene-hamrita/streamingapp/tree/master/Server/Routes) (HTTP routes), [`myapp/services/apis.js`](https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/services/apis.js) (HTTP service), [`Server/Controllers/VideoController.js`](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/VideoController.js) (Video operations), [`Server/Controllers/ChannelController.js`](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/ChannelController.js) (Channel operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_auth_screens["Sign-in screens<br/>[Login.js]"]
  node_app_navigation["App navigation<br/>[Navigation.js]"]
  node_feature_screens["Video and library screens"]
  node_search_screen["Video search<br/>[Search.js]"]
  node_channel_screen["Channel view<br/>[Channel.js]"]
  node_profile_screen["User profile<br/>[Profile.js]"]
  node_api_client["HTTP service<br/>[apis.js]"]
end

subgraph group_server["Backend API"]
  node_http_routes["HTTP routes"]
end

subgraph group_domain["Domain logic"]
  node_auth_controller["Authentication<br/>[authController.js]"]
  node_user_controller["User management<br/>[UserController.js]"]
  node_video_controller["Video operations<br/>[VideoController.js]"]
  node_channel_controller["Channel operations"]
  node_saved_controller["Saved videos<br/>[SavedController.js]"]
  node_comment_controller["Comments"]
  node_following_controller["Following"]
end

subgraph group_data["Persistence"]
  node_user_model["User records<br/>[user.model.js]"]
  node_video_model["Video records<br/>[video.model.js]"]
  node_channel_model["Channel records<br/>[channel.model.js]"]
  node_saved_model["Saved records<br/>[saved.model.js]"]
  node_comment_model["Comment records<br/>[comment.model.js]"]
  node_following_model["Following records<br/>[following.model.js]"]
end

node_user(("App user"))
node_mongo[("MongoDB")]

node_user -->|"signs in"| node_auth_screens
node_auth_screens -->|"requests auth"| node_api_client
node_user -.->|"uses app"| node_app_navigation
node_app_navigation -->|"routes to"| node_feature_screens
node_feature_screens -.->|"requests data"| node_api_client
node_search_screen -->|"searches videos"| node_api_client
node_channel_screen -->|"loads channel"| node_api_client
node_profile_screen -->|"loads profile"| node_api_client
node_api_client -.->|"calls HTTP API"| node_http_routes
node_http_routes -->|"routes auth"| node_auth_controller
node_http_routes -->|"routes user"| node_user_controller
node_http_routes -->|"routes videos"| node_video_controller
node_http_routes -->|"routes channels"| node_channel_controller
node_http_routes -->|"routes saved"| node_saved_controller
node_auth_controller -->|"creates and checks"| node_user_model
node_user_controller -->|"reads and updates"| node_user_model
node_video_controller -->|"queries and saves"| node_video_model
node_video_controller -->|"updates channel"| node_channel_model
node_video_controller -->|"uses user data"| node_user_model
node_video_controller -->|"uses comments"| node_comment_model
node_channel_controller -->|"reads and updates"| node_channel_model
node_channel_controller -->|"uses user data"| node_user_model
node_channel_controller -->|"uses video data"| node_video_model
node_channel_controller -->|"creates following"| node_following_model
node_saved_controller -->|"manages saved"| node_saved_model
node_comment_controller -.->|"uses comments"| node_comment_model
node_following_controller -.->|"uses following"| node_following_model
node_user_model -.->|"persists records"| node_mongo
node_video_model -.->|"persists records"| node_mongo
node_channel_model -.->|"persists records"| node_mongo
node_saved_model -.->|"persists records"| node_mongo
node_comment_model -.->|"persists records"| node_mongo
node_following_model -.->|"persists records"| node_mongo

click node_auth_screens "https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/Screens/Login.js"
click node_app_navigation "https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/navigations/Navigation.js"
click node_feature_screens "https://github.com/nourchene-hamrita/streamingapp/tree/master/myapp/Screens"
click node_search_screen "https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/Screens/Search.js"
click node_channel_screen "https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/Screens/Channel.js"
click node_profile_screen "https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/Screens/Profile.js"
click node_api_client "https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/services/apis.js"
click node_http_routes "https://github.com/nourchene-hamrita/streamingapp/tree/master/Server/Routes"
click node_auth_controller "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/authController.js"
click node_user_controller "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/UserController.js"
click node_video_controller "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/VideoController.js"
click node_channel_controller "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/ChannelController.js"
click node_saved_controller "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/SavedController.js"
click node_comment_controller "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/CommentController.js"
click node_following_controller "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/followingController.js"
click node_user_model "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/user.model.js"
click node_video_model "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/video.model.js"
click node_channel_model "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/channel.model.js"
click node_saved_model "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/saved.model.js"
click node_comment_model "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/comment.model.js"
click node_following_model "https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/following.model.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_auth_screens,node_app_navigation,node_feature_screens,node_search_screen,node_channel_screen,node_profile_screen,node_api_client,node_user toneBlue
class node_http_routes,node_mongo toneAmber
class node_auth_controller,node_user_controller,node_video_controller,node_channel_controller,node_saved_controller,node_comment_controller,node_following_controller toneMint
class node_user_model,node_video_model,node_channel_model,node_saved_model,node_comment_model,node_following_model toneRose
```

## Components

### Mobile app

- [Sign-in screens](https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/Screens/Login.js): `myapp/Screens/Login.js`
- [App navigation](https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/navigations/Navigation.js): `myapp/navigations/Navigation.js`
- [Video and library screens](https://github.com/nourchene-hamrita/streamingapp/tree/master/myapp/Screens): `myapp/Screens`
- [Video search](https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/Screens/Search.js): `myapp/Screens/Search.js`
- [Channel view](https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/Screens/Channel.js): `myapp/Screens/Channel.js`
- [User profile](https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/Screens/Profile.js): `myapp/Screens/Profile.js`
- [HTTP service](https://github.com/nourchene-hamrita/streamingapp/blob/master/myapp/services/apis.js): `myapp/services/apis.js`

### Backend API

- [HTTP routes](https://github.com/nourchene-hamrita/streamingapp/tree/master/Server/Routes): `Server/Routes`

### Domain logic

- [Authentication](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/authController.js): `Server/Controllers/authController.js`
- [User management](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/UserController.js): `Server/Controllers/UserController.js`
- [Video operations](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/VideoController.js): `Server/Controllers/VideoController.js`
- [Channel operations](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/ChannelController.js): `Server/Controllers/ChannelController.js`
- [Saved videos](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/SavedController.js): `Server/Controllers/SavedController.js`
- [Comments](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/CommentController.js): `Server/Controllers/CommentController.js`
- [Following](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Controllers/followingController.js): `Server/Controllers/followingController.js`

### Persistence

- [User records](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/user.model.js): `Server/Models/user.model.js`
- [Video records](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/video.model.js): `Server/Models/video.model.js`
- [Channel records](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/channel.model.js): `Server/Models/channel.model.js`
- [Saved records](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/saved.model.js): `Server/Models/saved.model.js`
- [Comment records](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/comment.model.js): `Server/Models/comment.model.js`
- [Following records](https://github.com/nourchene-hamrita/streamingapp/blob/master/Server/Models/following.model.js): `Server/Models/following.model.js`

### Other components

- **App user**
- **MongoDB**

## Connections

- App user → Sign-in screens: signs in
- Sign-in screens → HTTP service: requests auth (evidence: `myapp/Screens/Login.js`)
- App user → App navigation: uses app
- App navigation → Video and library screens: routes to (evidence: `myapp/navigations/Navigation.js`)
- Video and library screens → HTTP service: requests data (evidence: `myapp/Screens/Search.js`)
- Video search → HTTP service: searches videos (evidence: `myapp/Screens/Search.js`)
- Channel view → HTTP service: loads channel (evidence: `myapp/Screens/Channel.js`)
- User profile → HTTP service: loads profile (evidence: `myapp/Screens/Profile.js`)
- HTTP service → HTTP routes: calls HTTP API (evidence: `myapp/services/apis.js`)
- HTTP routes → Authentication: routes auth (evidence: `Server/Routes/user.routes.js`)
- HTTP routes → User management: routes user (evidence: `Server/Routes/user.routes.js`)
- HTTP routes → Video operations: routes videos (evidence: `Server/Routes/video.routes.js`)
- HTTP routes → Channel operations: routes channels (evidence: `Server/Routes/channel.routes.js`)
- HTTP routes → Saved videos: routes saved (evidence: `Server/Routes/saved.routes.js`)
- Authentication → User records: creates and checks (evidence: `Server/Controllers/authController.js`)
- User management → User records: reads and updates (evidence: `Server/Controllers/UserController.js`)
- Video operations → Video records: queries and saves (evidence: `Server/Controllers/VideoController.js`)
- Video operations → Channel records: updates channel (evidence: `Server/Controllers/VideoController.js`)
- Video operations → User records: uses user data (evidence: `Server/Controllers/VideoController.js`)
- Video operations → Comment records: uses comments (evidence: `Server/Controllers/VideoController.js`)
- Channel operations → Channel records: reads and updates (evidence: `Server/Controllers/ChannelController.js`)
- Channel operations → User records: uses user data (evidence: `Server/Controllers/ChannelController.js`)
- Channel operations → Video records: uses video data (evidence: `Server/Controllers/ChannelController.js`)
- Channel operations → Following records: creates following (evidence: `Server/Controllers/ChannelController.js`)
- Saved videos → Saved records: manages saved (evidence: `Server/Controllers/SavedController.js`)
- Comments → Comment records: uses comments
- Following → Following records: uses following
- User records → MongoDB: persists records
- Video records → MongoDB: persists records
- Channel records → MongoDB: persists records
- Saved records → MongoDB: persists records
- Comment records → MongoDB: persists records
- Following records → MongoDB: persists records
