# ksendel-coder/practice_project architecture

> Architecture diagram of the GitHub repository ksendel-coder/practice_project, 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/ksendel-coder/practice_project
- Repository: https://github.com/ksendel-coder/practice_project

## Overview

MultiCinema is a React/TypeScript film-discovery SPA with an Express backend. The principal journey is browsing or searching films, filtering and paging results, then opening a selected film’s video; signed-in users can also register or log in, edit profiles, and create and like discussion threads. The graph separates page workflows, shared state, API access, and server responsibilities. Server routes and JSON-file persistence are documented in the README; the referenced database file is not present in the supplied tree, so it is not represented as a separate repository node.

Main entry points: [`src/App/App.tsx`](https://github.com/ksendel-coder/practice_project/blob/main/src/App/App.tsx) (Route application), [`src/Components/Pages/Films/Films.tsx`](https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Films/Films.tsx) (Film browser), [`src/Api/auth.ts`](https://github.com/ksendel-coder/practice_project/blob/main/src/Api/auth.ts) (Authentication API), [`src/Api/Api.ts`](https://github.com/ksendel-coder/practice_project/blob/main/src/Api/Api.ts) (HTTP client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Route application<br/>[App.tsx]"]
  node_home["Home<br/>[Home.tsx]"]
  node_header["Navigation and search<br/>[Header.tsx]"]
  node_films["Film browser<br/>[Films.tsx]"]
  node_filter["Film filtering<br/>[useFilmFilters.ts]"]
  node_pagination["Pagination<br/>[usePagination.ts]"]
  node_video["Video modal<br/>[VideoModal.tsx]"]
  node_filmsapi["Film API<br/>[films.ts]"]
end

subgraph group_identity["Identity and profile"]
  node_guard["Protected routes<br/>[ProtectedPages.tsx]"]
  node_register["Registration<br/>[CreateUser.tsx]"]
  node_login["Login<br/>[Login.tsx]"]
  node_profile["Profile editing<br/>[Profile.tsx]"]
  node_authapi["Authentication API<br/>[auth.ts]"]
end

subgraph group_community["Threads"]
  node_threads["Thread posts<br/>[Threads.tsx]"]
  node_threadapi["Thread API<br/>[threads.ts]"]
end

subgraph group_client["Client foundations"]
  node_apiclient["HTTP client<br/>[Api.ts]"]
  node_store[("Redux store<br/>[Store.ts]")]
  node_userstate["User state<br/>[userReduce.ts]"]
  node_searchstate["Search state<br/>[searchReduce.ts]"]
end

subgraph group_backend["Backend"]
  node_server["Express API and JSON persistence<br/>[server.js]"]
end

node_visitor(("Visitor"))
node_api_service{{"API service"}}

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_films
node_app -->|"routes to"| node_threads
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"protects routes"| node_guard
node_home -.->|"shares layout"| node_header
node_header -->|"dispatches search"| node_searchstate
node_films -->|"fetches films"| node_filmsapi
node_films -->|"filters results"| node_filter
node_films -->|"pages results"| node_pagination
node_films -->|"opens selected video"| node_video
node_films -->|"reads and clears"| node_searchstate
node_register -->|"registers account"| node_authapi
node_login -->|"authenticates"| node_authapi
node_login -->|"dispatches sign-in"| node_userstate
node_profile -->|"updates profile"| node_authapi
node_profile -->|"dispatches update"| node_userstate
node_threads -->|"loads and mutates"| node_threadapi
node_store -->|"combines reducer"| node_userstate
node_store -->|"combines reducer"| node_searchstate
node_authapi -->|"uses client"| node_apiclient
node_filmsapi -->|"uses client"| node_apiclient
node_threadapi -->|"uses client"| node_apiclient
node_apiclient -->|"sends requests"| node_api_service
node_api_service -->|"serves routes"| node_server

click node_app "https://github.com/ksendel-coder/practice_project/blob/main/src/App/App.tsx"
click node_home "https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Home/Home.tsx"
click node_header "https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Widgets/Header/Header.tsx"
click node_films "https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Films/Films.tsx"
click node_filter "https://github.com/ksendel-coder/practice_project/blob/main/src/Hooks/useFilmFilters.ts"
click node_pagination "https://github.com/ksendel-coder/practice_project/blob/main/src/Hooks/usePagination.ts"
click node_video "https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Layouts/VideoModal/VideoModal.tsx"
click node_guard "https://github.com/ksendel-coder/practice_project/blob/main/src/Components/ProtectedPages.tsx"
click node_register "https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/CreateUser/CreateUser.tsx"
click node_login "https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Login/Login.tsx"
click node_profile "https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Profile/Profile.tsx"
click node_threads "https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Threads/Threads.tsx"
click node_threadapi "https://github.com/ksendel-coder/practice_project/blob/main/src/Api/threads.ts"
click node_authapi "https://github.com/ksendel-coder/practice_project/blob/main/src/Api/auth.ts"
click node_filmsapi "https://github.com/ksendel-coder/practice_project/blob/main/src/Api/films.ts"
click node_apiclient "https://github.com/ksendel-coder/practice_project/blob/main/src/Api/Api.ts"
click node_store "https://github.com/ksendel-coder/practice_project/blob/main/src/Stores/Store.ts"
click node_userstate "https://github.com/ksendel-coder/practice_project/blob/main/src/Reducers/userReduce.ts"
click node_searchstate "https://github.com/ksendel-coder/practice_project/blob/main/src/Reducers/searchReduce.ts"
click node_server "https://github.com/ksendel-coder/practice_project/blob/main/server/server.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_app,node_home,node_header,node_films,node_filter,node_pagination,node_video,node_filmsapi toneBlue
class node_guard,node_register,node_login,node_profile,node_authapi toneAmber
class node_threads,node_threadapi,node_api_service toneMint
class node_apiclient,node_store,node_userstate,node_searchstate toneRose
class node_server,node_visitor toneIndigo
```

## Components

### User experience

- [Route application](https://github.com/ksendel-coder/practice_project/blob/main/src/App/App.tsx): `src/App/App.tsx`
- [Home](https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Home/Home.tsx): `src/Components/Pages/Home/Home.tsx`
- [Navigation and search](https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Widgets/Header/Header.tsx): `src/Components/Widgets/Header/Header.tsx`
- [Film browser](https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Films/Films.tsx): `src/Components/Pages/Films/Films.tsx`
- [Film filtering](https://github.com/ksendel-coder/practice_project/blob/main/src/Hooks/useFilmFilters.ts): `src/Hooks/useFilmFilters.ts`
- [Pagination](https://github.com/ksendel-coder/practice_project/blob/main/src/Hooks/usePagination.ts): `src/Hooks/usePagination.ts`
- [Video modal](https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Layouts/VideoModal/VideoModal.tsx): `src/Components/Layouts/VideoModal/VideoModal.tsx`
- [Film API](https://github.com/ksendel-coder/practice_project/blob/main/src/Api/films.ts): `src/Api/films.ts`

### Identity and profile

- [Protected routes](https://github.com/ksendel-coder/practice_project/blob/main/src/Components/ProtectedPages.tsx): `src/Components/ProtectedPages.tsx`
- [Registration](https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/CreateUser/CreateUser.tsx): `src/Components/Pages/CreateUser/CreateUser.tsx`
- [Login](https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Login/Login.tsx): `src/Components/Pages/Login/Login.tsx`
- [Profile editing](https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Profile/Profile.tsx): `src/Components/Pages/Profile/Profile.tsx`
- [Authentication API](https://github.com/ksendel-coder/practice_project/blob/main/src/Api/auth.ts): `src/Api/auth.ts`

### Threads

- [Thread posts](https://github.com/ksendel-coder/practice_project/blob/main/src/Components/Pages/Threads/Threads.tsx): `src/Components/Pages/Threads/Threads.tsx`
- [Thread API](https://github.com/ksendel-coder/practice_project/blob/main/src/Api/threads.ts): `src/Api/threads.ts`

### Client foundations

- [HTTP client](https://github.com/ksendel-coder/practice_project/blob/main/src/Api/Api.ts): `src/Api/Api.ts`
- [Redux store](https://github.com/ksendel-coder/practice_project/blob/main/src/Stores/Store.ts): `src/Stores/Store.ts`
- [User state](https://github.com/ksendel-coder/practice_project/blob/main/src/Reducers/userReduce.ts): `src/Reducers/userReduce.ts`
- [Search state](https://github.com/ksendel-coder/practice_project/blob/main/src/Reducers/searchReduce.ts): `src/Reducers/searchReduce.ts`

### Backend

- [Express API and JSON persistence](https://github.com/ksendel-coder/practice_project/blob/main/server/server.js): `server/server.js`

### Other components

- **Visitor**
- **API service**

## Connections

- Visitor → Route application: opens (evidence: `src/App/App.tsx`)
- Route application → Home: routes to (evidence: `src/App/App.tsx`)
- Route application → Film browser: routes to (evidence: `src/App/App.tsx`)
- Route application → Thread posts: routes to (evidence: `src/App/App.tsx`)
- Route application → Profile editing: routes to (evidence: `src/App/App.tsx`)
- Route application → Login: routes to (evidence: `src/App/App.tsx`)
- Route application → Registration: routes to (evidence: `src/App/App.tsx`)
- Route application → Protected routes: protects routes (evidence: `src/App/App.tsx`)
- Home → Navigation and search: shares layout
- Navigation and search → Search state: dispatches search (evidence: `src/Components/Widgets/Header/Header.tsx`)
- Film browser → Film API: fetches films (evidence: `src/Components/Pages/Films/Films.tsx`)
- Film browser → Film filtering: filters results (evidence: `src/Components/Pages/Films/Films.tsx`)
- Film browser → Pagination: pages results (evidence: `src/Components/Pages/Films/Films.tsx`)
- Film browser → Video modal: opens selected video (evidence: `src/Components/Pages/Films/Films.tsx`)
- Film browser → Search state: reads and clears (evidence: `src/Components/Pages/Films/Films.tsx`)
- Registration → Authentication API: registers account (evidence: `src/Components/Pages/CreateUser/CreateUser.tsx`)
- Login → Authentication API: authenticates (evidence: `src/Components/Pages/Login/Login.tsx`)
- Login → User state: dispatches sign-in (evidence: `src/Components/Pages/Login/Login.tsx`)
- Profile editing → Authentication API: updates profile (evidence: `src/Components/Pages/Profile/Profile.tsx`)
- Profile editing → User state: dispatches update (evidence: `src/Components/Pages/Profile/Profile.tsx`)
- Thread posts → Thread API: loads and mutates (evidence: `src/Components/Pages/Threads/Threads.tsx`)
- Redux store → User state: combines reducer (evidence: `src/Stores/Store.ts`)
- Redux store → Search state: combines reducer (evidence: `src/Stores/Store.ts`)
- Authentication API → HTTP client: uses client (evidence: `src/Api/auth.ts`)
- Film API → HTTP client: uses client (evidence: `src/Api/films.ts`)
- Thread API → HTTP client: uses client (evidence: `src/Api/threads.ts`)
- HTTP client → API service: sends requests (evidence: `src/Api/Api.ts`)
- API service → Express API and JSON persistence: serves routes (evidence: `README.md`)
