# opeyemi285/moviq architecture

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

- Interactive diagram: https://gitdiagram.com/opeyemi285/moviq
- Repository: https://github.com/opeyemi285/moviq

## Overview

#### Purpose and Entry Points
Moviq is a static, multi-page movie-discovery site. Each HTML page is an independent browser entry point with a paired CSS and JavaScript file:
- Landing/discovery: `index.html`, `index.js`, `index.css`
- Movie catalog: `all-movies.html`, `all-movies.js`, `all-movies.css`
- Movie detail/trailer view: `details.html`, `details.js`, `details.css`
- Authentication/onboarding screens: `signin.html`, `signup.html`, `onboarding.html`

#### Page-Oriented Frontend Architecture
There is no evident shared application shell, backend, build system, or server-side routing in the repository. Navigation and state transfer are expected to occur through browser page loads, likely with URL parameters or browser storage between:
- `index.html`
- `all-movies.html`
- `details.html`

Each page owns its layout, styling, DOM interaction, and data-fetch/render behavior through its co-located JavaScript.

#### Movie Discovery and Catalog Flow
The primary browsing flow starts from the landing page and continues into a broader movie listing:
- `index.js`
- `all-movies.js`
- `details.js`

JavaScript uses the browser Fetch API to retrieve movie content from TMDB. Returned movie records are rendered into page-specific UI, supporting discovery and search. Selection of a movie transitions the user to `details.html`, where the selected title’s metadata is presented.

#### Movie Details and Trailer Boundary
The detail page is the external-data integration boundary for a selected movie:
- `details.html`
- `details.js`
- `details.css`

It presents descriptive metadata, ratings, release dates, and trailer content. TMDB supplies both core movie information and trailer/video data; the frontend is responsible for mapping that API response into the detail-page DOM and embedding or linking trailer playback.

#### User Journey Screens
Authentication and onboarding are distinct client-side screens:
- `signin.html`, `signin.js`, `signin.css`
- `signup.html`, `signup.js`, `signup.css`
- `onboarding.html`, `onboarding.js`, `onboarding.css`

No backend, identity provider, or persistence layer is represented in the tree. These pages therefore form a UI-level user journey boundary; any credential validation or session behavior must be implemented locally or delegated to services not present here.

#### Runtime, Dependencies, and Deployment
The runtime is the browser: HTML5, CSS3, JavaScript, Fetch API, and Bootstrap styling/components. TMDB is the material external service and supplies movie and trailer data. The README links a Vercel deployment, consistent with static hosting. Repository-hosted static assets include favicon metadata under `favicon/` and imagery under `images/`.

#### Architectural Constraints
The duplicated per-page CSS/JS structure favors independently deployable static pages but creates cross-page consistency and shared-state risks. The principal integration contracts are TMDB request/response shapes and the mechanism used to identify a selected movie when moving from catalog pages to `details.html`.

