# jainvasu1/placement-bot architecture

> Architecture diagram of the GitHub repository jainvasu1/placement-bot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jainvasu1/placement-bot
- Repository: https://github.com/jainvasu1/placement-bot

## Overview

PlacementBot is a React placement-advice chat app. Students enter through the landing CTA, then send typed or suggested prompts; App manages conversation state, sends requests to Groq’s Llama model, and displays replies as Markdown. Chat history persists in browser localStorage and can be reset. The map preserves the main UI, prompt/configuration, chat rendering, and persistence stages. Source excerpts show App’s calls and rendering relationships; README documents persistence and Groq/model capabilities. No separate server or domain-specific backend is present.

Main entry points: [`src/App.js`](https://github.com/jainvasu1/placement-bot/blob/main/src/App.js) (App state and orchestration), [`src/components/ChatPanel.js`](https://github.com/jainvasu1/placement-bot/blob/main/src/components/ChatPanel.js) (Chat interface), [`src/components/LandingPage.js`](https://github.com/jainvasu1/placement-bot/blob/main/src/components/LandingPage.js) (Landing and CTA), [`src/config.js`](https://github.com/jainvasu1/placement-bot/blob/main/src/config.js) (Prompts and suggestions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Student experience"]
  node_landing["Landing and CTA<br/>[LandingPage.js]"]
  node_chat["Chat interface<br/>[ChatPanel.js]"]
  node_message["Message rendering<br/>[ChatMessage.js]"]
end

subgraph group_conversation["Conversation runtime"]
  node_app["App state and orchestration<br/>[App.js]"]
  node_browser_storage[("Browser localStorage")]
end

subgraph group_guidance["Placement guidance"]
  node_config["Prompts and suggestions<br/>[config.js]"]
  node_groq{{"Groq chat completions"}}
end

node_student(("Student"))

node_student -->|"opens app"| node_landing
node_landing -->|"starts chat"| node_app
node_app -->|"renders before chat"| node_landing
node_app -->|"renders chat"| node_chat
node_chat -->|"sends prompts"| node_app
node_chat -->|"renders messages"| node_message
node_chat -->|"loads suggestions"| node_config
node_app -->|"loads prompt and model"| node_config
node_app -->|"reads and writes history"| node_browser_storage
node_app -->|"posts chat request"| node_groq
node_groq -->|"returns response"| node_app

click node_landing "https://github.com/jainvasu1/placement-bot/blob/main/src/components/LandingPage.js"
click node_app "https://github.com/jainvasu1/placement-bot/blob/main/src/App.js"
click node_chat "https://github.com/jainvasu1/placement-bot/blob/main/src/components/ChatPanel.js"
click node_message "https://github.com/jainvasu1/placement-bot/blob/main/src/components/ChatMessage.js"
click node_config "https://github.com/jainvasu1/placement-bot/blob/main/src/config.js"

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_landing,node_chat,node_message toneBlue
class node_app,node_browser_storage toneAmber
class node_config,node_groq toneMint
class node_student toneIndigo
```

## Components

### Student experience

- [Landing and CTA](https://github.com/jainvasu1/placement-bot/blob/main/src/components/LandingPage.js): `src/components/LandingPage.js`
- [Chat interface](https://github.com/jainvasu1/placement-bot/blob/main/src/components/ChatPanel.js): `src/components/ChatPanel.js`
- [Message rendering](https://github.com/jainvasu1/placement-bot/blob/main/src/components/ChatMessage.js): `src/components/ChatMessage.js`

### Conversation runtime

- [App state and orchestration](https://github.com/jainvasu1/placement-bot/blob/main/src/App.js): `src/App.js`
- **Browser localStorage**

### Placement guidance

- [Prompts and suggestions](https://github.com/jainvasu1/placement-bot/blob/main/src/config.js): `src/config.js`
- **Groq chat completions**

### Other components

- **Student**

## Connections

- Student → Landing and CTA: opens app (evidence: `README.md`)
- Landing and CTA → App state and orchestration: starts chat (evidence: `src/App.js`)
- App state and orchestration → Landing and CTA: renders before chat (evidence: `src/App.js`)
- App state and orchestration → Chat interface: renders chat (evidence: `src/App.js`)
- Chat interface → App state and orchestration: sends prompts (evidence: `src/App.js`)
- Chat interface → Message rendering: renders messages (evidence: `src/components/ChatPanel.js`)
- Chat interface → Prompts and suggestions: loads suggestions (evidence: `src/components/ChatPanel.js`)
- App state and orchestration → Prompts and suggestions: loads prompt and model (evidence: `src/App.js`)
- App state and orchestration → Browser localStorage: reads and writes history (evidence: `src/App.js`)
- App state and orchestration → Groq chat completions: posts chat request (evidence: `src/App.js`)
- Groq chat completions → App state and orchestration: returns response (evidence: `src/App.js`)
