-
Notifications
You must be signed in to change notification settings - Fork 0
Reports
The Reports page assembles a filterable, exportable security report from the
current data. Aggregation logic lives in src/lib/reports/, orchestrated by
getReportData(companyId, filters).
getReportData runs all aggregations in parallel and returns a ReportData
object with these sections:
| Section | Module | Content |
|---|---|---|
| Key findings | findings.ts |
Headline takeaways derived from the other sections |
| Exposure | exposure.ts |
Overall exposure summary (employees affected, breach counts) |
| Data types | data-types.ts |
Breakdown of compromised data categories |
| Departments | departments.ts |
Exposure grouped by department |
| Employees | by-employee.ts |
Per-employee breach breakdown |
| Trends | trends.ts |
Time-series of detections |
| Compliance | compliance.ts |
Compliance-oriented summary |
| Deltas | deltas.ts |
Change vs. a comparison window |
Each section has a matching UI component in src/components/reports/
(ExposureSection, DataTypeSection, DepartmentSection, EmployeeSection,
TrendsSection, ComplianceSection, KeyFindingsSection), composed by
ReportCanvas with a ReportToolbar and ReportFilterBar.
Filters are defined in reports/filters.ts (ReportFilters, with an
EMPTY_FILTERS default). They scope every section consistently, since all
aggregations receive the same filter object.
The Deltas section compares the current period against a previous one. The
window logic is in reports/windows.ts and is covered by unit tests in
reports/windows.test.ts (run with npm test).
Reports export to CSV via reports/csv.ts, exposed at:
GET /api/reports/export
The endpoint streams a CSV built from the same ReportData, honoring the
active filters.
DataShield is source-available software by Melvin PETIT (WhiteMuush). Work in progress, not production ready.
Getting started
Architecture
Features
Reference
Contributing