How shawn-di/feedback_component works
Feedback is delivered through three client experiences: a standalone Next.js page, an embeddable Web Component, and a framework-free page. Clients collect feedback details and screenshots, then either submit to the Next.js GitHub Issue API or, when configured, to a private Lark service. The Lark path validates and maps submissions, writes a record, and optionally uploads screenshot attachments. The README also documents a theme-editor demo and event-only submission when no endpoint is configured. Some wiring for unsampled page and integration code is represented only where documented.
Main entry points: FeedbackForm.tsx Feedback form · route.ts Feedback API · feedback-to-lark.mjs Lark feedback store · index.html Widget demo page
Components 20
Next.js feedback
- Feedback page
src/app/page.tsx - Feedback form
src/components/feedback/FeedbackForm.tsx - Type selector
src/components/feedback/TypeSelector.tsx - Screenshot upload
src/components/feedback/ImageUpload.tsx - Feedback API
src/app/api/feedback/route.ts
Embeddable clients
- Feedback widget
PR/feedback-widget.js - Standalone page
PR/feedback_Solo.js - Theme editor demo
demo.js - Widget demo page
PR/index.html - Standalone page markup
PR/feedback_Solo.html
GitHub submission
- Payload validation
src/lib/feedback.ts - GitHub operations
src/lib/github.ts
Lark service
- Private feedback server
server.mjs - Lark feedback store
lib/feedback-to-lark.mjs - Lark CLI bridge
lib/lark-cli.mjs
Other components
- Feedback user
- GitHub repository
- Configured feedback endpoint
- lark-cli
- Lark base table
Connections 21
- Feedback user → Feedback page: opens
- Feedback page → Feedback form: renders
- Feedback form → Type selector: selects type
- Feedback form → Screenshot upload: manages screenshots
- Feedback form → Feedback API: POSTs feedback
- Feedback API → Payload validation: validates and formats
- Feedback API → GitHub operations: uploads and creates issue
- GitHub operations → GitHub repository: writes assets and issue
- Feedback user → Widget demo page: opens demo
- Widget demo page → Feedback widget: loads component
- Feedback user → Standalone page markup: opens page
- Standalone page markup → Standalone page: loads script
- Theme editor demo → Widget demo page: configures theme
- Feedback widget → Configured feedback endpoint: POSTs when configured
- Standalone page → Configured feedback endpoint: POSTs when configured
- Feedback user → Private feedback server: submits feedback
- Private feedback server → Lark feedback store: submits payload
- Lark feedback store → Lark CLI bridge: runs table commands
- Lark CLI bridge → lark-cli: executes commands
- lark-cli → Lark base table: reads fields and writes records
- Lark feedback store → Lark base table: uploads screenshot attachments