# cesar0202/cv-coach-ai architecture

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

- Interactive diagram: https://gitdiagram.com/cesar0202/cv-coach-ai
- Repository: https://github.com/cesar0202/cv-coach-ai

## Overview

#### Purpose and Runtime
CV Coach AI is a client-side React application for CV evaluation and AI-led interview simulation. It runs as a Vite single-page application; the browser handles CV input, UI state, and Gemini API requests. No backend, database, or server-side persistence appears in the repository.

Entry points:
- `index.html` mounts the SPA.
- `src/main.jsx` initializes React.
- `src/App.jsx` composes the application experience.

#### Application Shell and Navigation
`src/App.jsx` is the top-level orchestration boundary, assembling page sections and likely owning cross-section state or interactions. The user-facing shell is separated into:
- `src/components/Navbar.jsx`
- `src/components/Hero.jsx`
- `src/components/Footer.jsx`

This structure indicates a landing-page-style flow rather than route-based application modules.

#### CV Input and Analysis Boundary
`src/components/UploadSection.jsx` is the primary functional entry point for candidate data. Per the README, it supports drag-and-drop PDF/Word upload and direct CV text entry.

The intended data flow is:
1. User supplies a document or CV text in `src/components/UploadSection.jsx`.
2. Content remains in browser memory.
3. The application sends relevant text to Google Gemini for scoring, feedback, strengths, improvement areas, and keyword recommendations.
4. Results are rendered in the same client session, without an external application database.

File parsing, Gemini request construction, and result display are not separately visible in the supplied tree, so they are likely colocated in `src/components/UploadSection.jsx` and/or `src/App.jsx`.

#### Interview Experience
The README describes a live interview chat that adapts questions to CV experience and projects. No dedicated interview component is present in the tree; its implementation is therefore likely embedded in:
- `src/components/UploadSection.jsx`
- `src/App.jsx`

Gemini (`gemini-2.5-flash`) is the external intelligence boundary. The browser uses `VITE_GEMINI_API_KEY`, making API-key exposure and client-side request handling an important architectural constraint.

#### Informational and Engagement Components
Supporting sections explain the product and provide external/social navigation:
- `src/components/HowItWorks.jsx`
- `src/components/SocialSidebar.jsx`
- `src/components/Hero.jsx`

These components should remain presentation-oriented and should not own CV analysis or interview-session logic.

#### Styling and Build Infrastructure
Styling is split between application CSS and Tailwind/PostCSS configuration:
- `src/index.css`
- `src/App.css`
- `tailwind.config.js`

Vite provides development serving and production bundling:
- `vite.config.js`
- `package.json`

The production artifact is a static frontend that requires browser network access to Google Gemini; there is no repository evidence of deployment infrastructure, authentication, API proxying, or persistent storage.

#### Primary Control Flow
The expected user path is: landing/navigation → explanation of workflow → CV upload or text entry → Gemini-powered analysis → optional contextual interview interaction → footer/social exits. `src/App.jsx` defines the composition boundary, while `src/components/UploadSection.jsx` is the core workflow boundary and Gemini is the sole material external service.

