How dinhtrongphuc/solution-center-for-it-helpdesk works
The product is an IT service-desk solution center: users manage technical notes, ask AI questions grounded in those notes, scan Outlook support conversations, and run lead-payment allocation. The React client calls an Express backend whose controllers dispatch to application use cases; note persistence and external integrations are replaceable adapters. The README documents RAG, provider switching, and Outlook conversation grouping, while sampled source confirms application wiring and the main controller flows. Some use-case and adapter internals were not sampled, so uncertain internal calls are omitted.
Main entry points: app.ts Server bootstrap · client.ts API client · App.tsx React application · NoteRepository.ts Note repository port
Components 34
Web client
- React application
client/src/App.tsx - Dashboard
client/src/pages/Dashboard.tsx - Note form
client/src/pages/NoteForm.tsx - Outlook scan page
client/src/pages/OutlookScanPage.tsx - Allocation page
client/src/pages/AllocationPage.tsx - API client
client/src/api/client.ts
HTTP backend
- Server bootstrap
Server/src/app.ts - Note controller
Server/src/adapters/primary/controllers/http/NoteController.ts - AI controller
Server/src/adapters/primary/controllers/http/ai/AIController.ts - Support controller
Server/src/adapters/primary/controllers/http/SupportTicketController.ts - Allocation controller
Server/src/adapters/primary/controllers/http/AllocationController.ts - Note routes
Server/src/adapters/primary/controllers/http/NoteRoutes.ts - AI routes
Server/src/adapters/primary/routes/AIRoutes.ts - Support routes
Server/src/adapters/primary/routes/SupportTicketRoutes.ts - Allocation routes
Server/src/adapters/primary/routes/AllocationRoutes.ts
Note knowledge
- Note use cases
Server/src/application/usecases - Note repository port
Server/src/ports/outbound/repositories/NoteRepository.ts - Note knowledge source
Server/src/adapters/secondary/knowledge/NoteKnowledgeSource.ts - JSON note store
Server/src/adapters/secondary/persistence/JsonNoteRepository.ts - Mongo note store
Server/src/adapters/secondary/persistence/MongGoDBRepository.ts - Memory note store
Server/src/adapters/secondary/persistence/InMemoryNoteRepository.ts
External workflows
- Groq adapter
Server/src/adapters/secondary/ai/GroqAdapter.ts - Gemini adapter
Server/src/adapters/secondary/ai/GeminiAdapter.ts - Microsoft Graph adapter
Server/src/adapters/secondary/external/GraphEmailAdapter.ts
Application core
- Ask AI use case
Server/src/application/usecases/ai/AskAIUseCase.ts - AI agent port
Server/src/ports/outbound/ai/AIAgentPort.ts - Ticket scan use case
Server/src/application/usecases/ScanSupportTicketsUseCase.ts - Automatic scanner
Server/src/application/services/AutoScanService.ts - Email scanner port
Server/src/ports/outbound/IEmailScannerPort.ts - Lead allocation use case
Server/src/application/usecases/AllocateLeadPayments.ts - CRM port
Server/src/ports/outbound/repositories/ExternalCrmPort.ts
Other components
- Service desk user
- AI provider
- Outlook mail
Connections 47
- Service desk user → React application: uses
- React application → Dashboard: routes to
- React application → Note form: routes to
- React application → Outlook scan page: routes to
- React application → Allocation page: routes to
- Dashboard → API client: requests notes and AI
- Note form → API client: sends note changes
- Outlook scan page → API client: requests scans
- Allocation page → API client: requests allocation
- API client → Note routes: HTTP requests
- API client → AI routes: HTTP requests
- API client → Support routes: HTTP requests
- API client → Allocation routes: HTTP requests
- Server bootstrap → Note routes: registers
- Server bootstrap → AI routes: registers
- Server bootstrap → Support routes: registers
- Server bootstrap → Allocation routes: registers
- Server bootstrap → JSON note store: selects by config
- Server bootstrap → Mongo note store: selects by config
- Server bootstrap → Memory note store: selects by config
- Server bootstrap → Groq adapter: selects by config
- Server bootstrap → Gemini adapter: selects by config
- Note routes → Note controller: dispatches
- AI routes → AI controller: dispatches
- Support routes → Support controller: dispatches
- Allocation routes → Allocation controller: dispatches
- Note controller → Note use cases: executes
- Note use cases → Note repository port: reads and writes
- Note repository port → JSON note store: implemented by
- Note repository port → Mongo note store: implemented by
- Note repository port → Memory note store: implemented by
- AI controller → Ask AI use case: executes
- Ask AI use case → Note knowledge source: retrieves context
- Note knowledge source → Note repository port: reads notes
- Ask AI use case → AI agent port: requests generation
- AI agent port → Groq adapter: implemented by
- AI agent port → Gemini adapter: implemented by
- Groq adapter → AI provider: generates answer
- Gemini adapter → AI provider: generates answer
- Support controller → Ticket scan use case: executes scan
- Support controller → Automatic scanner: controls schedule
- Automatic scanner → Ticket scan use case: runs periodically
- Ticket scan use case → Email scanner port: requests messages
- Email scanner port → Microsoft Graph adapter: implemented by
- Microsoft Graph adapter → Outlook mail: searches conversations
- Allocation controller → Lead allocation use case: executes
- Lead allocation use case → CRM port: requests CRM operations