Feature Request Submission System โ
Status: โ
Complete
Date: 2026-01-12
Overview โ
A comprehensive system for collecting, managing, and tracking feature requests and bug reports from users. The system integrates with GitHub Issues, Discord notifications, and includes AI-powered refinement and duplicate detection.
Goals โ
- Easy Submission: Simple, intuitive form accessible from within the app and Discord
- GitHub Integration: Automatically create GitHub issues from submissions
- Duplicate Detection: Prevent duplicate requests using AI-powered similarity detection
- AI Refinement: Use GitHub Copilot to help users refine and clarify their requests
- Discord Integration: Notify team of new submissions via Discord webhook
- User Feedback: Provide users with issue tracking links for follow-up
Architecture โ
Components โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ User Interface โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ FeatureRequestForm Component (React) โ โ
โ โ - Type selection (feature/bug/improvement) โ โ
โ โ - Title & description fields โ โ
โ โ - Impact/priority selection โ โ
โ โ - Use case examples โ โ
โ โ - Duplicate warning display โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Firebase Cloud Function โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ createFeatureRequest (Callable) โ โ
โ โ 1. Validate input โ โ
โ โ 2. Check for duplicates (AI similarity) โ โ
โ โ 3. Create GitHub issue via API โ โ
โ โ 4. Store in Firestore for tracking โ โ
โ โ 5. Send Discord notification โ โ
โ โ 6. Return issue URL to user โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโดโโโโโโโโโโโโ
โ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ
โ GitHub Issues โ โ Discord Webhook โ
โ - Auto-labeled โ โ - New submission โ
โ - Formatted โ โ - Link to issue โ
โ - Trackable โ โ - Summary โ
โโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโData Model โ
FeatureRequest (Firestore Collection: featureRequests) โ
interface FeatureRequest {
id: string // Auto-generated Firestore ID
type: 'feature' | 'bug' | 'improvement' | 'question'
title: string // Required, max 100 chars
description: string // Required, max 1000 chars
useCase?: string // Optional user story/example
priority: 'low' | 'medium' | 'high' | 'critical'
impact: 'individual' | 'small-group' | 'all-users'
// GitHub Integration
githubIssueNumber?: number // Issue number on GitHub
githubIssueUrl: string // Full URL to the issue
// Metadata
submittedBy: string // User ID (anonymous option available)
submittedAt: Timestamp
status: 'submitted' | 'under-review' | 'planned' | 'in-progress' | 'completed' | 'declined'
// Duplicate Detection
duplicateOf?: string // Reference to original request ID
similarRequests?: string[] // Array of potentially similar request IDs
// AI Refinement
originalDescription?: string // Before AI refinement
refinementSuggestions?: string[]
}User Interface โ
Form Fields โ
Request Type (Required)
- Feature Request
- Bug Report
- Improvement
- Question/Discussion
Title (Required, max 100 chars)
- Clear, concise summary
- Example: "Add dark mode to profile settings"
Description (Required, max 1000 chars)
- Detailed explanation
- What problem does this solve?
- How would it work?
Use Case (Optional, max 500 chars)
- Real-world example
- User story format encouraged
Priority (Required)
- Low: Nice to have
- Medium: Would improve experience
- High: Important for usability
- Critical: Blocking or security issue
Impact (Required)
- Individual: Affects only me or very few users
- Small Group: Affects specific user segment
- All users: Broad impact across user base
Duplicate Detection UX โ
When user types title/description, show similar existing requests:
โ ๏ธ Similar requests found:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ #42 Add dark mode support โ
โ Submitted: 2026-01-05 ยท Status: Planned โ
โ 85% similar to your request โ
โ [View] [Continue Anyway] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโGitHub Integration โ
Issue Creation โ
Issues created with standardized format:
## Type
[Feature Request / Bug Report / Improvement / Question]
## Description
[User's description]
## Use Case
[User's use case if provided]
## Priority & Impact
- Priority: [low/medium/high/critical]
- Impact: [individual/small-group/all-users]
## Submitted By
User ID: [userId or "Anonymous"]
Submitted: [timestamp]
---
*Auto-generated from in-app feature request form*Labels Applied โ
feature-request,bug,improvement, orquestionpriority-low,priority-medium,priority-high, orpriority-criticaluser-submitted(distinguishes from internal issues)needs-triage(for team review)
Authentication โ
Uses GitHub Personal Access Token stored in Firebase Functions config:
firebase functions:config:set github.token="ghp_xxxxxxxxxxxx"Required permissions:
reposcope (to create issues)
Discord Integration โ
Notification Format โ
๐ฏ New Feature Request #123
โโโโโโโโโโโโโโโโโโโโโโโโโโ
Type: Feature Request
Priority: High ยท Impact: All users
Title: Add dark mode to profile settings
Description:
Users have requested ability to switch to dark mode...
Use Case:
When browsing at night, bright screens are jarring...
๐ค Submitted by: user_abc123
๐ GitHub Issue: https://github.com/cattreedev/lantern_app/issues/123
๐
2026-01-12 at 4:30 PMAI-Powered Refinement โ
Refinement Flow โ
- User writes initial request
- Click "Refine with AI" button
- GitHub Copilot analyzes and suggests:
- Clearer title
- More specific description
- Missing use case details
- Better priority/impact classification
Copilot Prompt Template โ
You are helping a user refine their feature request for the Lantern app.
Lantern is an anonymous, location-based social app for meeting people at real places.
Current request:
Title: [title]
Description: [description]
Type: [type]
Please suggest:
1. A clearer, more specific title (max 100 chars)
2. An improved description with:
- What problem this solves
- How it would work
- Why it matters
3. A concrete use case or user story
4. Appropriate priority and impact levels
Keep the user's intent but make it more actionable for developers.Implementation Steps โ
Phase 1: Core Form Component (Priority 1) โ
- [x] Create
FeatureRequestForm.jsxcomponent - [x] Add form validation
- [x] Implement character counters
- [x] Add type/priority/impact selectors
- [x] Create submission success/error states
Phase 2: Firebase Cloud Function (Priority 1) โ
- [x] Set up Firebase Functions directory
- [x] Create
createFeatureRequestcallable function - [x] Integrate GitHub API (using Octokit)
- [x] Store requests in Firestore
- [x] Return issue URL to client
Phase 3: Duplicate Detection (Priority 2) โ
- [ ] Implement similarity scoring algorithm
- [ ] Create search index for existing requests
- [ ] Add real-time duplicate checking
- [ ] Display similar requests to user
Phase 4: Discord Integration (Priority 1) โ
- [x] Add Discord webhook to Cloud Function
- [x] Format notification message
- [x] Include priority/type/impact indicators
- [x] Add links to GitHub issue
Phase 5: AI Refinement (Priority 3) โ
- [ ] Create refinement interface
- [ ] Implement Copilot integration
- [ ] Add before/after comparison
- [ ] Allow user to accept/reject suggestions
Phase 6: App Integration (Priority 1) โ
- [x] Add route to App.jsx
- [x] Add navigation item (settings menu)
- [x] Ensure mobile responsiveness
- [x] Add help text and examples
Security Considerations โ
Input Validation โ
- Sanitize all user input
- Enforce character limits
- Validate enum values (type, priority, impact)
- Rate limiting (max 5 submissions per user per day)
Authentication โ
- Require user to be logged in for submissions
- Option for anonymous submission (doesn't link to user profile)
- GitHub token stored securely in Firebase Functions config
- Discord webhook URL stored as secret
Spam Prevention โ
- Rate limiting per user
- Duplicate detection prevents spam
- Manual review queue for suspicious submissions
- Ability to flag/delete spam issues
Testing Strategy โ
Unit Tests โ
- Form validation logic
- Duplicate detection algorithm
- GitHub API integration
- Discord webhook formatting
Integration Tests โ
- End-to-end submission flow
- GitHub issue creation and labeling
- Firestore data storage
- Discord notification delivery
Manual Testing Checklist โ
- [ ] Submit feature request from app
- [ ] Verify GitHub issue created with correct labels
- [ ] Confirm Discord notification received
- [ ] Check Firestore document saved correctly
- [ ] Test duplicate detection with similar titles
- [ ] Test AI refinement suggestions
- [ ] Test error handling (API failures, network issues)
- [ ] Test on mobile devices
Environment Configuration โ
Required Environment Variables โ
Firebase Functions Config:
# GitHub API
firebase functions:config:set github.token="ghp_xxxxxxxxxxxx"
firebase functions:config:set github.repo="cattreedev/lantern_app"
# Discord Webhook
firebase functions:config:set discord.webhook_url="https://discord.com/api/webhooks/..."Client (.env.local):
# No additional client config needed - uses Firebase FunctionsFuture Enhancements โ
Phase 2 Features (Post-MVP) โ
Voting System
- Users can upvote requests
- Sort by popularity
- Influence priority
Comments & Discussion
- Users can discuss requests
- Sync with GitHub issue comments
- Notification system
Status Updates
- Notify users when status changes
- Email/push notifications
- Progress tracking
Admin Dashboard
- Triage interface
- Bulk actions
- Analytics and trends
Integration Improvements
- Slack integration option
- Email notifications
- API for external submissions
Documentation โ
User-Facing โ
- Help text in form
- Examples for each field
- FAQ about submission process
- How to track submitted requests
Developer-Facing โ
- API documentation for Cloud Function
- GitHub issue template explanation
- Duplicate detection algorithm details
- Discord webhook payload format
Success Metrics โ
- Adoption: Number of requests submitted per week
- Quality: Percentage of requests acted upon
- Efficiency: Time from submission to triage
- Duplicate Prevention: Percentage of duplicates caught
- User Satisfaction: Follow-up survey on process