How ngynduc/forenotes works
Forenotes is a DFIR case notebook: responders manage incident evidence and work items, investigate relationships and MITRE ATT&CK mappings, then generate and export reports. The main path is user interaction in the web client through API routes into domain services and PostgreSQL; authorization and shared domain types support that path. Separate capabilities include dashboards, search, notifications, audit, and an optional MCP agent interface. The report service can call a distinct report-LLM service. Some subsystem connections are documented rather than excerpted, so the graph omits unverified calls.
Main entry points: index.ts API routes · app.ts HTTP application · reportService.ts Report generation · queryService.ts Hunt queries
Components 29
Web application
- Forenotes UI
src/client/src/App.tsx - Workspaces
src/client/src/pages - API client
src/client/src/lib/api.ts
API and access
- HTTP application
src/server/app.ts - API routes
src/server/routes/index.ts - Authentication
src/server/services/authService.ts - Authorization
src/server/permissions/permissionService.ts
Incident response
- Cases and incidents
src/server/services/incidentService.ts - Findings and evidence
src/server/services/findingService.ts - Tasks and notes
src/server/services/taskService.ts - Timeline and indicators
src/server/services/timelineEventService.ts - Hunt queries
src/server/services/queryService.ts
Investigation and reporting
- Dashboards
src/server/services/dashboardService.ts - Search
src/server/services/searchService.ts - Investigation graph
src/server/graph/graphBuilder.ts - MITRE matrix
src/server/graph/mitreMatrixBuilder.ts - Report generation
src/server/services/reportService.ts - PDF rendering
src/server/services/reportPdfRenderer.ts
State and integrations
- Audit log
src/server/services/auditLogService.ts - Notifications
src/server/services/notificationService.ts - PostgreSQL
src/server/db/pool.ts - Request transactions
src/server/db/transaction.ts - Shared domain types
src/shared/domain.ts - Report contracts
src/shared/reportTypes.ts - Report LLM client
src/server/services/litellmServiceClient.ts - MCP HTTP interface
src/server/mcp/mcpHttpHandler.ts - MCP tools
src/server/mcp/registerMcpTools.ts
Other components
- Responder
- Report LLM service
services/report-llm-service/app.py
Connections 22
- Responder → Forenotes UI: uses
README.md - Forenotes UI → Workspaces: renders
- Workspaces → API client: requests
- HTTP application → API routes: mounts
src/server/app.ts - HTTP application → Request transactions: wraps writes
src/server/app.ts - HTTP application → MCP HTTP interface: routes MCP
src/server/app.ts - API routes → Authentication: authenticates
- API routes → Report generation: dispatches reports
- API routes → Hunt queries: dispatches queries
- Hunt queries → Authorization: checks access
src/server/services/queryService.ts - Hunt queries → Audit log: records changes
src/server/services/queryService.ts - API routes → Findings and evidence: dispatches findings
- API routes → Tasks and notes: dispatches tasks
- API routes → MITRE matrix: builds matrix
- API routes → Investigation graph: builds graph
- Report generation → Report LLM client: requests generation
src/server/services/reportService.ts - Report generation → PDF rendering: renders PDF
src/server/services/reportService.ts - Report LLM client → Report LLM service: posts report context
src/server/services/litellmServiceClient.ts - MCP HTTP interface → MCP tools: registers tools
src/server/mcp/mcpHttpHandler.ts - Report generation → Report contracts: uses contracts
src/server/services/reportService.ts - HTTP application → PostgreSQL: uses pool
src/server/app.ts - Authentication → Notifications: publishes state
src/server/services/authService.ts