Skip to main content
Welcome to the documentation of the second microservice of the project. My Portfolio’s Dynamic Report Generator (CSV/PDF)! This project acts as a high-precision stateless microservice. It is optimized to ingest data payloads (JSON) and dynamically transform them into financial reports (CSV and PDF), minimizing the I/O impact on the infrastructure.

🚀 Features and Backend Architecture

Strategy Pattern

Absolute decoupling in the main controller through PHP 8 match expressions. The rendering logic is delegated to standardized contracts (ReportStrategy).

Stateless Memory

Use of raw memory streams (php://temp) to compile heavy binary files (CSVs) directly into RAM, avoiding physical disk writes.

Perimeter Security

Rate Limiting (Throttle) middlewares that block massive requests (DoS) by limiting consumption per IP on the /api/v1/ routes.

Timezone Synchronization

The engine captures and dynamically adapts the client’s timezone, ensuring temporal consistency in metadata and timestamps.

Defensive Sanitization

Data interception and normalization. Unrecognized states are isolated under default classifiers to protect metrics (KPIs).

Automated Testing

Coverage of mathematical integrity and validation of export flows using the Pest framework.

🛠️ Tech Stack

💻 Development Commands

Instructions to set up the environment locally (assuming port 8000 is free).

📡 API Documentation (Endpoints)

The microservice exposes lightweight routes designed for inter-service communication or asynchronous calls from the frontend.

🩺 Health Check (/api/v1)

🖨️ Artifact Rendering (/api/v1/reportes)