How agmyyy/front-biotech-projectweb works
This is a biotechnology question-and-answer web platform: users authenticate, submit searches in chat, receive structured answers, manage conversation sessions, and rate responses. The frontend provides the dashboard, progressive answer presentation, and collapsible history; the NestJS API handles authentication, query orchestration, mock multi-agent answers, sessions, and feedback over in-memory state. Shared Zod schemas define request and response shapes. The README documents WebSocket infrastructure, but sampled evidence does not establish its runtime connection; the agent system and storage are explicitly mock implementations.
Main entry points: dashboard.tsx Chat dashboard · queries.service.ts Query orchestration · api-client.ts HTTP client · mock.service.ts In-memory state
Components 26
Web application
- Login and signup
frontend/src/app/login/page.tsx - Chat dashboard
frontend/src/components/dashboard/dashboard.tsx - Search control
frontend/src/hooks/control/use-search.ts - Answer display
frontend/src/components/chat/search-result.tsx - Typewriter effect
frontend/src/hooks/use-typewriter.ts - Session sidebar
frontend/src/components/sidebar/chat-list.tsx - Star feedback
frontend/src/components/feedback/feedback-rating.tsx - Auth client
frontend/src/services/auth-service.ts - Search client
frontend/src/services/search-service.ts - Chat client
frontend/src/services/chat-service.ts - HTTP client
frontend/src/services/api-client.ts
API and domain
- Auth endpoints
backend/src/auth/auth.controller.ts - JWT authentication
backend/src/auth/auth.service.ts - Query endpoints
backend/src/queries/queries.controller.ts - Session endpoints
backend/src/queries/sessions.controller.ts - Query orchestration
backend/src/queries/queries.service.ts - Mock answer engine
backend/src/mas/mas.service.ts - Feedback endpoints
backend/src/feedback/feedback.controller.ts - Feedback logic
backend/src/feedback/feedback.service.ts - WebSocket gateway
backend/src/events/events.gateway.ts
Mock state
- In-memory state
backend/src/database/mock.service.ts
Shared contracts
- Query schemas
shared/schemas/query.schema.ts - Auth schemas
shared/schemas/auth.schema.ts - Feedback schema
shared/schemas/feedback.schema.ts
Other components
- User
- NestJS API
Connections 31
- User → Login and signup: registers or logs in
README.md - User → Chat dashboard: asks questions
README.md - Chat dashboard → Search control: uses search
- Search control → Search client: submits query
- Search client → HTTP client: calls HTTP
frontend/src/services/search-service.ts - Login and signup → Auth client: uses auth
README.md - Auth client → HTTP client: calls HTTP
frontend/src/services/auth-service.ts - HTTP client → NestJS API: sends requests
frontend/src/services/api-client.ts - NestJS API → Auth endpoints: routes auth
README.md - NestJS API → Query endpoints: routes queries
README.md - NestJS API → Session endpoints: routes sessions
README.md - NestJS API → Feedback endpoints: routes feedback
README.md - Auth endpoints → JWT authentication: delegates to
backend/src/auth/auth.controller.ts - JWT authentication → In-memory state: reads and writes
backend/src/auth/auth.service.ts - Query endpoints → Query orchestration: delegates to
backend/src/queries/queries.controller.ts - Query orchestration → In-memory state: reads and writes
backend/src/queries/queries.service.ts - Query orchestration → Mock answer engine: processes query
backend/src/queries/queries.service.ts - Query orchestration → WebSocket gateway: dispatches events
backend/src/queries/queries.service.ts - Session endpoints → In-memory state: manages sessions
backend/src/queries/sessions.controller.ts - Feedback endpoints → Feedback logic: delegates to
backend/src/feedback/feedback.controller.ts - Feedback logic → In-memory state: reads and writes
backend/src/feedback/feedback.service.ts - Query endpoints → Query schemas: validates with
backend/src/queries/queries.controller.ts - Session endpoints → Query schemas: validates with
backend/src/queries/sessions.controller.ts - Auth endpoints → Auth schemas: validates with
backend/src/auth/auth.controller.ts - Feedback endpoints → Feedback schema: validates with
backend/src/feedback/feedback.controller.ts - Chat dashboard → Answer display: shows results
README.md - Answer display → Typewriter effect: animates text
README.md - Chat dashboard → Session sidebar: shows history
README.md - Chat dashboard → Chat client: manages chat
- Chat dashboard → Star feedback: offers rating
README.md - Chat client → HTTP client: calls HTTP