Sub-feature · Project Management App

Dynamic Report Generation

Design reusable HTML templates in a WYSIWYG editor, define Mustache-style variables, then generate professional PDF & DOCX reports at the click of a button — with secure S3 storage and role-based access control.

Key Features

Everything You Need to Produce Professional Reports

From template design to final export — a fully integrated reporting pipeline.

✏️

WYSIWYG Template Editor

Build rich HTML templates using Quill with image uploads, page settings (size, orientation, margins), and a live paginated preview powered by paged.js.

🔣

Mustache Variable System

Use {{variable_name}} syntax anywhere in templates. Variables are auto-extracted and surfaced as input fields at report generation time.

📄

PDF Export via Puppeteer

Headless Chromium renders templates with full CSS support, native header/footer, and paged media — producing pixel-perfect PDFs stored directly in S3.

📝

DOCX Export

Converts HTML to DOCX via html-to-docx with automatic image centering and HTML entity normalization for clean Word documents.

☁️

S3-Backed Storage

Template HTML/CSS, embedded images, and generated reports are all stored in S3. Presigned URLs (7-day validity for images, 1-hour for downloads) ensure secure, time-limited access.

🔐

Role-Based Access

Admin and Sales users can create and use templates. Admins see all reports; Sales users see only their own. Only Admins can delete templates or reports.

How It Works

Report Generation Pipeline

From template selection to a downloadable file in seconds.

1
Select Template
Pick or edit a saved template
2
Fill Variables
Enter values for {{...}} fields
3
Mustache Render
Variables substituted into HTML
4
PDF / DOCX
Puppeteer or html-to-docx
5
Stored in S3
Presigned download URL returned

Variable System

Built-in Template Variables

These variables are available out-of-the-box in every template. Custom variables can be added freely.

Variable Intended Value Example
{{project_name}} Project name Alpha Corp Web App PT
{{client_name}} Client organisation Alpha Corporation Ltd
{{partner_name}} Partner / subcontractor Beta Partners Pte Ltd
{{project_lead}} Project lead name or email alice@example.com
{{sales_lead}} Sales lead name or email bob@example.com
{{date}} Report date 07 March 2026
{{author}} Report author Alice Smith

Role-Based Access Control

Who Can Do What

Access is strictly governed by the user's role within the platform.

Action Admin Sales Delivery
View & create templates
Edit templates
Delete templates ✓ Admin only ✗ 403 ✗ 403
Generate reports ✓ If assigned to assessment* ✓ If assigned to assessment*
List / view reports ✓ All Own projects † Own projects †
Edit / regenerate reports ✓ Any Own projects † Own projects †
Download reports ✓ Any Own projects † Own projects †
Delete reports ✓ Admin only ✗ 403 ✗ 403

* Generate uses assessment-level filtering — user must appear in the assignment record for the specific assessment (assignedMembers, assignedMember, or createdBy).
† All other report actions use project-level filtering (user must be projectLead, salesLead, or in teamMembers on the project). Edit/Regenerate have no role gate.

✨ New — AI Feature

🤖 AI-Assisted Finding Generation

Paste raw security assessment notes and let DeepSeek AI identify, structure, and insert formatted finding blocks directly into your report — severity-ordered by CVSS score.

Explore AI Reporting

🔐 Project Management Application

Report Generation is part of the SecurePM platform — explore the full feature set including authentication, role-based dashboards, assessment management, and Slack notifications.

View Full Project