Feature Request Submission System โ
Welcome to the feature request submission system documentation!
๐ Documentation Overview โ
| Document | Description | Audience |
|---|---|---|
| QUICK_START.md | Quick setup guide and usage instructions | Developers & Users |
| FEATURE_REQUEST_SYSTEM.md | Complete technical specification | Developers |
| DISCORD_BOT_SETUP.md | Discord bot implementation guide | Developers |
๐ For Users โ
Submitting a Request โ
- Discord (Recommended): Use
/featureor/bugslash commands in Discord - In-App: Navigate to
#/feedbackor click "Submit Feedback" in Settings - GitHub: Directly create an issue (advanced users)
Discord Commands โ
/feature- Submit a feature request/bug- Report a bug/mystatus- Check status of your submissions
Submissions appear in:
- #features - Public feature request channel
- #bugs - Public bug report channel
How to use: Simply type / in Discord and available commands will appear in autocomplete. Commands work in any channel.
Smart Prompts: If you post a regular message in #features or #bugs, the bot will automatically suggest using the appropriate slash command with a helpful guide that auto-deletes after 30 seconds.
What to Include โ
- Title: Brief, specific summary (max 100 characters)
- Description: Detailed explanation of what you want and why
- Use Case: Real-world example of how you'd use it
- Priority: How urgent is this?
- Impact: Who would benefit from this?
๐ For Developers โ
Quick Setup โ
# 1. Install dependencies
cd functions
npm install
# 2. Configure Firebase
firebase use lantern-app-dev
firebase functions:config:set \
github.token="ghp_YOUR_TOKEN" \
github.repo="cattreedev/lantern_app" \
discord.webhook_url="YOUR_WEBHOOK_URL"
# 3. Deploy
firebase deploy --only functions
# 4. Test
# Visit http://localhost:5173/#/feedbackSee Discord Bot Setup for Discord bot installation.
Architecture โ
Discord Bot (Primary Method)
Discord User โ /feature or /bug command โ Discord Modal Form
โ
Bot validates & creates GitHub issue
โ
โโโโโโดโโโโโฌโโโโโโโโโโโโโ
โ โ โ
GitHub Public Admin
Issue Channel MonitorWeb Form (Alternative Method)
User โ FeatureRequestForm (React) โ Firebase Function
โ
GitHub Issue + Firestore Storage
โ
Admin Monitor (optional webhook)Key Features โ
โ Automatic GitHub Issue Creation
- Standardized formatting
- Auto-labeling (type, priority, environment)
- Direct links for tracking
โ Duplicate Detection
- Real-time similarity checking
- Prevents duplicate submissions
- Shows related existing requests
โ Discord Integration
- Webhook notifications
- Separate dev/prod channels
- Rich embeds with metadata
โ Environment Awareness
- Automatic dev vs prod detection
- Separate Discord channels
- Environment-specific labels
โ Rate Limiting
- 5 submissions per user per 24 hours
- Per environment (dev and prod independent)
- Prevents spam
โ Security
- Input validation and sanitization
- Firebase Auth required
- Anonymous submission option
- Secrets managed via Firebase config
๐ System Components โ
Frontend โ
- Component:
src/screens/feedback/FeatureRequestForm.jsx - Route:
#/feedback - Features: Validation, character limits, duplicate warnings
Backend โ
- Functions:
functions/index.jscreateFeatureRequest- Main submission handlercheckDuplicates- Similarity detection
- Firestore:
featureRequestscollection - GitHub API: Issue creation via Octokit
- Discord: Webhook notifications
Documentation โ
- QUICK_START.md - Setup guide
- FEATURE_REQUEST_SYSTEM.md - Full spec
- DISCORD_BOT_INTEGRATION.md - Discord bot guide
- FIREBASE_FUNCTIONS_DEV_PROD.md - Deployment guide
๐ Workflow โ
User Submission โ
- User fills out form in app
- Client validates input
- Client checks for duplicates
- User submits request
- Firebase Function processes:
- Creates GitHub issue
- Stores in Firestore
- Sends Discord notification
- User receives GitHub issue link
Team Triage โ
- Discord notification appears in channel
- Team reviews GitHub issue
- Issue labeled:
needs-triage - Team adds to project board
- Status updates tracked in Firestore
๐ฆ Roadmap โ
โ Phase 1: Core System (COMPLETE) โ
- [x] React form component
- [x] Firebase Cloud Functions
- [x] GitHub issue creation
- [x] Discord notifications
- [x] Duplicate detection
- [x] Environment awareness
๐ Phase 2: Discord Bot (DOCUMENTED) โ
- [ ] Discord slash command
- [ ] Modal form integration
- [ ] Direct submission from Discord
๐ Phase 3: AI Refinement (DOCUMENTED) โ
- [ ] Copilot integration
- [ ] Request improvement suggestions
- [ ] Auto-classification
๐ Phase 4: Enhancements (FUTURE) โ
- [ ] Voting system
- [ ] Comments/discussion
- [ ] Status notifications
- [ ] Admin dashboard
๐ Security โ
- โ Input validation and sanitization
- โ Rate limiting (5 per 24 hours)
- โ Authentication required
- โ Secrets in Firebase config (never committed)
- โ
GitHub token with minimal scope (
repoonly) - โ Discord webhook URLs kept secret
GitHub Repository Access โ
Current Setup: Private Repository
The repository is private to protect the codebase. For internal team members:
Add to GitHub Organization
- Grant "Read" access to all employees
- Users can view issues and code but cannot modify
- Safe for non-technical staff - GitHub prevents editing
What Users Can Do
- โ View all GitHub issues
- โ Browse codebase (read-only)
- โ Comment on issues
- โ Track their submissions
- โ Cannot push code (requires Write permission)
- โ Cannot merge PRs or change settings
Future: Public Submissions
- Planned enhancement to support public community feedback
- Separate public issues repository
- See Discord Bot README for details
- Will maintain codebase security while enabling community engagement
๐ Monitoring โ
Metrics to Track โ
- Submissions per day/week
- Request type distribution
- Priority breakdown
- Duplicate detection rate
- Time to triage
- Status progression
Firestore Queries โ
// Submissions in last 7 days
const recent = await db.collection('featureRequests')
.where('submittedAt', '>', sevenDaysAgo)
.get()
// By type
const bugs = await db.collection('featureRequests')
.where('type', '==', 'bug')
.where('status', '==', 'submitted')
.get()
// High priority
const urgent = await db.collection('featureRequests')
.where('priority', '==', 'critical')
.where('status', '!=', 'completed')
.get()๐ Troubleshooting โ
Common Issues โ
"GitHub token not configured" โ Run: firebase functions:config:set github.token="ghp_xxx"
"Function not found" โ Deploy: firebase deploy --only functions
Discord notifications not appearing โ Check webhook URL is set and valid
Duplicate detection not working โ Verify checkDuplicates function is deployed
See QUICK_START.md for more help.
๐ค Contributing โ
When adding features to this system:
- Update relevant documentation
- Test in dev environment first
- Deploy to both dev and prod
- Update CHANGELOG.md
- Document any new config requirements
๐ Support โ
- Issues: GitHub Issues
- Discord: #dev-questions channel
- Documentation: Full Docs Index