# itzdineshx/pick_me_a architecture

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

- Interactive diagram: https://gitdiagram.com/itzdineshx/pick_me_a
- Repository: https://github.com/itzdineshx/pick_me_a

## Overview

##### Project type and purpose
- This is a single-page, front-end application (“Pick Me A”) built with React + TypeScript, bundled by Vite, styled with Tailwind CSS, and deployed as a static site (e.g., Netlify).
- Its purpose is to present an immersive “entertainment discovery hub” (anime, movies, music) featuring 3D portal effects, dynamic themes, and responsive design.

##### File structure
- Top level:
- package.json, bun.lockb, tsconfig*.json, vite.config.ts, tailwind.config.ts, postcss.config.js, eslint.config.js (build- & lint configs)
- public/, index.html (static assets & HTML entry point)
- src/:
- main.tsx → mounts the React tree into index.html
- App.tsx → top-level component with routers & providers
- pages/ → route views (Index.tsx, NotFound.tsx)
- components/ → reusable UI and 3D components
- components/ui/ → base UI primitives (shadcn/ui wrappers around Radix UI)
- hooks/ → custom React hooks (useToast, useMobile)
- lib/ → shared utilities

##### README for technical stack & architecture hints
- React 18 + TypeScript, Vite, Tailwind CSS
- Deployment: static hosting (Netlify, Vercel, S3+CloudFront)

a. External Clients & Hosting
- Users’ browsers
- CDN/Static site host (Netlify/Vercel) serving index.html + JS/CSS bundles + assets
b. Application Shell
- index.html → main.tsx
- React root (QueryClientProvider, ThemeProvider, Router)
c. UI Layer
- Routing layer (React Router)
- Pages (Index, NotFound)
- Layout & theming (Tailwind + custom design tokens)
d. Component Layer
- Base UI components (shadcn/ui + Radix primitives)
- Custom widgets (PortalCard, CinematicTitle, Portal3D, etc.)
- Hook abstractions (useToast, useMobile)
e. Data Layer
- TanStack Query client caches & manages all REST/GraphQL calls
- External content APIs:
- Anime API (AniePick)
- Movie Database API (CinePick)
- Music Service API (MeloPick)
f. 3D Engine
- React Three Fiber + Three.js under the hood for immersive portal effects
g. Build & Deployment
- Vite (dev server, HMR, build pipeline)
- Tailwind CSS / PostCSS processing
- GitHub → Netlify CI/CD pipeline

##### Relationships & interactions
- Browser requests index.html → loads JS/CSS bundles → React app boots
- React Router switches pages → page mounts pull data via TanStack Query → queries hit external APIs → responses populate React state & UI
- Components render UI & 3D scenes → Three.js canvas embedded in React tree
- ThemeProvider supplies HSL tokens for dynamic light/dark mode theming
- shadcn/ui primitives ensure consistent design system usage

