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