How lakshman1419/hrassistant works
This repository is an HR assistant with an Angular client and ASP.NET API. Users log in, then ask HR questions; the API delegates to an agent that can retrieve employee details, leave balances, or policy excerpts before returning an answer. Policy PDFs are extracted, chunked, and indexed at startup for semantic search. The graph includes the documented authentication and policy-search wiring; some service internals and the client-to-chat API connection were not shown, so uncertain links are omitted or marked unverified.
Main entry points: Program.cs Application startup · HrToolRegistry.cs Tool registry · auth.service.ts Client authentication · AuthController.cs Login API
Components 23
Angular client
- Login screen
ClientApp/src/app/components/login/login.component.ts - Client authentication
ClientApp/src/app/services/auth.service.ts - Route guard
ClientApp/src/app/auth.guard.ts - Assistant screen
ClientApp/src/app/components/hr-assistant/hr-assistant.component.ts - HR assistant client service
ClientApp/src/app/services/hr-assistant.service.ts
API and authentication
- Login API
HrAssistant/Controllers/AuthController.cs - Credential authentication
HrAssistant/Services/InMemoryUserAuthenticationService.cs - Authentication configuration
HrAssistant/Models/AuthenticationOptions.cs - Application startup
HrAssistant/Program.cs
HR assistant
- HR API
HrAssistant/Controllers/HrController.cs - HR agent
HrAssistant/Agents/HrAgent.cs - Tool registry
HrAssistant/Services/HrToolRegistry.cs - Employee lookup tool
HrAssistant/Tools/EmployeeTools.cs - Leave balance tool
HrAssistant/Tools/LeaveTools.cs - Employee service
HrAssistant/Services/EmployeeService.cs - Leave service
HrAssistant/Services/LeaveService.cs
Policy retrieval
- Policy search tool
HrAssistant/Tools/PolicyTools.cs - PDF extraction
HrAssistant/Services/PdfService.cs - Text chunking
HrAssistant/Services/TextChunkService.cs - Policy vector store
HrAssistant/Services/VectorStoreService.cs - Embedding client
HrAssistant/Services/NvidiaEmbeddingService.cs
Other components
- HR user
- NVIDIA API
Connections 23
- HR user → Login screen: enters credentials
- Login screen → Client authentication: submits login
ClientApp/src/app/components/login/login.component.ts - Client authentication → Login API: posts credentials
ClientApp/src/app/services/auth.service.ts - Login API → Credential authentication: authenticates
HrAssistant/Controllers/AuthController.cs - Credential authentication → Authentication configuration: reads users
HrAssistant/Services/InMemoryUserAuthenticationService.cs - Client authentication → Route guard: provides session
ClientApp/src/app/auth.guard.ts - HR user → Assistant screen: asks HR question
- Assistant screen → HR assistant client service: uses service
ClientApp/src/app/components/hr-assistant/hr-assistant.component.ts - HR assistant client service → HR API: sends question
- HR API → HR agent: delegates question
HrAssistant/Controllers/HrController.cs - HR agent → Tool registry: dispatches tools
HrAssistant/Agents/HrAgent.cs - Tool registry → Employee lookup tool: registers
HrAssistant/Services/HrToolRegistry.cs - Tool registry → Leave balance tool: registers
HrAssistant/Services/HrToolRegistry.cs - Tool registry → Policy search tool: registers
HrAssistant/Services/HrToolRegistry.cs - Leave balance tool → Leave service: gets balance
HrAssistant/Tools/LeaveTools.cs - Policy search tool → Policy vector store: searches policies
HrAssistant/Tools/PolicyTools.cs - Application startup → PDF extraction: extracts PDFs
HrAssistant/Program.cs - Application startup → Text chunking: splits text
HrAssistant/Program.cs - Application startup → Policy vector store: indexes chunks
HrAssistant/Program.cs - Policy vector store → Embedding client: creates vectors
HrAssistant/Services/VectorStoreService.cs - Embedding client → NVIDIA API: requests embeddings
HrAssistant/Services/NvidiaEmbeddingService.cs - Application startup → Login API: maps controllers
HrAssistant/Program.cs - Application startup → HR agent: registers agent
HrAssistant/Program.cs