Admin ยท AI Readiness Platform

PDF Generation & Management

Configure and manage branded PDF reports for assessments

System Overview

The AI Readiness Assessment platform automatically generates two professional branded PDFs when a customer completes an assessment:

  • Report PDF: AI-generated executive summary with strategic recommendations
  • Answers PDF: Complete record of all customer responses organized by section

Both PDFs are generated with Atomic Computing branding (logo, colors, fonts) and stored in AWS S3 for secure, scalable delivery. Presigned URLs with 24-hour expiration are used in emails to customers.

๐Ÿ“Š Generation Flow

1
Customer Submits Assessment

Assessment status changes to "submitted"

2
AI Summary Generated

AWS Bedrock generates strategic recommendations using configurable prompt

3
PDFs Generated & Stored

Two branded PDFs created with logo, company colors, and formatted content. Uploaded to S3.

4
Email Sent to Customer

Assessment delivery email template used with presigned S3 URLs included

5
Status Updated to "Delivered"

Assessment marked as delivered, PDF sent timestamp recorded

๐ŸŽจ Brand Guidelines Applied

Colors

Navy

#0f172a - Primary headings

Orange

#ea580c - Accents & highlights

Light Gray

#f1f5f9 - Section backgrounds

Elements

Logo: Atomic Computing logo (SVG concentric circles with "A") in header

Typography: Professional sans-serif (Helvetica) with clear hierarchy

Layout: Clean, readable with consistent margins and spacing

Footer: Confidentiality notice and copyright information

๐Ÿ“„ PDF Contents

Report PDF

  • โ€ขAtomic Computing branding header
  • โ€ขCompany information block
  • โ€ขAI-generated strategic summary
  • โ€ขTop 5 assessment responses preview
  • โ€ขProfessional footer with disclaimer

Answers PDF

  • โ€ขAtomic Computing branding header
  • โ€ขAssessment details section
  • โ€ขAll responses grouped by section
  • โ€ขQuestion-answer pairs with formatting
  • โ€ขProfessional footer with disclaimer

โ˜๏ธ Storage & Delivery

S3 Storage

PDFs are stored in AWS S3 bucket ai-readiness-reports under paths like:

assessments/<assessment-id>/report-<timestamp>.pdf
assessments/<assessment-id>/answers-<timestamp>.pdf

Presigned URLs

Email templates include presigned URLs with 24-hour expiration for secure, temporary access to PDFs without AWS credentials.

No Regeneration

PDFs are generated once and cached in S3. Admin resends use the cached PDFs instead of regenerating, ensuring consistency and performance.

๐Ÿ“ง Email Template Integration

When an assessment is submitted, the system automatically loads the active "assessment_delivery" email template and substitutes the following variables with actual customer data and PDF links:

{{customerName}} - Contact person's name
{{reportUrl}} - S3 presigned URL for report PDF (24-hour expiration)
{{answersUrl}} - S3 presigned URL for answers PDF (24-hour expiration)
{{customerEmail}} - Customer email address

Note: Customers receive the assessment report email only. The admin/engineer dashboard for viewing assessments is a separate internal system not accessible to customers. BCC addresses in the email provider configuration will receive copies of all customer emails.

You can customize these templates in the Email Templates section.

๐Ÿ”„ Admin Resend PDFs

Admins can manually resend assessment PDFs to customers via the PDF Deliveries page.

Resend Process:

  1. Admin clicks "Resend" button on an assessment
  2. System loads the existing PDFs from S3 (if available)
  3. If PDFs were never generated, they are generated now
  4. "assessment_resend" email template is used (with different tone/styling)
  5. Presigned URLs are regenerated (24-hour validity)
  6. Email is sent to customer
  7. Delivery attempt counter is incremented

๐Ÿ—„๏ธ Database Schema

Assessment records include the following PDF-related columns:

report_s3_key - S3 key for the report PDF
answers_s3_key - S3 key for the answers PDF
report_generated_at - Timestamp when PDFs were generated
pdf_sent - Boolean flag (true if delivered to customer)
pdf_sent_at - Timestamp of last successful delivery
delivery_attempts - Counter for resend attempts

๐Ÿ”Œ API Endpoints

POST /reports/assessment/:id/generate

Generate both report and answers PDFs, store in S3

GET /reports/assessment/:id/urls

Get presigned URLs for both PDFs

POST /reports/assessment/:id/regenerate

Regenerate and refresh PDFs (admin action)

POST /assessments/:id/resend-pdfs

Admin endpoint to resend PDFs to customer