# akshayap1101/ai-interview-pro architecture

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

- Interactive diagram: https://gitdiagram.com/akshayap1101/ai-interview-pro
- Repository: https://github.com/akshayap1101/ai-interview-pro

## Overview

##### Project type and purpose
- From the README and file-tree, this is a lightweight full-stack AI platform (“AI-Interview-Pro’n”) designed to help users prepare for interviews.
- The “client” folder contains a UI overlay component (Overlay.js) that likely injects interview prompts or hints into the user’s browser or application.
- The “server” folder contains an agent component (agent.js) that orchestrates calls to one or more AI/LLM services to generate or evaluate interview questions and answers.

##### File structure
- Top level:
- README.md
- client/Overlay.js
- server/agent.js
- There are exactly two runtime components:
- A front-end overlay that presents/intercepts interview content
- A back-end “agent” microservice that handles AI logic
- No DB or persistent-storage directory is present; all state is likely in memory or ephemeral.
- No build scripts or config files are shown, so we assume a simple npm/node setup for both client and server.

##### Key insights from README
- “An Agentic AI platform for interview prep” implies:
- The server “agent” will manage prompts, context, and interaction loops with the AI.
- The client “Overlay” will capture user actions (e.g. question display) and render suggestions, follow-ups, or feedback.

a. Main components
- Client Overlay (UI layer)
- Server Agent (business logic / AI orchestrator)
- External AI/LLM Service(s) (e.g. OpenAI, Anthropic, local model endpoint)
b. Relationships / Data flow
1. User interacts with the Interview UI → Overlay.js intercepts event
2. Overlay.js → REST/WebSocket → Server.agent.js
3. agent.js → AI/LLM API (send user prompt, context)
4. LLM → agent.js (response)
5. agent.js → Overlay.js (processed suggestions or follow-ups)
6. Overlay.js → Renders suggestions back to user
c. Architectural patterns
- Two-tier client-server (thin client, stateless backend)
- Agent pattern: the server encapsulates AI-specific logic and retry/temperature tuning
- Overlay injection pattern on the client for non-intrusive UI enhancement
d. Key technologies
- JavaScript/Node.js on both client and server
- REST or WebSocket for communication
- External AI API (OpenAI, Azure OpenAI, etc.)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Actors and External Services
    User["User"]:::actor

    %% Client Side
    subgraph "Client Side"
        Overlay["Client Overlay"]:::inHouse
    end

    %% Server Side
    subgraph "Server Side"
        Agent["AI Agent Service"]:::inHouse
        subgraph "Agent Components"
            PromptMgr["Prompt Manager"]:::subcomp
            RetryLogic["Retry Logic"]:::subcomp
            Parser["Response Parser"]:::subcomp
        end
    end

    %% External AI Service
    ExternalLLM["External LLM API"]:::external

    %% Data Flows
    User -->|"interacts"| Overlay
    Overlay -->|"HTTP POST: prompt"| Agent
    Agent -->|"manages prompts"| PromptMgr
    PromptMgr -->|"send prompt"| ExternalLLM
    ExternalLLM -->|"response data"| Parser
    Parser -->|"parsed result"| Agent
    Agent -->|"HTTP Response: suggestions"| Overlay
    Overlay -->|"renders suggestions"| User

    %% Click Events
    click Overlay "https://github.com/akshayap1101/ai-interview-pro/blob/main/client/Overlay.js"
    click Agent "https://github.com/akshayap1101/ai-interview-pro/blob/main/server/agent.js"

    %% Styles
    classDef inHouse fill:#cfe2f3,stroke:#036,stroke-width:1px
    classDef external fill:#f9cb9c,stroke:#b45f06,stroke-width:1px
    classDef subcomp fill:#d9ead3,stroke:#6aa84f,stroke-width:1px
    classDef actor fill:#ffffff,stroke:#666,stroke-width:1px,stroke-dasharray: 2 2
```
