# bibekgithub22/ai-interview-bot architecture

> Architecture diagram of the GitHub repository bibekgithub22/ai-interview-bot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bibekgithub22/ai-interview-bot
- Repository: https://github.com/bibekgithub22/ai-interview-bot

## Overview

##### Project type and purpose
- This is a single-page frontend application built with Vite, React, TypeScript, Tailwind CSS, and shadcn-ui.
- Its purpose is to serve as an interactive UI for user flows like landing, account setup, interview sessions, results, contact support, etc.
- There is no in-repo backend; it likely consumes external APIs or serverless endpoints at runtime.

##### File structure
- Top-level files and directories:
- public/ – static assets and `index.html`
- src/ – application source code
- src/components/ – reusable UI components (shadcn-ui + custom components)
- src/pages/ – route components (Index, Account, InterviewSession, ResultsPage, etc.)
- src/hooks/ – custom React hooks (use-mobile, use-toast)
- src/lib/ – utility functions
- config files: tsconfig.*, vite.config.ts, tailwind.config.ts, postcss.config.js, eslint.config.js
- package.json / bun.lockb – dependency management
- Routing is handled client-side (likely via React Router or similar; check `src/main.tsx` and `App.tsx`).
- The build tool is Vite, which bundles and serves the app in development and produces a production build.

##### README for additional insights
- Confirms the tech stack: Vite, TypeScript, React, shadcn-ui, Tailwind CSS
- Indicates deployment via Lovable (a low-code CI/CD and hosting service), static publishing
- No mention of a custom backend in this repo

