Data Ingestor is a backend-centric application built with NestJS and React, designed to support ingestion of large datasets via CSV (with extensibility to other formats). This project serves as a technical showcase of advanced Node.js backend engineering using streaming, messaging, modular architecture, and concurrency patterns. The primary focus is on backend robustness and scalability.
- Demonstrate deep proficiency in Node.js using NestJS, focusing on architecture, patterns, and scalability.
- Leverage Dependency Injection and SOLID principles for maintainable code.
- Handle large file uploads with efficient memory usage using streaming and backpressure techniques.
- Use Amazon SQS for decoupled, event-driven processing of data rows.
- Track processing status at both process and row level for visibility and auditing.
- Accept CSV files via a web interface.
- Validate file metadata (type, size).
- Store file temporarily for ingestion.
- Generate a unique
processIdper upload. - Persist initial ingestion metadata.
- Stream and parse rows line-by-line.
- Dispatch rows to an SQS queue for processing.
- Process each row independently.
- Update row status and results in the database.
- Track and update the ingestion process status.
- Provide APIs to retrieve ingestion and row-level status.
- Emit events on process start, row processing, completion, and failure.
- Persist failed rows with error reasons.
- Provide downloadable error reports.
- Backend: NestJS (Node.js + TypeScript)
- Database: PostgreSQL
- Queue: Amazon SQS
- Frontend: React (for upload + status viewing)
- Infrastructure: Nx monorepo
- Dependency Injection
- Repository Pattern
- Event-driven architecture
- Streaming + Backpressure
- Modular domain-oriented codebase
Refer to the included sequence diagram:
UploadControlleraccepts the file and delegates toIngestOrchestrator.IngestOrchestratorpersists metadata, parses file, and queues rows.ProcessorServiceconsumes SQS messages and processes each row.DBServiceupdates row and process statuses.SQSServiceemits event notifications (STARTED,PROCESS ROW,PROCESSED,COMPLETED).
| Component | Test Type | Tools |
|---|---|---|
| Controllers | E2E | Jest + Supertest |
| Services | Unit/Integration | Jest + Mocks |
| SQS Consumers | Unit + Event Sim | Jest + Localstack |
| Database Layer | Integration | Testcontainers |
- Organize code using Nx workspaces (
apps/,libs/). - Implement domain modules (e.g.,
ingestion,file,processor) with clean boundaries. - Services must not directly depend on other services—always depend on interfaces.
- All external communications (DB, SQS) must go through well-defined adapters.
- File streaming via
fs.createReadStreamandfast-csv. - Distributed processing via SQS workers.
- Row-level and process-level status tracking.
- Transactional DB updates and error isolation.
- Granular observability and error reports.
- Add support for JSON, XLSX via a pluggable parser strategy.
- Add multi-tenancy for isolation of ingestion contexts.
- Add WebSocket integration for real-time progress tracking.
- Integrate AWS S3 for persistent file storage.
- Role-based access control for ingestion/report endpoints.
- Implement transformation pipeline (row mapping/validation).
- Add ingestion dashboards and analytics.
- Plug-in support for custom ingestion workflows.
- Integrate monitoring and alerts (Prometheus + Grafana).