##### Architectural patterns & design principles
- SPA (Single-Page Application) with component-driven architecture
- Atomic/Composable UI (base primitives → higher-order components)
- Declarative data fetching (TanStack Query)
- Separation of concerns:
- Presentation (components/ui, styling)
- Composition (components/*)
- Data (lib/utils + hooks + query client)
- Build-time optimizations via Vite, tree-shaking, CSS purging

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "External Clients & Hosting"
        direction TB
        Browser["Browser (User)"]:::external
        CDN["CDN / Static Host (Netlify/Vercel)"]:::external
        Browser -->|"requests index.html, bundles"| CDN
        CDN -->|"serves assets"| Browser
    end

    subgraph "Build & Deployment Pipeline"
        direction TB
        GH["GitHub"]:::pipeline
        ViteBuild["Vite Build"]:::pipeline
        NetlifyCI["Netlify CI/CD"]:::pipeline
        GH --> ViteBuild --> NetlifyCI
        click ViteBuild "https://github.com/itzdineshx/pick_me_a/blob/main/vite.config.ts"
        click NetlifyCI "https://github.com/itzdineshx/pick_me_a/blob/main/postcss.config.js"
        click NetlifyCI "https://github.com/itzdineshx/pick_me_a/blob/main/eslint.config.js"
        click GH "https://github.com/itzdineshx/pick_me_a/blob/main/package.json"
        click GH "https://github.com/itzdineshx/pick_me_a/blob/main/bun.lockb"
    end

    Browser --> AppShell

    subgraph "Application Shell"
        direction TB
        HTML["index.html"]:::shell
        Main["main.tsx"]:::shell
        App["App.tsx"]:::shell
        HTML --> Main --> App
        click HTML "https://github.com/itzdineshx/pick_me_a/blob/main/index.html"
        click Main "https://github.com/itzdineshx/pick_me_a/blob/main/src/main.tsx"
        click App "https://github.com/itzdineshx/pick_me_a/blob/main/src/App.tsx"
    end

    App --> Router

    subgraph "Theming & Styles"
        direction TB
        TailwindCfg["tailwind.config.ts"]:::config
        GlobalCSS["index.css"]:::config
        TailwindCfg --> GlobalCSS
        click TailwindCfg "https://github.com/itzdineshx/pick_me_a/blob/main/tailwind.config.ts"
        click GlobalCSS "https://github.com/itzdineshx/pick_me_a/blob/main/src/index.css"
    end

    App --> TailwindCfg
    App --> GlobalCSS

    subgraph "UI Layer"
        direction TB
        Router["React Router"]:::ui
        subgraph "Pages"
            direction TB
            Home["Index.tsx"]:::ui
            NotFound["NotFound.tsx"]:::ui
            click Home "https://github.com/itzdineshx/pick_me_a/blob/main/src/pages/Index.tsx"
            click NotFound "https://github.com/itzdineshx/pick_me_a/blob/main/src/pages/NotFound.tsx"
        end
        UIPrims["UI Primitives\n(src/components/ui/)"]:::ui
        click UIPrims "https://github.com/itzdineshx/pick_me_a/tree/main/src/components/ui/"
        subgraph "Custom Hooks"
            direction TB
            UseToast["use-toast.ts"]:::ui
            UseMobile["use-mobile.tsx"]:::ui
            click UseToast "https://github.com/itzdineshx/pick_me_a/blob/main/src/hooks/use-toast.ts"
            click UseMobile "https://github.com/itzdineshx/pick_me_a/blob/main/src/hooks/use-mobile.tsx"
        end
        subgraph "Custom UI & 3D Widgets"
            direction TB
            Portal3D["Portal3D.tsx"]:::ui
            PortalCard["PortalCard.tsx"]:::ui
            EnhancedPortalCard["EnhancedPortalCard.tsx"]:::ui
            Enhanced3DPortalCard["Enhanced3DPortalCard.tsx"]:::ui
            EnhancedPortalTransition["EnhancedPortalTransition.tsx"]:::ui
            CinematicTitle["CinematicTitle.tsx"]:::ui
            PortalTransition["PortalTransition.tsx"]:::ui
            AdvancedCursorEffects["AdvancedCursorEffects.tsx"]:::ui
            SimpleCursorEffects["SimpleCursorEffects.tsx"]:::ui
            SimpleBackground["SimpleBackground.tsx"]:::ui
            UniverseBackground["UniverseBackground.tsx"]:::ui
            PortalCardIcon["PortalCardIcon.tsx"]:::ui
            PortalCardEffects["PortalCardEffects.tsx"]:::ui

            click Portal3D "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/Portal3D.tsx"
            click PortalCard "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/PortalCard.tsx"
            click EnhancedPortalCard "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/EnhancedPortalCard.tsx"
            click Enhanced3DPortalCard "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/Enhanced3DPortalCard.tsx"
            click EnhancedPortalTransition "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/EnhancedPortalTransition.tsx"
            click CinematicTitle "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/CinematicTitle.tsx"
            click PortalTransition "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/PortalTransition.tsx"
            click AdvancedCursorEffects "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/AdvancedCursorEffects.tsx"
            click SimpleCursorEffects "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/SimpleCursorEffects.tsx"
            click SimpleBackground "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/SimpleBackground.tsx"
            click UniverseBackground "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/UniverseBackground.tsx"
            click PortalCardIcon "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/PortalCardIcon.tsx"
            click PortalCardEffects "https://github.com/itzdineshx/pick_me_a/blob/main/src/components/PortalCardEffects.tsx"
        end
        Router --> Home
        Router --> NotFound
        Home --> UIPrims
        Home --> UseToast
        Home --> UseMobile
        Home --> Components
    end

    App --> QueryClientCache

    subgraph "Data Layer"
        direction TB
        QueryClientCache["QueryClient Cache"]:::data
        Utils["utils.ts"]:::data
        click Utils "https://github.com/itzdineshx/pick_me_a/blob/main/src/lib/utils.ts"
    end

    QueryClientCache -.->|"fetch"| AnimeAPI
    QueryClientCache -.->|"fetch"| MovieAPI
    QueryClientCache -.->|"fetch"| MusicAPI

    subgraph "External Content APIs"
        direction TB
        AnimeAPI["AniePick API"]:::external
        MovieAPI["CinePick API"]:::external
        MusicAPI["MeloPick API"]:::external
    end

    subgraph "3D Engine"
        direction TB
        R3F["React Three Fiber"]:::engine
        ThreeJS["Three.js"]:::engine
        Portal3D --> R3F --> ThreeJS
    end

    classDef ui fill:#cfe2ff,stroke:#2f6fad,stroke-width:1px;
    classDef data fill:#d1e7dd,stroke:#2f6fad,stroke-width:1px;
    classDef external fill:#fde2e2,stroke:#d93025,stroke-width:1px;
    classDef pipeline fill:#e2e3e5,stroke:#5f6368,stroke-width:1px;
    classDef shell fill:#f8f9fa,stroke:#202124,stroke-width:1px;
    classDef config fill:#fff3cd,stroke:#reb,stroke-width:1px;
    classDef engine fill:#e3f2fd,stroke:#1a73e8,stroke-width:1px;
```
