# pablov-git/favourite-films architecture

> Architecture diagram of the GitHub repository pablov-git/favourite-films, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pablov-git/favourite-films
- Repository: https://github.com/pablov-git/favourite-films

## Overview

##### Project type and purpose
- This is a front-end Single Page Application (SPA) built with Vue 3 and Vite.
- There is no backend directory or API code; it’s a static-asset–driven UI that could be hosted on a CDN or static-site host.

##### File structure
- Top-level files:
- index.html – the SPA’s entry point
- package.json / package-lock.json – Node/NPM dependencies and scripts
- vite.config.js – Vite build/dev server configuration
- public/ – place for truly static assets (favicon, robots.txt, etc.)
- src/ – application code:
- main.js – bootstraps Vue and mounts App.vue
- App.vue – root component
- components/ – reusable SFCs: HeaderComponent.vue, MovieCard.vue, FavouriteComponent.vue
- assets/ – images, fonts
- style.css – global styles

##### README for additional insights
- It’s a minimal template to get started with Vue 3 + Vite.
- Uses `<script setup>` SFC syntax and ES modules.
- Implies a typical local dev workflow (Vite dev server with HMR) and a build step producing static files.

##### Final advice
- Core layers: developer tooling, build pipeline, hosting, runtime
- Lay out the component hierarchy explicitly
- Don’t overengineer—break the project into the SPA’s major moving parts and show how they connect
- Keep it readable: group related elements (all SFCs under one “Components” cluster) and annotate data flows (module import, HTTP fetch, HMR)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Dev Environment
    subgraph "Dev Environment"
        direction TB
        DevMachine["Developer Machine / IDE"]:::developer
        PackageJson["package.json"]:::config
        PackageLock["package-lock.json"]:::config
        ViteConfig["vite.config.js"]:::config
        DevMachine -->|edits| PackageJson
        DevMachine -->|edits| PackageLock
        DevMachine -->|edits| ViteConfig
        DevMachine -->|"npm run dev"| ViteServer
    end

    ViteServer["Vite Dev Server\n(HTTP + HMR)"]:::devserver

    %% Build Pipeline
    subgraph "Build Pipeline"
        direction TB
        DevMachine -->|"npm run build"| ViteBundler
        ViteBundler["Vite Bundler"]:::build
        ViteBundler -->|outputs| DistDir["dist/"]:::build
    end

    %% Hosting
    subgraph "Static Hosting / CDN"
        direction TB
        DistDir -->|deploy| StaticHost["Static Host / CDN"]:::host
    end

    %% Runtime
    subgraph "Runtime / Browser"
        direction TB
        StaticHost -->|serves| IndexHTML["index.html"]:::runtime
        IndexHTML -->|loads| Browser["Browser / Client"]:::runtime
        Browser -->|fetches| MainJS["src/main.js"]:::runtime
        Browser -->|loads styles| StyleCSS["src/style.css"]:::runtime
        Browser -->|loads assets| PublicAssets["public/"]:::asset
        Browser -->|loads assets| StaticAssets["src/assets/"]:::asset
        MainJS -->|bootstraps| AppComponent["src/App.vue"]:::component
        AppComponent -->|uses| HeaderComp["HeaderComponent.vue"]:::component
        AppComponent -->|uses| MovieCard["MovieCard.vue"]:::component
        AppComponent -->|uses| FavouriteComp["FavouriteComponent.vue"]:::component
    end

    %% Styles
    classDef developer fill:#e3f2fd,stroke:#90caf9;
    classDef config fill:#c5cae9,stroke:#7986cb;
    classDef devserver fill:#bbdefb,stroke:#64b5f6;
    classDef build fill:#c8e6c9,stroke:#81c784;
    classDef host fill:#f5f5f5,stroke:#e0e0e0;
    classDef runtime fill:#e1bee7,stroke:#ba68c8;
    classDef component fill:#ffe0b2,stroke:#ffb74d;
    classDef asset fill:#fff9c4,stroke:#fff176;

    %% Click Events
    click PackageJson "https://github.com/pablov-git/favourite-films/blob/master/package.json"
    click PackageLock "https://github.com/pablov-git/favourite-films/blob/master/package-lock.json"
    click ViteConfig "https://github.com/pablov-git/favourite-films/blob/master/vite.config.js"
    click PublicAssets "https://github.com/pablov-git/favourite-films/tree/master/public/"
    click StaticAssets "https://github.com/pablov-git/favourite-films/tree/master/src/assets/"
    click MainJS "https://github.com/pablov-git/favourite-films/blob/master/src/main.js"
    click AppComponent "https://github.com/pablov-git/favourite-films/blob/master/src/App.vue"
    click StyleCSS "https://github.com/pablov-git/favourite-films/blob/master/src/style.css"
    click HeaderComp "https://github.com/pablov-git/favourite-films/blob/master/src/components/HeaderComponent.vue"
    click MovieCard "https://github.com/pablov-git/favourite-films/blob/master/src/components/MovieCard.vue"
    click FavouriteComp "https://github.com/pablov-git/favourite-films/blob/master/src/components/FavouriteComponent.vue"
    click IndexHTML "https://github.com/pablov-git/favourite-films/blob/master/index.html"
```
