# erraksalma/cin-track architecture

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

- Interactive diagram: https://gitdiagram.com/erraksalma/cin-track
- Repository: https://github.com/erraksalma/cin-track

## Overview

Cin-Track is a browser-based film and series discovery app. Users load a remote catalogue, then search, filter and paginate results; they can open title details and manage favorites, which persist in LocalStorage. The main module coordinates these actions and updates the page, while rendering helpers produce cards and modal content and the store fetches catalogue data. The README documents the product capabilities; the relationship edges below are limited to calls and DOM interactions visible in the sampled JavaScript.

Main entry points: [`js/main.js`](https://github.com/erraksalma/cin-track/blob/main/js/main.js) (App controller), [`js/store.js`](https://github.com/erraksalma/cin-track/blob/main/js/store.js) (Catalog loader), [`index.html`](https://github.com/erraksalma/cin-track/blob/main/index.html) (App page), [`js/render.js`](https://github.com/erraksalma/cin-track/blob/main/js/render.js) (Card renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interactions"]
  node_controller["App controller<br/>[main.js]"]
  node_search["Search and filters<br/>[main.js]"]
  node_pagination["Pagination<br/>[main.js]"]
  node_favorites["Favorites<br/>[main.js]"]
end

subgraph group_catalog["Catalog data"]
  node_favorite_store[("LocalStorage")]
  node_catalog_store["Catalog loader<br/>[store.js]"]
  node_remote_catalog[("Remote catalog")]
end

subgraph group_presentation["Presentation"]
  node_page["App page<br/>[index.html]"]
  node_card_renderer["Card renderer<br/>[render.js]"]
  node_modal_renderer["Details renderer<br/>[render.js]"]
end

node_user(("Visitor"))

node_user -->|"interacts with"| node_controller
node_controller -->|"loads catalog"| node_catalog_store
node_catalog_store -->|"fetches data"| node_remote_catalog
node_controller -->|"handles input"| node_search
node_controller -->|"handles paging"| node_pagination
node_controller -->|"updates favorites"| node_favorites
node_favorites -->|"reads and writes"| node_favorite_store
node_controller -->|"renders cards"| node_card_renderer
node_controller -->|"renders details"| node_modal_renderer
node_controller -->|"updates DOM"| node_page

click node_page "https://github.com/erraksalma/cin-track/blob/main/index.html"
click node_controller "https://github.com/erraksalma/cin-track/blob/main/js/main.js"
click node_search "https://github.com/erraksalma/cin-track/blob/main/js/main.js"
click node_pagination "https://github.com/erraksalma/cin-track/blob/main/js/main.js"
click node_favorites "https://github.com/erraksalma/cin-track/blob/main/js/main.js"
click node_catalog_store "https://github.com/erraksalma/cin-track/blob/main/js/store.js"
click node_card_renderer "https://github.com/erraksalma/cin-track/blob/main/js/render.js"
click node_modal_renderer "https://github.com/erraksalma/cin-track/blob/main/js/render.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_controller,node_search,node_pagination,node_favorites toneBlue
class node_favorite_store,node_catalog_store,node_remote_catalog toneAmber
class node_page,node_card_renderer,node_modal_renderer toneMint
class node_user toneIndigo
```

## Components

### User interactions

- [App controller](https://github.com/erraksalma/cin-track/blob/main/js/main.js): `js/main.js`
- [Search and filters](https://github.com/erraksalma/cin-track/blob/main/js/main.js): `js/main.js`
- [Pagination](https://github.com/erraksalma/cin-track/blob/main/js/main.js): `js/main.js`
- [Favorites](https://github.com/erraksalma/cin-track/blob/main/js/main.js): `js/main.js`

### Catalog data

- **LocalStorage**
- [Catalog loader](https://github.com/erraksalma/cin-track/blob/main/js/store.js): `js/store.js`
- **Remote catalog**

### Presentation

- [App page](https://github.com/erraksalma/cin-track/blob/main/index.html): `index.html`
- [Card renderer](https://github.com/erraksalma/cin-track/blob/main/js/render.js): `js/render.js`
- [Details renderer](https://github.com/erraksalma/cin-track/blob/main/js/render.js): `js/render.js`

### Other components

- **Visitor**

## Connections

- Visitor → App controller: interacts with (evidence: `js/main.js`)
- App controller → Catalog loader: loads catalog (evidence: `js/main.js`)
- Catalog loader → Remote catalog: fetches data (evidence: `js/store.js`)
- App controller → Search and filters: handles input (evidence: `js/main.js`)
- App controller → Pagination: handles paging (evidence: `js/main.js`)
- App controller → Favorites: updates favorites (evidence: `js/main.js`)
- Favorites → LocalStorage: reads and writes (evidence: `js/main.js`)
- App controller → Card renderer: renders cards (evidence: `js/main.js`)
- App controller → Details renderer: renders details (evidence: `js/main.js`)
- App controller → App page: updates DOM (evidence: `js/main.js`)
