# arshakyan998/testtask architecture

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

- Interactive diagram: https://gitdiagram.com/arshakyan998/testtask
- Repository: https://github.com/arshakyan998/testtask

## Overview

This is a small React image-gallery and photo-editing UI. A visitor enters through the app bootstrap, reaches the router, and can browse the gallery into an image comparison view, then choose a gallery or camera action that navigates to the avatar screen. The routes also expose login and avatar screens; the main gallery can open login as a modal. The graph follows the sampled routing and component calls; several page implementations and layout behavior were not shown, so their internal links are omitted.

Main entry points: [`src/components/Main/Main.tsx`](https://github.com/arshakyan998/testtask/blob/master/src/components/Main/Main.tsx) (Gallery view), [`src/routes/Routs.tsx`](https://github.com/arshakyan998/testtask/blob/master/src/routes/Routs.tsx) (Route definitions), [`src/components/Button/Button.tsx`](https://github.com/arshakyan998/testtask/blob/master/src/components/Button/Button.tsx) (Button control), [`src/components/Card/Card.tsx`](https://github.com/arshakyan998/testtask/blob/master/src/components/Card/Card.tsx) (Image comparison)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["App and routing"]
  node_bootstrap["React bootstrap<br/>[main.tsx]"]
  node_app["App router host<br/>[App.tsx]"]
  node_router["Route definitions<br/>[Routs.tsx]"]
  node_layout["Route layout<br/>[Layout.tsx]"]
  node_transitions["Page slider<br/>[Slider.tsx]"]
  node_pages["Page components"]
end

subgraph group_gallery["Gallery experience"]
  node_mainpage["Main page<br/>[Main.tsx]"]
  node_galleryview["Gallery view<br/>[Main.tsx]"]
  node_header["Gallery header<br/>[Header.tsx]"]
  node_image["Gallery image link<br/>[Image.tsx]"]
  node_footer["Gallery footer<br/>[Footer.tsx]"]
end

subgraph group_photo["Photo screens"]
  node_cardpage["Card page<br/>[Card.tsx]"]
  node_card["Image comparison<br/>[Card.tsx]"]
  node_actions["Photo actions<br/>[Actions.tsx]"]
  node_avatarpage["Avatar page<br/>[Avatar.tsx]"]
  node_avatar["Avatar screen<br/>[Avatar.tsx]"]
end

subgraph group_shared["Shared UI"]
  node_login["Login form<br/>[Login.tsx]"]
  node_button["Button control<br/>[Button.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens app"| node_bootstrap
node_bootstrap -->|"renders"| node_app
node_app -->|"provides router"| node_router
node_router -->|"sets layout"| node_layout
node_router -->|"routes to"| node_pages
node_router -->|"wraps pages"| node_transitions
node_mainpage -->|"renders"| node_galleryview
node_galleryview -->|"renders"| node_header
node_galleryview -->|"renders"| node_image
node_galleryview -->|"renders"| node_footer
node_galleryview -->|"opens modal"| node_login
node_card -->|"renders"| node_actions
node_actions -->|"navigates to"| node_avatarpage
node_card -->|"renders"| node_button
node_login -->|"renders"| node_button
node_avatar -->|"renders"| node_button

click node_bootstrap "https://github.com/arshakyan998/testtask/blob/master/src/main.tsx"
click node_app "https://github.com/arshakyan998/testtask/blob/master/src/App.tsx"
click node_router "https://github.com/arshakyan998/testtask/blob/master/src/routes/Routs.tsx"
click node_layout "https://github.com/arshakyan998/testtask/blob/master/src/routes/Layout.tsx"
click node_transitions "https://github.com/arshakyan998/testtask/blob/master/src/components/HOC/Slider.tsx"
click node_pages "https://github.com/arshakyan998/testtask/tree/master/src/pages"
click node_mainpage "https://github.com/arshakyan998/testtask/blob/master/src/pages/Main.tsx"
click node_galleryview "https://github.com/arshakyan998/testtask/blob/master/src/components/Main/Main.tsx"
click node_header "https://github.com/arshakyan998/testtask/blob/master/src/components/Main/Header/Header.tsx"
click node_image "https://github.com/arshakyan998/testtask/blob/master/src/components/Main/Image/Image.tsx"
click node_footer "https://github.com/arshakyan998/testtask/blob/master/src/components/Main/Footer/Footer.tsx"
click node_login "https://github.com/arshakyan998/testtask/blob/master/src/components/Login/Login.tsx"
click node_cardpage "https://github.com/arshakyan998/testtask/blob/master/src/pages/Card.tsx"
click node_card "https://github.com/arshakyan998/testtask/blob/master/src/components/Card/Card.tsx"
click node_actions "https://github.com/arshakyan998/testtask/blob/master/src/components/Card/Actions/Actions.tsx"
click node_avatarpage "https://github.com/arshakyan998/testtask/blob/master/src/pages/Avatar.tsx"
click node_avatar "https://github.com/arshakyan998/testtask/blob/master/src/components/Avatar/Avatar.tsx"
click node_button "https://github.com/arshakyan998/testtask/blob/master/src/components/Button/Button.tsx"

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_bootstrap,node_app,node_router,node_layout,node_transitions,node_pages toneBlue
class node_mainpage,node_galleryview,node_header,node_image,node_footer toneAmber
class node_cardpage,node_card,node_actions,node_avatarpage,node_avatar toneMint
class node_login,node_button toneRose
class node_visitor toneIndigo
```

## Components

### App and routing

- [React bootstrap](https://github.com/arshakyan998/testtask/blob/master/src/main.tsx): `src/main.tsx`
- [App router host](https://github.com/arshakyan998/testtask/blob/master/src/App.tsx): `src/App.tsx`
- [Route definitions](https://github.com/arshakyan998/testtask/blob/master/src/routes/Routs.tsx): `src/routes/Routs.tsx`
- [Route layout](https://github.com/arshakyan998/testtask/blob/master/src/routes/Layout.tsx): `src/routes/Layout.tsx`
- [Page slider](https://github.com/arshakyan998/testtask/blob/master/src/components/HOC/Slider.tsx): `src/components/HOC/Slider.tsx`
- [Page components](https://github.com/arshakyan998/testtask/tree/master/src/pages): `src/pages`

### Gallery experience

- [Main page](https://github.com/arshakyan998/testtask/blob/master/src/pages/Main.tsx): `src/pages/Main.tsx`
- [Gallery view](https://github.com/arshakyan998/testtask/blob/master/src/components/Main/Main.tsx): `src/components/Main/Main.tsx`
- [Gallery header](https://github.com/arshakyan998/testtask/blob/master/src/components/Main/Header/Header.tsx): `src/components/Main/Header/Header.tsx`
- [Gallery image link](https://github.com/arshakyan998/testtask/blob/master/src/components/Main/Image/Image.tsx): `src/components/Main/Image/Image.tsx`
- [Gallery footer](https://github.com/arshakyan998/testtask/blob/master/src/components/Main/Footer/Footer.tsx): `src/components/Main/Footer/Footer.tsx`

### Photo screens

- [Card page](https://github.com/arshakyan998/testtask/blob/master/src/pages/Card.tsx): `src/pages/Card.tsx`
- [Image comparison](https://github.com/arshakyan998/testtask/blob/master/src/components/Card/Card.tsx): `src/components/Card/Card.tsx`
- [Photo actions](https://github.com/arshakyan998/testtask/blob/master/src/components/Card/Actions/Actions.tsx): `src/components/Card/Actions/Actions.tsx`
- [Avatar page](https://github.com/arshakyan998/testtask/blob/master/src/pages/Avatar.tsx): `src/pages/Avatar.tsx`
- [Avatar screen](https://github.com/arshakyan998/testtask/blob/master/src/components/Avatar/Avatar.tsx): `src/components/Avatar/Avatar.tsx`

### Shared UI

- [Login form](https://github.com/arshakyan998/testtask/blob/master/src/components/Login/Login.tsx): `src/components/Login/Login.tsx`
- [Button control](https://github.com/arshakyan998/testtask/blob/master/src/components/Button/Button.tsx): `src/components/Button/Button.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → React bootstrap: opens app (evidence: `src/main.tsx`)
- React bootstrap → App router host: renders (evidence: `src/main.tsx`)
- App router host → Route definitions: provides router (evidence: `src/App.tsx`)
- Route definitions → Route layout: sets layout (evidence: `src/routes/Routs.tsx`)
- Route definitions → Page components: routes to (evidence: `src/routes/Routs.tsx`)
- Route definitions → Page slider: wraps pages (evidence: `src/routes/Routs.tsx`)
- Main page → Gallery view: renders (evidence: `src/pages/Main.tsx`)
- Gallery view → Gallery header: renders (evidence: `src/components/Main/Main.tsx`)
- Gallery view → Gallery image link: renders (evidence: `src/components/Main/Main.tsx`)
- Gallery view → Gallery footer: renders (evidence: `src/components/Main/Main.tsx`)
- Gallery view → Login form: opens modal (evidence: `src/components/Main/Main.tsx`)
- Image comparison → Photo actions: renders (evidence: `src/components/Card/Card.tsx`)
- Photo actions → Avatar page: navigates to (evidence: `src/components/Card/Actions/Actions.tsx`)
- Image comparison → Button control: renders (evidence: `src/components/Card/Card.tsx`)
- Login form → Button control: renders (evidence: `src/components/Login/Login.tsx`)
- Avatar screen → Button control: renders (evidence: `src/components/Avatar/Avatar.tsx`)
