Files
DataStack/core/Storage/manifest.md
T

14 lines
512 B
Markdown
Raw Normal View History

2026-10-23 11:43:49 -05:00
# Storage Engine Manifest
## Purpose
File-based CSV storage engine. All collected data is persisted strictly to CSV files (zero per-row database inserts).
## Conventions
- **Path**: `/storage/data/{clientId}/{YYYY-MM-DD}.csv`
- **Schema**: `clientId, eventId, timestamp, payload`
- **Rotation**: Rotates per-day or when single file reaches 100MB limit (`-part2.csv`).
- **Batching**: Never writes per-event. Flushes buffered arrays using `json2csv` parser.
## Dependencies
- `json2csv`
- Node.js `fs`, `path`