Main entry points: [`src/App.jsx`](https://github.com/cesar0202/cv-coach-ai/blob/main/src/App.jsx) (Application shell), [`src/components/UploadSection.jsx`](https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/UploadSection.jsx) (CV workflow), [`src/components/Navbar.jsx`](https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/Navbar.jsx) (Navigation), [`vite.config.js`](https://github.com/cesar0202/cv-coach-ai/blob/main/vite.config.js) (Vite build)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser SPA"]
  node_index_html["HTML mount<br/>SPA entry<br/>[index.html]"]
  node_main["React bootstrap<br/>React entry<br/>[main.jsx]"]
  node_app["Application shell<br/>React orchestrator<br/>[App.jsx]"]
  node_upload["CV workflow<br/>React component<br/>[UploadSection.jsx]"]
  node_browser_memory["Session memory<br/>browser state"]
  node_api_key["Gemini API key<br/>Vite client env"]
end

subgraph group_ui["Experience Sections"]
  node_navbar["Navigation<br/>React component<br/>[Navbar.jsx]"]
  node_hero["Hero<br/>React component<br/>[Hero.jsx]"]
  node_how_it_works["How it works<br/>React component<br/>[HowItWorks.jsx]"]
  node_footer["Footer<br/>React component<br/>[Footer.jsx]"]
  node_social["Social sidebar<br/>React component<br/>[SocialSidebar.jsx]"]
end

subgraph group_platform["Build &amp; Delivery"]
  node_styles["Application styles<br/>CSS<br/>[index.css]"]
  node_app_styles["Shell styles<br/>CSS<br/>[App.css]"]
  node_tailwind["Tailwind config<br/>style config<br/>[tailwind.config.js]"]
  node_vite["Vite build<br/>bundler<br/>[vite.config.js]"]
  node_package["Package manifest<br/>project manifest<br/>[package.json]"]
  node_static_bundle["Static frontend<br/>production artifact"]
end

node_gemini{{"Google Gemini<br/>external AI API"}}

node_index_html -->|"loads"| node_main
node_main -->|"renders"| node_app
node_app -->|"composes"| node_navbar
node_app -->|"composes"| node_hero
node_app -->|"composes"| node_how_it_works
node_app -->|"hosts core flow"| node_upload
node_app -->|"composes"| node_footer
node_app -->|"composes"| node_social
node_upload -->|"stores CV and session results"| node_browser_memory
node_upload -->|"sends CV context; receives analysis and questions"| node_gemini
node_api_key -.->|"authorizes browser request"| node_gemini
node_hero -.->|"directs candidate to workflow"| node_upload
node_navbar -.->|"navigates to"| node_how_it_works
node_navbar -.->|"navigates to"| node_upload
node_social -.->|"supports external exits"| node_footer
node_package -->|"defines tooling"| node_vite
node_vite -->|"bundles"| node_static_bundle
node_tailwind -->|"configures styling build"| node_vite
node_styles -.->|"styles"| node_app
node_app_styles -.->|"styles"| node_app
node_static_bundle -->|"delivers"| node_index_html

click node_index_html "https://github.com/cesar0202/cv-coach-ai/blob/main/index.html"
click node_main "https://github.com/cesar0202/cv-coach-ai/blob/main/src/main.jsx"
click node_app "https://github.com/cesar0202/cv-coach-ai/blob/main/src/App.jsx"
click node_navbar "https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/Navbar.jsx"
click node_hero "https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/Hero.jsx"
click node_how_it_works "https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/HowItWorks.jsx"
click node_upload "https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/UploadSection.jsx"
click node_footer "https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/Footer.jsx"
click node_social "https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/SocialSidebar.jsx"
click node_styles "https://github.com/cesar0202/cv-coach-ai/blob/main/src/index.css"
click node_app_styles "https://github.com/cesar0202/cv-coach-ai/blob/main/src/App.css"
click node_tailwind "https://github.com/cesar0202/cv-coach-ai/blob/main/tailwind.config.js"
click node_vite "https://github.com/cesar0202/cv-coach-ai/blob/main/vite.config.js"
click node_package "https://github.com/cesar0202/cv-coach-ai/blob/main/package.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_index_html,node_main,node_app,node_upload,node_browser_memory,node_api_key toneBlue
class node_navbar,node_hero,node_how_it_works,node_footer,node_social toneAmber
class node_styles,node_app_styles,node_tailwind,node_vite,node_package,node_static_bundle toneMint
class node_gemini toneNeutral
```

## Components

### Browser SPA

All application state and AI requests run client-side.

- [HTML mount](https://github.com/cesar0202/cv-coach-ai/blob/main/index.html): SPA entry · `index.html`
- [React bootstrap](https://github.com/cesar0202/cv-coach-ai/blob/main/src/main.jsx): React entry · `src/main.jsx`
- [Application shell](https://github.com/cesar0202/cv-coach-ai/blob/main/src/App.jsx): React orchestrator · Composes the experience and coordinates core interactions. · `src/App.jsx`
- [CV workflow](https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/UploadSection.jsx): React component · Accepts CV files or text and likely hosts analysis, results, and interview chat. · `src/components/UploadSection.jsx`
- **Session memory**: browser state · CV content and results remain in the active browser session.
- **Gemini API key**: Vite client env · VITE_GEMINI_API_KEY is exposed to browser-side requests.

### Experience Sections

Presentation and engagement components.

- [Navigation](https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/Navbar.jsx): React component · `src/components/Navbar.jsx`
- [Hero](https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/Hero.jsx): React component · `src/components/Hero.jsx`
- [How it works](https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/HowItWorks.jsx): React component · `src/components/HowItWorks.jsx`
- [Footer](https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/Footer.jsx): React component · `src/components/Footer.jsx`
- [Social sidebar](https://github.com/cesar0202/cv-coach-ai/blob/main/src/components/SocialSidebar.jsx): React component · Provides external social navigation. · `src/components/SocialSidebar.jsx`

### Build & Delivery

Static Vite frontend tooling.

- [Application styles](https://github.com/cesar0202/cv-coach-ai/blob/main/src/index.css): CSS · `src/index.css`
- [Shell styles](https://github.com/cesar0202/cv-coach-ai/blob/main/src/App.css): CSS · `src/App.css`
- [Tailwind config](https://github.com/cesar0202/cv-coach-ai/blob/main/tailwind.config.js): style config · `tailwind.config.js`
- [Vite build](https://github.com/cesar0202/cv-coach-ai/blob/main/vite.config.js): bundler · Serves development and produces the static production bundle. · `vite.config.js`
- [Package manifest](https://github.com/cesar0202/cv-coach-ai/blob/main/package.json): project manifest · `package.json`
- **Static frontend**: production artifact · Requires browser network access to Gemini; no backend or persistence is present.

### Other components

- **Google Gemini**: external AI API · gemini-2.5-flash provides CV analysis and contextual interview responses.

## Connections

- HTML mount → React bootstrap: loads
- React bootstrap → Application shell: renders
- Application shell → Navigation: composes
- Application shell → Hero: composes
- Application shell → How it works: composes
- Application shell → CV workflow: hosts core flow
- Application shell → Footer: composes
- Application shell → Social sidebar: composes
- CV workflow → Session memory: stores CV and session results
- CV workflow → Google Gemini: sends CV context; receives analysis and questions
- Gemini API key → Google Gemini: authorizes browser request
- Hero → CV workflow: directs candidate to workflow
- Navigation → How it works: navigates to
- Navigation → CV workflow: navigates to
- Social sidebar → Footer: supports external exits
- Package manifest → Vite build: defines tooling
- Vite build → Static frontend: bundles
- Tailwind config → Vite build: configures styling build
- Application styles → Application shell: styles
- Shell styles → Application shell: styles
- Static frontend → HTML mount: delivers
