• Townie
    AI
  • Blog
  • Docs
  • Pricing
Log inSign up
project logo

lightweight

findings

Remix of lightweight/findings-base
Public
Like
findings
Home
Code
7
_townie
7
backend
8
frontend
1
shared
1
.vtignore
deno.json
H
main.tsx
Branches
2
Pull requests
Remixes
History
Environment variables
8
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.
Sign up now
Code
/
backend
/
controllers
/
README.md
Code
/
backend
/
controllers
/
README.md
Search
8/28/2025
README.md

Controllers

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)

Available Controllers

  • 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 checks
  • findings.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
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.