# rasulnur/kinopro-clone architecture

> Architecture diagram of the GitHub repository rasulnur/kinopro-clone, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rasulnur/kinopro-clone
- Repository: https://github.com/rasulnur/kinopro-clone

## Overview

##### Main Application Components

a) Frontend Layer (React + TypeScript)

b) State Management Layer
- Redux store representation (indicated by the /store directory)
- API layer integration (moviesApi)

##### Component Structure

a) Core UI Components:
- Header with search functionality
- Footer
- Dashboard Header
- Movie Card component
- Loading component
- ScrollTop component

b) Main Feature Modules:
- Home Module
- Categories section
- Popular section
- Telegram integration
- Movie Module
- Movie details
- Similar movies
- Profile Module
- Tickets system
- Top-up functionality
- Subscriptions management
- Search functionality
- Category browsing

##### Data Flow Representation

a) Redux Store Integration:
- Movies slice
- Movies thunks
- API interactions

b) Component Communications:
- Parent-child relationships
- State management flow
- API data flow

##### Technical Stack Indicators

Technology badges for:
- React
- TypeScript
- Vite
- Redux
- SCSS

##### Layer Organization
Top to bottom:
- UI Layer (Components)
- Business Logic Layer (Redux)
- Data Access Layer (API)

Additional Considerations:

##### Relationship between screens and their sub-components

- Grouping related components
- Using consistent spacing
- Adding clear labels
- Including brief descriptions for main components

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Frontend Layer"
        Router["Router"]
        
        subgraph "Core UI Components"
            Header["Header"]
            Footer["Footer"]
            DashHeader["Dashboard Header"]
            MovieCard["Movie Card"]
            Loading["Loading"]
            ScrollTop["ScrollTop"]
            PopUpSearch["Pop-up Search"]
            SearchBtn["Search Button"]
        end

        subgraph "Main Screens"
            Home["Home Screen"]
            MoviePage["Movie Page"]
            SearchPage["Search Page"]
            CategoryPage["Category Page"]
            
            subgraph "Profile Screens"
                Panel["Panel"]
                Tickets["Tickets"]
                TopUp["Top-up"]
                Subs["Subscriptions"]
            end

            subgraph "Home Components"
                Categories["Categories"]
                Popular["Popular"]
                Telegram["Telegram"]
            end

            subgraph "Movie Components"
                Similar["Similar Movies"]
            end
        end
    end

    subgraph "State Management"
        Store[(Redux Store)]
        MoviesSlice["Movies Slice"]
        MoviesThunk["Movies Thunks"]
        MoviesApi["Movies API"]
    end

    subgraph "Styling"
        GlobalStyles["Global Styles"]
        Variables["Variables"]
        Mixins["Mixins"]
    end

    %% Relationships
    Router --> Home
    Router --> MoviePage
    Router --> SearchPage
    Router --> CategoryPage
    Router --> Panel

    Home --> Categories
    Home --> Popular
    Home --> Telegram
    MoviePage --> Similar
    Panel --> Tickets
    Panel --> TopUp
    Panel --> Subs

    Header --> PopUpSearch
    Header --> SearchBtn

    Store --> MoviesSlice
    MoviesSlice --> MoviesThunk
    MoviesThunk --> MoviesApi

    %% Styling relationships
    GlobalStyles --> Variables
    GlobalStyles --> Mixins

    %% Click events
    click Router "https://github.com/RasulNur/kinopro-clone/blob/main/src/Router.tsx"
    click Header "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/ui/header/Header.tsx"
    click Footer "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/ui/footer/Footer.tsx"
    click DashHeader "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/ui/dashboardHeader/DashboardHeader.tsx"
    click MovieCard "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/ui/movieCard/MovieCard.tsx"
    click Loading "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/ui/Loading/Loading.tsx"
    click ScrollTop "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/ui/scrollTop/ScrollTop.tsx"
    click Store "https://github.com/RasulNur/kinopro-clone/blob/main/src/store/store.ts"
    click MoviesApi "https://github.com/RasulNur/kinopro-clone/blob/main/src/store/api/moviesApi.ts"
    click MoviesSlice "https://github.com/RasulNur/kinopro-clone/blob/main/src/store/movies/moviesSlice.ts"
    click MoviesThunk "https://github.com/RasulNur/kinopro-clone/blob/main/src/store/movies/moviesThunk.ts"
    click Home "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/home/Home.tsx"
    click Categories "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/home/categories/Categories.tsx"
    click Popular "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/home/popular/Popular.tsx"
    click Telegram "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/home/telegram/Telegram.tsx"
    click MoviePage "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/moviePage/MoviePage.tsx"
    click Similar "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/moviePage/similar/Similar.tsx"
    click Panel "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/profile/panelPage/Panel.tsx"
    click Tickets "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/profile/Tickets/NewTicket.tsx"
    click TopUp "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/profile/TopUpPage/TopUp.tsx"
    click Subs "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/profile/subsPage/Subscriptions.tsx"
    click SearchPage "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/searchPage/SearchPage.tsx"
    click PopUpSearch "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/ui/header/PopUpSearch/PopUpSearch.tsx"
    click SearchBtn "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/ui/header/searchBtn/SearchBtn.tsx"
    click GlobalStyles "https://github.com/RasulNur/kinopro-clone/blob/main/src/index.scss"
    click Variables "https://github.com/RasulNur/kinopro-clone/blob/main/src/variables.scss"
    click Mixins "https://github.com/RasulNur/kinopro-clone/blob/main/src/mixins.scss"
    click CategoryPage "https://github.com/RasulNur/kinopro-clone/blob/main/src/components/screens/categoryPage/CategoryPage.tsx"

    classDef frontend fill:#e1f5fe,stroke:#01579b
    classDef component fill:#e8f5e9,stroke:#2e7d32
    classDef state fill:#f3e5f5,stroke:#7b1fa2
    classDef styling fill:#fff3e0,stroke:#ff6f00

    class Router,Home,MoviePage,SearchPage,CategoryPage,Panel frontend
    class Header,Footer,DashHeader,MovieCard,Loading,ScrollTop,PopUpSearch,SearchBtn,Categories,Popular,Telegram,Similar,Tickets,TopUp,Subs component
    class Store,MoviesSlice,MoviesThunk,MoviesApi state
    class GlobalStyles,Variables,Mixins styling
```
