How narayan-bhattarai/proteinchatbot works
This repository combines a Proteomics Expert Chatbot with a .NET API and Angular client. The main user workflow is to enter a prompt or protein identifier, reach the chat API, and receive an Ollama response or UniProt-derived protein details. The tree also contains a substantial Clean Architecture todo-list API, represented as a separate capability. Edges reflect the sampled ChatController and indexed source references; frontend-to-API wiring is not shown in the excerpts, so that connection is marked unverified.
Main entry points: ChatController.cs Chat endpoints · IApplicationDbContext.cs Database interface · ExportTodosQuery.cs CSV export · ApplicationDbContext.cs Application database
Components 21
Angular client
- Chat interface
src/WebUI/ClientApp/src/app/app.component.ts - API client
src/WebUI/ClientApp/src/app/web-api-client.ts
Web API
- Chat endpoints
src/WebUI/Controllers/ChatController.cs - Todo item endpoints
src/WebUI/Controllers/TodoItemsController.cs - Todo list endpoints
src/WebUI/Controllers/TodoListsController.cs - Weather endpoint
src/WebUI/Controllers/WeatherForecastController.cs
Proteomics integration
- UniProt
- Ollama model
- Protein response models
src/Domain/Models/ProteinResponse.cs
Todo application
- Item pagination
src/Application/TodoItems/Queries/GetTodoItemsWithPagination/GetTodoItemsWithPaginationQuery.cs - List queries
src/Application/TodoLists/Queries/GetTodos/GetTodosQuery.cs - CSV export
src/Application/TodoLists/Queries/ExportTodos/ExportTodosQuery.cs - Item event handlers
src/Application/TodoItems/EventHandlers - Forecast query
src/Application/WeatherForecasts/Queries/GetWeatherForecasts/GetWeatherForecastsQuery.cs
Domain and persistence
- Todo entities
src/Domain/Entities - Database interface
src/Application/Common/Interfaces/IApplicationDbContext.cs - Application database
src/Infrastructure/Persistence/ApplicationDbContext.cs - CSV builder
src/Infrastructure/Files/CsvFileBuilder.cs - Domain event service
src/Infrastructure/Services/DomainEventService.cs - Identity service
src/Infrastructure/Identity/IdentityService.cs
Other components
- User
Connections 18
- User → Chat interface: uses
- Chat interface → API client: uses
src/WebUI/ClientApp/src/app/app.component.ts - API client → Chat endpoints: requests
- Chat endpoints → Ollama model: posts prompt
src/WebUI/Controllers/ChatController.cs - Chat endpoints → UniProt: fetches protein
src/WebUI/Controllers/ChatController.cs - Chat endpoints → Protein response models: deserializes
src/WebUI/Controllers/ChatController.cs - Todo item endpoints → Item pagination: dispatches
src/WebUI/Controllers/TodoItemsController.cs - Todo list endpoints → List queries: dispatches
src/WebUI/Controllers/TodoListsController.cs - Todo list endpoints → CSV export: dispatches
src/WebUI/Controllers/TodoListsController.cs - Item pagination → Database interface: queries
src/Application/TodoItems/Queries/GetTodoItemsWithPagination/GetTodoItemsWithPaginationQuery.cs - List queries → Database interface: queries
src/Application/TodoLists/Queries/GetTodos/GetTodosQuery.cs - CSV export → Database interface: reads
src/Application/TodoLists/Queries/ExportTodos/ExportTodosQuery.cs - CSV export → CSV builder: builds file
src/Application/TodoLists/Queries/ExportTodos/ExportTodosQuery.cs - Database interface → Application database: implemented by
src/Infrastructure/Persistence/ApplicationDbContext.cs - Application database → Todo entities: stores
src/Infrastructure/Persistence/ApplicationDbContext.cs - Application database → Domain event service: publishes events
src/Infrastructure/Persistence/ApplicationDbContext.cs - Todo entities → Item event handlers: raises events
src/Domain/Entities/TodoItem.cs - Weather endpoint → Forecast query: dispatches