This repository contains the back-end of iAlerta, responsible for receiving content in multiple formats, performing text extraction and normalization, and integrating with AI services to detect AI-generated content.
The application was designed with a strong focus on data processing pipelines, clean architecture and software quality.
- Node.js
- Express
- Docker
The codebase follows a clear responsibility-driven structure:
src/
├── config/ # Application and environment configurations
├── controllers/ # HTTP controllers (request/response handling)
├── exceptions/ # Custom application errors and exception handling
├── services/ # Business logic and AI integrations
├── middlewares/ # Request middlewares (upload, validation, auth)
├── routes/ # API route definitions
├── utils/ # Utility functions (parsing, normalization, helpers)
├── tests/ # Unit and integration tests
├── uploads/ # Uploaded files and temporary storage-
Content is received via HTTP request
-
File type and size validation
-
Text extraction:
- PDFs: pdf-parse
- Plain text: direct reading
-
Text normalization for consistent analysis
-
Content analysis via Hugging Face APIs
-
Results returned to the front-end
- File upload handling
- Validation and sanitization
- Text extraction pipeline
- Centralized error handling
- Integration with Hugging Face APIs
- Decoupled service layer for AI providers
- Easy extension to support additional models or services
- Unit tests for services and utilities
- Integration tests for main API routes
- End-to-end validation of the processing pipeline
- Docker-based containerization
- Automated CI/CD pipelines
- Continuous deployment on Google Cloud
Make sure you have Node.js (v18 or higher) installed on your machine.
You can download it from: https://nodejs.org
To verify the installation:
node -v
npm -vgit clone https://github.com/ryannardelli/IAlerta_back_end.gitcd IAlerta_back_endnpm installnpm run dev- Result caching
- Monitoring and logging
- Support for additional AI models