Andrei 8c8300780f feat(phase-5): implement comprehensive Markdown and PDF report export system
�� Advanced Report Generation:
- Complete Handlebars templating system for professional reports
- Markdown report generator with embedded Mermaid diagrams
- PDF report generator using Puppeteer with server-side rendering
- Comprehensive analysis data integration from all phases

🎨 Professional Report Design:
- Beautiful PDF layouts with proper typography and spacing
- Responsive design for print and digital viewing
- Visual Mermaid flowcharts for redirect chain visualization
- Color-coded status badges and comprehensive data tables

📊 Rich Report Content:
- Complete redirect chain analysis with hop-by-hop details
- SSL certificate analysis with expiry and security warnings
- SEO optimization recommendations and meta tag analysis
- Security vulnerability findings and mixed content detection
- Performance metrics with latency visualization

🔧 Export Service Architecture:
- Dedicated ExportService class with comprehensive error handling
- Professional Handlebars helpers for date, duration, and URL formatting
- Automatic Mermaid diagram generation from redirect hop data
- File system management with cleanup and temporary file handling

🌐 RESTful Export API:
- GET /api/v2/export/:checkId/markdown - Generate Markdown reports
- GET /api/v2/export/:checkId/pdf - Generate PDF reports with embedded charts
- POST /api/v2/export/:checkId/save - Save reports to filesystem (authenticated)
- GET /api/v2/export/formats - Discover available export formats
- DELETE /api/v2/export/cleanup - Clean up old report files

🔒 Security and Rate Limiting:
- Enhanced rate limiting for resource-intensive export operations (20/hour)
- Proper authentication for save operations and admin functions
- Comprehensive input validation with Zod schemas
- Security headers for PDF downloads and XSS protection

📋 Template System:
- Professional Markdown template with comprehensive sections
- HTML template for PDF generation with embedded CSS and JavaScript
- Mermaid diagram integration with automatic chart generation
- Organization branding support and customizable layouts

 Performance Optimizations:
- Puppeteer configuration optimized for headless server environments
- Efficient template compilation and caching
- Background processing ready for resource-intensive operations
- Proper memory management for large report generations

🛠️ Development Features:
- Comprehensive test suite for all export functionality
- Graceful error handling with detailed error messages
- Proper MIME type detection and content headers
- Download functionality with custom filenames

Requirements: Node.js 18+ for Puppeteer, Handlebars templating, Mermaid rendering
2025-08-18 09:19:54 +00:00

URL Redirect Tracker

A simple web application that tracks all intermediate redirects from an input URL to the final landing page.

Features

  • Tracks all redirects from the initial URL to the final destination
  • Displays the time in milliseconds for each redirect
  • Marks non-SSL (non-HTTPS) redirects with red
  • Shows a complete redirect chain with timing information

Installation

  1. Clone this repository
  2. Install dependencies:
    npm install
    
  3. Start the server:
    npm start
    
  4. Open your browser and navigate to http://localhost:3333

How to Use

  1. Enter a URL in the input field (e.g., http://example.com or example.com)
  2. Click the "Track Redirects" button
  3. View the complete redirect chain, including timing information
  4. Non-SSL (HTTP) redirects will be marked in red

Technical Details

  • Built with Node.js and Express
  • Uses Axios for making HTTP requests and following redirects
  • Frontend built with vanilla JavaScript, HTML, and CSS
  • Server runs on port 3333

License

MIT

Description
No description provided
Readme 144 MiB
Languages
TypeScript 71.6%
JavaScript 18.2%
Handlebars 3.1%
Shell 2.8%
CSS 1.9%
Other 2.4%