Main entry points: [`index.html`](https://github.com/opeyemi285/moviq/blob/main/index.html) (Landing page), [`index.js`](https://github.com/opeyemi285/moviq/blob/main/index.js) (Landing discovery logic), [`all-movies.js`](https://github.com/opeyemi285/moviq/blob/main/all-movies.js) (Catalog logic), [`all-movies.html`](https://github.com/opeyemi285/moviq/blob/main/all-movies.html) (Movie catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Movie discovery"]
  node_landing_page["Landing page<br/>static HTML page<br/>[index.html]"]
  node_landing_logic["Landing discovery logic<br/>browser JavaScript<br/>[index.js]"]
  node_catalog_page["Movie catalog<br/>static HTML page<br/>[all-movies.html]"]
  node_catalog_logic["Catalog logic<br/>browser JavaScript<br/>[all-movies.js]"]
  node_details_page["Movie details<br/>static HTML page<br/>[details.html]"]
  node_details_logic["Details logic<br/>browser JavaScript<br/>[details.js]"]
  node_selected_movie_contract["Selected movie handoff<br/>cross-page state"]
end

subgraph group_journey["User journey screens"]
  node_signin["Sign in<br/>client-side screen<br/>[signin.html]"]
  node_signup["Sign up<br/>client-side screen<br/>[signup.html]"]
  node_onboarding["Onboarding<br/>client-side screen<br/>[onboarding.html]"]
end

subgraph group_external["Runtime &amp; external services"]
  node_browser{{"Browser runtime<br/>HTML/CSS/JavaScript runtime"}}
  node_tmdb[("TMDB API<br/>movie data service")]
  node_bootstrap["Bootstrap<br/>UI dependency"]
  node_static_assets["Static assets<br/>repository assets"]
  node_vercel["Static hosting<br/>deployment target"]
end

node_vercel -->|"serves static pages"| node_browser
node_browser -->|"loads"| node_landing_page
node_browser -->|"loads"| node_catalog_page
node_browser -->|"loads"| node_details_page
node_landing_page -->|"runs"| node_landing_logic
node_catalog_page -->|"runs"| node_catalog_logic
node_details_page -->|"runs"| node_details_logic
node_landing_logic -->|"fetches movie content"| node_tmdb
node_catalog_logic -->|"fetches and searches"| node_tmdb
node_details_logic -->|"fetches metadata and videos"| node_tmdb
node_landing_logic -->|"navigates to catalog"| node_catalog_page
node_landing_logic -->|"sets selected movie"| node_selected_movie_contract
node_catalog_logic -->|"sets selected movie"| node_selected_movie_contract
node_selected_movie_contract -->|"resolves selected title"| node_details_logic
node_signin -->|"user journey"| node_signup
node_signup -->|"continues to"| node_onboarding
node_browser -->|"loads"| node_signin
node_browser -->|"loads"| node_signup
node_browser -->|"loads"| node_onboarding
node_landing_page -.->|"uses UI styling"| node_bootstrap
node_landing_page -.->|"uses imagery and favicon"| node_static_assets

click node_landing_page "https://github.com/opeyemi285/moviq/blob/main/index.html"
click node_landing_logic "https://github.com/opeyemi285/moviq/blob/main/index.js"
click node_catalog_page "https://github.com/opeyemi285/moviq/blob/main/all-movies.html"
click node_catalog_logic "https://github.com/opeyemi285/moviq/blob/main/all-movies.js"
click node_details_page "https://github.com/opeyemi285/moviq/blob/main/details.html"
click node_details_logic "https://github.com/opeyemi285/moviq/blob/main/details.js"
click node_signin "https://github.com/opeyemi285/moviq/blob/main/signin.html"
click node_signup "https://github.com/opeyemi285/moviq/blob/main/signup.html"
click node_onboarding "https://github.com/opeyemi285/moviq/blob/main/onboarding.html"

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_landing_page,node_landing_logic,node_catalog_page,node_catalog_logic,node_details_page,node_details_logic,node_selected_movie_contract toneBlue
class node_signin,node_signup,node_onboarding toneAmber
class node_browser,node_tmdb,node_bootstrap,node_static_assets,node_vercel toneMint
```

## Components

### Movie discovery

- [Landing page](https://github.com/opeyemi285/moviq/blob/main/index.html): static HTML page · Paired with page-specific CSS and JavaScript. · `index.html`
- [Landing discovery logic](https://github.com/opeyemi285/moviq/blob/main/index.js): browser JavaScript · Fetches and renders discovery results. · `index.js`
- [Movie catalog](https://github.com/opeyemi285/moviq/blob/main/all-movies.html): static HTML page · Broader searchable movie listing. · `all-movies.html`
- [Catalog logic](https://github.com/opeyemi285/moviq/blob/main/all-movies.js): browser JavaScript · Fetches, searches, and renders catalog records. · `all-movies.js`
- [Movie details](https://github.com/opeyemi285/moviq/blob/main/details.html): static HTML page · Selected-title metadata and trailer view. · `details.html`
- [Details logic](https://github.com/opeyemi285/moviq/blob/main/details.js): browser JavaScript · Maps movie and video responses into the detail DOM. · `details.js`
- **Selected movie handoff**: cross-page state · URL parameters or browser storage identify the selected movie.

### User journey screens

- [Sign in](https://github.com/opeyemi285/moviq/blob/main/signin.html): client-side screen · Independent UI page with local or delegated session behavior. · `signin.html`
- [Sign up](https://github.com/opeyemi285/moviq/blob/main/signup.html): client-side screen · Independent UI page with no represented identity backend. · `signup.html`
- [Onboarding](https://github.com/opeyemi285/moviq/blob/main/onboarding.html): client-side screen · Independent onboarding UI page. · `onboarding.html`

### Runtime & external services

- **Browser runtime**: HTML/CSS/JavaScript runtime · Runs each page independently and provides Fetch API navigation.
- **TMDB API**: movie data service · Supplies movie metadata, search results, and trailer/video data.
- **Bootstrap**: UI dependency · Provides styling and UI components.
- **Static assets**: repository assets · Favicon metadata and image resources.
- **Static hosting**: deployment target · Vercel-hosted static site deployment.

## Connections

- Static hosting → Browser runtime: serves static pages
- Browser runtime → Landing page: loads
- Browser runtime → Movie catalog: loads
- Browser runtime → Movie details: loads
- Landing page → Landing discovery logic: runs
- Movie catalog → Catalog logic: runs
- Movie details → Details logic: runs
- Landing discovery logic → TMDB API: fetches movie content
- Catalog logic → TMDB API: fetches and searches
- Details logic → TMDB API: fetches metadata and videos
- Landing discovery logic → Movie catalog: navigates to catalog
- Landing discovery logic → Selected movie handoff: sets selected movie
- Catalog logic → Selected movie handoff: sets selected movie
- Selected movie handoff → Details logic: resolves selected title
- Sign in → Sign up: user journey
- Sign up → Onboarding: continues to
- Browser runtime → Sign in: loads
- Browser runtime → Sign up: loads
- Browser runtime → Onboarding: loads
- Landing page → Bootstrap: uses UI styling
- Landing page → Static assets: uses imagery and favicon
