Viewing Responses
Access all responses for a specific form at/forms/{formId}/responses.
Response Dashboard
What You See
Each response card displays:- Submission timestamp - Formatted local date/time
- All field values - Key-value pairs from the JSON data
- Field names - Automatically capitalized from field IDs
Responses are rendered dynamically from JSON, so the display adapts to any form schema without code changes.
Data Fetching
1
Extract form ID
2
Fetch responses
3
Render response cards
Each response is rendered as a card with timestamp and field data.
CSV Export
The export system is designed for extensibility - currently supports CSV, with architecture ready for PDF, Excel, JSON, and more.Export Flow
1
User clicks Export button
2
Request export from API
3
Server processes export
The API fetches responses and passes them to the export system.
4
File downloads
Browser downloads the generated CSV file.
Export Architecture
The export system uses a pluggable architecture for easy extension.Directory Structure
Type Definitions
Export Registry
Adding a new export format requires:
- Creating a new file (e.g.,
pdf.ts) - Implementing the
Exporterfunction - Adding it to the
exportersobject
CSV Export Implementation
The CSV exporter uses PapaParse for reliable CSV generation.CSV Exporter
Data Normalization
Responses are normalized before export to flatten the structure:CSV Output Example
Export API Endpoint
GET/api/forms/{formId}/export?format=csv
Implementation
Authorization
Adding New Export Formats
The architecture makes it simple to add new formats like PDF, Excel, or JSON.1
Create exporter file
Create a new file in
lib/exporter/ (e.g., pdf.ts, excel.ts).2
Implement Exporter function
3
Register in index.ts
4
Use with query parameter
Error Handling
- No Responses
- Unsupported Format
- Export Failed
Future Export Formats
The extensible architecture supports:Excel (.xlsx)
Excel (.xlsx)
Use libraries like
exceljs or xlsx to generate Excel workbooks with formatted sheets.PDF Reports
PDF Reports
Generate formatted PDF reports with
jsPDF or pdfkit, including charts and summaries.JSON
JSON
Return raw JSON for API integrations and custom processing.
Google Sheets
Google Sheets
Integrate with Google Sheets API to automatically populate spreadsheets.
Email
Send response summaries via email using services like SendGrid or Resend.
Analytics Insights
While the current system focuses on raw data export, the response data structure supports future analytics:- Response counts - Track submissions over time
- Field analysis - Identify most common selections
- Completion rates - Monitor form abandonment
- Response times - Analyze submission patterns
All responses include
createdAt timestamps, enabling time-based analytics and trend visualization.