# aoudumber-bade/impress_your_love architecture

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

- Interactive diagram: https://gitdiagram.com/aoudumber-bade/impress_your_love
- Repository: https://github.com/aoudumber-bade/impress_your_love

## Overview

##### Project Type and Purpose
- This is a **single-page, front-end-only web application** built with React (JSX), bundled by Vite, and styled via Tailwind CSS.
- It delivers a personalized “love story” experience: passcodes, timers, image/music galleries, and recap pages, all configured via a central `config.js`.

##### File Structure
- Top-level files:
- `index.html` – SPA entry point
- Vite/Tailwind/NPM configs (`vite.config.js`, `tailwind.config.js`, `package.json`)
- `src/`:
- `main.jsx` → mounts `<App />` into the DOM
- `App.jsx` & `App.css` → root component, global styles
- `assets/` → static media (images, music covers, fireworks background)
- `components/config.js` → single source of truth for all text, image, and music settings

##### Extract Insights from the README
- Customization via `config.js` and media in `src/assets/`.
- Fully responsive, mobile-first; uses `npm run dev` (Vite dev server) and static hosting in production.
- No server-side logic—pure client-side rendering.

##### Main Components
a. Developer Environment & Build Pipeline
- Node.js & NPM → installs dependencies
- Vite Dev Server → local hot-reload during development
- Vite Build → bundles JS/CSS/assets into optimized static files
b. Deployment / Hosting
- Static Site Host (e.g., Netlify, Vercel, S3+CloudFront)
- CDN delivers `index.html`, JS bundle, CSS, and media assets
c. Client-Side Application (Browser)
- `index.html` → imports bundled scripts & styles
- React Runtime → reads `config.js` → hydrates `<App />`
- Component Tree → UI modules (Passcode, Timer, Messages, Pictures, Music, Recap, Closing)
- Static Assets → images/music loaded from `/assets/`

##### Relationships & Interactions
- **Dev Flow:**
1. Developer writes code (`.jsx`, `config.js`, styles)
2. Vite compiles & serves (or builds for prod)
- **Runtime Flow:**
1. Browser requests `index.html` → receives JS/CSS
2. React initializes → loads configuration data
3. User inputs (passcode, clicks) → props/state propagate through child components
4. Components request media from static asset folder → render dynamic galleries/timers
- **No external API or database** involved.

##### Architectural Patterns & Design Principles
- **Component-Based Architecture:** each UI view is a self-contained React component
- **Config-Driven UI:** `config.js` decouples content from code
- **Build-Time Asset Bundling:** Vite supports ES modules & code splitting
- **Mobile-First Responsive Design:** Tailwind classes enforce breakpoints

##### Technologies & Frameworks to Call Out
- React (JSX)
- Vite (ES module bundler & dev server)
- Tailwind CSS (utility-first styling)
- Node.js / NPM (package management)
- Static hosting / CDN

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Development & Build"
        dev["Developer"]:::build
        pm["package.json"]:::build
        vitecfg["vite.config.js"]:::build
        tailcfg["tailwind.config.js"]:::build
        postcfg["postcss.config.js"]:::build
        dev -->|installs dependencies| pm
        pm -->|configures| vitecfg
        pm -->|configures| tailcfg
        pm -->|configures| postcfg
        vitecfg -->|serves & bundles| buildOutput["Static Build Output"]:::build
    end

    subgraph "Hosting & CDN"
        cdn["CDN / Static Host"]:::build
        buildOutput --> cdn
        cdn -->|serves| indexhtml["index.html"]:::client
    end

    subgraph "Client-Side Application (Browser)"
        browser["Browser"]:::client
        indexhtml -->|loads| browser
        bundle["JS & CSS Bundle"]:::client
        browser -->|fetches bundle| bundle
        main["main.jsx"]:::client
        bundle -->|bootstraps| main
        app["App.jsx"]:::client
        main -->|mounts App| app
        appcss["App.css"]:::client
        app -->|imports styles| appcss
        config["config.js"]:::client
        app -->|reads config| config

        subgraph "UI Components"
            pc["Passcode.jsx"]:::client
            tm["Timer.jsx"]:::client
            car["Carousel.jsx"]:::client
            msg["Message.jsx"]:::client
            ques["Question.jsx"]:::client
            pic["Picture.jsx"]:::client
            imgC["ImageCard.jsx"]:::client
            lett["Letter.jsx"]:::client
            mus["Music.jsx"]:::client
            recap["Recap.jsx"]:::client
            clos["Closing.jsx"]:::client
        end

        subgraph "Icons"
            iconsIdx["icons/index.js"]:::client
            arrowL["ArrowLeft.jsx"]:::client
            arrowR["ArrowRight.jsx"]:::client
            googleIc["Google.jsx"]:::client
            heartIc["Heart.jsx"]:::client
            imageIc["Image.jsx"]:::client
            msgIc["Message.jsx"]:::client
            musicIc["Music.jsx"]:::client
        end

        assetsCyl["Assets Folder"]:::assets
        browser -->|requests media| assetsCyl
        config --> pc & tm & car & msg & ques & pic & imgC & lett & mus & recap & clos
        car & tm & pc & msg & ques & pic & imgC & lett & mus & recap & clos -->|loads assets| assetsCyl
        iconsIdx --> arrowL & arrowR & googleIc & heartIc & imageIc & msgIc & musicIc
        app --> iconsIdx
    end

    click pm "https://github.com/aoudumber-bade/impress_your_love/blob/main/package.json"
    click vitecfg "https://github.com/aoudumber-bade/impress_your_love/blob/main/vite.config.js"
    click tailcfg "https://github.com/aoudumber-bade/impress_your_love/blob/main/tailwind.config.js"
    click postcfg "https://github.com/aoudumber-bade/impress_your_love/blob/main/postcss.config.js"
    click indexhtml "https://github.com/aoudumber-bade/impress_your_love/blob/main/index.html"
    click main "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/main.jsx"
    click app "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/App.jsx"
    click appcss "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/App.css"
    click config "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/config.js"
    click car "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/Carousel.jsx"
    click tm "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/Timer.jsx"
    click pc "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/Passcode.jsx"
    click recap "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/Recap.jsx"
    click clos "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/Closing.jsx"
    click msg "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/Message.jsx"
    click ques "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/Question.jsx"
    click pic "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/Picture.jsx"
    click imgC "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/ImageCard.jsx"
    click lett "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/Letter.jsx"
    click mus "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/Music.jsx"
    click iconsIdx "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/icons/index.js"
    click arrowL "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/icons/ArrowLeft.jsx"
    click arrowR "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/icons/ArrowRight.jsx"
    click googleIc "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/icons/Google.jsx"
    click heartIc "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/icons/Heart.jsx"
    click imageIc "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/icons/Image.jsx"
    click msgIc "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/icons/Message.jsx"
    click musicIc "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/components/icons/Music.jsx"
    click assetsCyl "https://github.com/aoudumber-bade/impress_your_love/blob/main/src/assets/index.js"

    classDef build fill:#D0E8FF,stroke:#333,stroke-width:1px
    classDef client fill:#DFFFE0,stroke:#333,stroke-width:1px
    classDef assets fill:#FFE8C0,stroke:#333,stroke-width:1px
```
