How prohirenetworks/ai-engineer-workshop works
This is a customer-support chat application: users submit a message, the backend validates it, classifies it with a structured LLM response, estimates tokens, loads recent conversation history, generates a Markdown answer, and saves the exchange. The React app also supports saved-chat navigation, connection status, and intent/risk insights. Backend call ownership is visible in the API route; several frontend component relationships and endpoint contracts are supported by the source index and README rather than full excerpts.
Main entry points: main.py API routes · Chat.jsx Chat workspace · MessageList.jsx Message display · llm_service.py Intent classifier
Components 22
React experience
- App routing
frontend-react/src/App.jsx - Landing page
frontend-react/src/pages/Landing.jsx - Chat workspace
frontend-react/src/pages/Chat.jsx - API client
frontend-react/src/lib/api.js - Message display
frontend-react/src/components/MessageList.jsx - Intent insights
frontend-react/src/components/InsightsPanel.jsx - Chat navigation
frontend-react/src/components/Sidebar.jsx - Copy answer
frontend-react/src/components/CopyButton.jsx - Markdown rendering
frontend-react/src/components/Markdown.jsx - Theme control
frontend-react/src/components/ThemeToggle.jsx - Intent and time labels
frontend-react/src/lib
API orchestration
- API routes
backend/app/main.py - Request validation
backend/app/schemas/ingestion.py - Assistant result
backend/app/schemas/assistant.py - Runtime settings
backend/app/config.py
Message intelligence
- Intent classifier
backend/app/services/llm_service.py - Token estimate
backend/app/utils/token_counter.py - Response generation
backend/app/services/response_service.py
Conversation memory
- Conversation storage
backend/app/services/database_service.py
Other components
- Chat user
- Groq LLM
- SQLite database
Connections 28
- Chat user → App routing: opens
README.md - App routing → Landing page: routes to
frontend-react/src/App.jsx - App routing → Chat workspace: routes to
frontend-react/src/App.jsx - Chat workspace → API client: requests through
frontend-react/src/pages/Chat.jsx - Chat workspace → Message display: renders
frontend-react/src/pages/Chat.jsx - Chat workspace → Intent insights: renders
frontend-react/src/pages/Chat.jsx - Chat workspace → Chat navigation: renders
frontend-react/src/pages/Chat.jsx - API client → API routes: calls endpoints
README.md - API routes → Request validation: validates input
backend/app/main.py - API routes → Intent classifier: classifies message
backend/app/main.py - Intent classifier → Request validation: returns validated result
backend/app/services/llm_service.py - API routes → Token estimate: estimates tokens
backend/app/main.py - API routes → Conversation storage: loads history
backend/app/main.py - API routes → Response generation: generates reply
backend/app/main.py - API routes → Conversation storage: saves messages
backend/app/main.py - API routes → Assistant result: returns response model
backend/app/main.py - Intent classifier → Groq LLM: calls
backend/app/services/llm_service.py - Response generation → Groq LLM: calls
backend/app/services/response_service.py - Conversation storage → SQLite database: reads and writes
backend/app/services/database_service.py - Intent classifier → Runtime settings: reads credentials
backend/app/services/llm_service.py - Response generation → Runtime settings: reads credentials
backend/app/services/response_service.py - Conversation storage → Runtime settings: reads database path
backend/app/services/database_service.py - Message display → Copy answer: renders
frontend-react/src/components/MessageList.jsx - Message display → Markdown rendering: renders
frontend-react/src/components/MessageList.jsx - Message display → Intent and time labels: formats labels
frontend-react/src/components/MessageList.jsx - Intent insights → Intent and time labels: uses intent labels
frontend-react/src/components/InsightsPanel.jsx - Chat navigation → Theme control: renders
frontend-react/src/components/Sidebar.jsx - Landing page → Theme control: renders
frontend-react/src/pages/Landing.jsx