a. Main components
- Browser / Client
- UI Layer: React Components (pages, shared components, custom hooks)
- Styling: Tailwind CSS + shadcn-ui primitives
- Build & Dev Tooling: Vite, npm/Yarn, PostCSS, ESLint, TypeScript compiler
- Static Assets & Public Folder
- Deployment Pipeline: GitHub → Lovable CI/CD → Static Hosting (CDN) → Custom Domain
- External Services: Any API endpoints (e.g., Interview session API, Auth service)
b. Relationships & interactions
- User interacts with the Browser, which loads the bundled JS from the CDN
- React router directs to different pages under `src/pages`
- UI Components call hooks (`use-mobile`, `use-toast`) and utility functions in `src/lib`
- Components fetch or post data to external REST/GraphQL APIs
- The build pipeline (Vite) transforms TSX, CSS, and assets, then outputs to a `dist/` directory
- CI/CD watches the Git repo, triggers builds on push, and publishes to static hosting
c. Architectural patterns / design principles
- Component-based UI (presentational vs. container components)
- Single-Page Application with client-side routing
- Utility-first CSS (Tailwind) plus design system primitives (shadcn-ui)
- Separation of concerns: pages vs. components vs. hooks vs. utils
- Strict typing with TypeScript for safe refactoring
d. Relevant technologies / frameworks
- Vite for fast development server and bundling
- React + TypeScript (JSX/TSX)
- Tailwind CSS, PostCSS, and shadcn-ui component library
- Node.js & npm for local development, dependency management
- Lovable (CI/CD & hosting) or equivalent static-site host

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Environment
    subgraph "Developer Environment"
        IDE["IDE (VSCode, etc.)"]:::code
        NodeJS["Node.js & npm"]:::code
    end

    IDE -->|writes code| NodeJS

    %% Build & Tooling
    subgraph "Build & Tooling" 
        VITE["Vite Dev Server & HMR"]:::build
        TSCCONF["tsconfig.json / tsconfig.*.json"]:::build
        VITECFG["vite.config.ts"]:::build
        ESLINT["eslint.config.js"]:::build
        PKG["package.json / bun.lockb"]:::build
    end

    NodeJS --> VITE
    NodeJS --> TSCCONF
    NodeJS --> VITECFG
    NodeJS --> ESLINT
    NodeJS --> PKG

    %% Application Code
    subgraph "Application Code"
        subgraph "Entry & Routing"
            HTML["index.html"]:::code
            MAIN["src/main.tsx"]:::code
            APP["src/App.tsx (Router)"]:::code
        end
        HTML --> MAIN --> APP

        subgraph "UI Layer"
            subgraph "Pages"
                IDX["Index.tsx"]:::code
                LAND["LandingPage.tsx"]:::code
                ACCT["Account.tsx"]:::code
                PROF["ProfileSetup.tsx"]:::code
                INT["InterviewSession.tsx"]:::code
                RES["ResultsPage.tsx"]:::code
                CNT["ContactUs.tsx"]:::code
                NF["NotFound.tsx"]:::code
            end
            subgraph "Components"
                LAY["Layout.tsx"]:::code
                NAV["Navbar.tsx"]:::code
                FTR["Footer.tsx"]:::code
                SHOW["CompanyShowcase.tsx"]:::code
                THEME["ThemeProvider.tsx"]:::code
                TOG["theme-toggle.tsx"]:::code
                UI["ui/ (shadcn-ui primitives)"]:::code
            end
            subgraph "Hooks & Utils"
                HOOK1["use-mobile.tsx"]:::code
                HOOK2["use-toast.ts"]:::code
                UTIL["utils.ts"]:::code
            end
            subgraph "Styling"
                CSS1["src/index.css"]:::code
                CSS2["src/App.css"]:::code
                TWCFG["tailwind.config.ts"]:::build
                POSTCSS["postcss.config.js"]:::build
            end
        end

        APP --> IDX & LAND & ACCT & PROF & INT & RES & CNT & NF
        IDX --> HOOK1 & UTIL
        LAND --> UI
        ACCT --> UTIL
        PROF --> HOOK2
        INT --> UTIL
        RES --> UTIL
        CNT --> UTIL

        LAY --> NAV & FTR
        THEME --> TOG & CSS1
    end

    %% Static Assets
    subgraph "Static Assets"
        PUB["public/"]:::code
        ROBOT["robots.txt"]:::code
    end
    HTML --> PUB
    PUB --> ROBOT

    %% Deployment Pipeline
    subgraph "Deployment Pipeline"
        GH["GitHub Repo"]:::build
        LOV["Lovable CI/CD"]:::build
        CDN["CDN (Static Hosting)"]:::external
        DOM["Custom Domain"]:::external
    end

    PKG --> GH
    GH --> LOV --> CDN --> DOM

    %% External Services
    subgraph "External Services"
        API["External API Endpoints"]:::external
        AUTH["Auth Service"]:::external
    end

    INT -->|fetch data| API
    ACCT -->|auth calls| AUTH

    %% Classes
    classDef code fill:#D0E8FF,stroke:#2B6CB0,color:#2B6CB0;
    classDef build fill:#E6FFFA,stroke:#2C7A7B,color:#2C7A7B;
    classDef external fill:#FFFAE6,stroke:#D69E2E,color:#D69E2E;

    %% Click Events
    click HTML "https://github.com/bibekgithub22/ai-interview-bot/blob/main/index.html"
    click MAIN "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/main.tsx"
    click APP "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/App.tsx"
    click IDX "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/pages/Index.tsx"
    click LAND "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/pages/LandingPage.tsx"
    click ACCT "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/pages/Account.tsx"
    click PROF "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/pages/ProfileSetup.tsx"
    click INT "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/pages/InterviewSession.tsx"
    click RES "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/pages/ResultsPage.tsx"
    click CNT "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/pages/ContactUs.tsx"
    click NF "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/pages/NotFound.tsx"
    click LAY "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/components/Layout.tsx"
    click NAV "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/components/Navbar.tsx"
    click FTR "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/components/Footer.tsx"
    click SHOW "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/components/CompanyShowcase.tsx"
    click THEME "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/components/ThemeProvider.tsx"
    click TOG "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/components/theme-toggle.tsx"
    click UI "https://github.com/bibekgithub22/ai-interview-bot/tree/main/src/components/ui/"
    click HOOK1 "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/hooks/use-mobile.tsx"
    click HOOK2 "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/hooks/use-toast.ts"
    click UTIL "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/lib/utils.ts"
    click CSS1 "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/index.css"
    click CSS2 "https://github.com/bibekgithub22/ai-interview-bot/blob/main/src/App.css"
    click TWCFG "https://github.com/bibekgithub22/ai-interview-bot/blob/main/tailwind.config.ts"
    click POSTCSS "https://github.com/bibekgithub22/ai-interview-bot/blob/main/postcss.config.js"
    click VITECFG "https://github.com/bibekgithub22/ai-interview-bot/blob/main/vite.config.ts"
    click TSCCONF "https://github.com/bibekgithub22/ai-interview-bot/blob/main/tsconfig.json"
    click ESLINT "https://github.com/bibekgithub22/ai-interview-bot/blob/main/eslint.config.js"
    click PKG "https://github.com/bibekgithub22/ai-interview-bot/blob/main/package.json"
```
