findings
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of dupes branch: v5View latest version
Business logic coordination between routes and services. Controllers should:
- Handle environment variables and configuration
- Coordinate multiple service calls
- Implement business rules and validation
- Handle service business logic layer (result.success)
emails.controller.ts
- Handles email PDF attachment processing workflow- PDF Processing: Processes each PDF attachment as separate database page
- Filename Parsing: Extracts interviewee names from filenames using parentheses pattern
- Status Tracking: Manages upload status progression ("Uploading..." → "Uploaded" → "Upload error")
- 3-Step Upload: Orchestrates Notion's file upload process (create → upload → attach)
tasks.controller.ts
- Handles PDF extraction, blob storage, and page duplication workflows for Notion webhooks- PDF Text Extraction & Redaction: Extracts text from PDFs and redacts person names (from Notion Name property) with "Respondent" before blob storage
- Page Duplication: Includes content filtering and H3-to-paragraph transformation for "Key findings" and "Notable disagreements"
- Filtered Database Duplication: Duplicates pages with child databases while filtering out specific properties (Confidence Score, Consensus Level, Evidence Summary, Methodology)
health.controller.ts
- System health checksfindings.controller.ts
- Handles findings analysis workflow using ChatGPT and Notion integration- Question Tracking: Records "Total questions" count during initialization and "Completed questions" count upon finalization
- Progress Monitoring: Enables completion rate analysis in Notion dashboards