Feature Request System - Quick Start Guide
Last Updated: 2026-01-12
This guide will help you set up and use the Feature Request submission system.
For Users (In-App Submission)
Accessing the Form
- From Dashboard: Navigate to Settings → "Submit Feedback"
- Direct Link:
#/feedbackroute in the app
Submitting a Request
Choose Request Type
- ✨ Feature Request: New capability
- 🐛 Bug Report: Something broken
- ⚡ Improvement: Enhancement to existing feature
- ❓ Question: How does something work?
Fill Out the Form
- Title: Brief summary (max 100 chars)
- Description: Detailed explanation (max 1000 chars)
- Use Case (optional): Real-world example (max 500 chars)
- Priority: How urgent is this?
- Impact: Who does this affect?
Review Similar Requests
- The system automatically checks for duplicates
- If similar requests exist, you'll see them
- You can still submit if yours is different
Submit
- Click "Submit Request"
- You'll receive a GitHub issue link to track progress
For Developers (Setup)
1. Firebase Functions Setup
Install Dependencies
cd functions
npm installConfigure GitHub Token
You need a GitHub Personal Access Token with repo scope:
- Go to GitHub Settings → Developer Settings → Personal Access Tokens → Tokens (classic)
- Click "Generate new token (classic)"
- Give it a name: "Lantern Feature Request Bot"
- Select scope:
repo(full control of private repositories) - Click "Generate token"
- Copy the token (starts with
ghp_)
Set the token in Firebase:
# For production
firebase functions:config:set github.token="ghp_YOUR_TOKEN_HERE"
firebase functions:config:set github.repo="cattreedev/lantern_app"
# For development (local testing)
# Create .runtimeconfig.json in functions/ directory
cat > functions/.runtimeconfig.json << EOF
{
"github": {
"token": "ghp_YOUR_TOKEN_HERE",
"repo": "cattreedev/lantern_app"
}
}
EOF⚠️ IMPORTANT: Add .runtimeconfig.json to .gitignore - never commit tokens!
Configure Discord Webhook (Optional)
- Create a Discord webhook (see Discord Webhooks Guide)
- Set the webhook URL:
# For production
firebase functions:config:set discord.webhook_url="https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
# For development (add to .runtimeconfig.json)
{
"github": {
"token": "ghp_YOUR_TOKEN_HERE",
"repo": "cattreedev/lantern_app"
},
"discord": {
"webhook_url": "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
}
}2. Deploy Functions
Deploy to Firebase
# Deploy all functions
firebase deploy --only functions
# Deploy specific function
firebase deploy --only functions:createFeatureRequest
firebase deploy --only functions:checkDuplicatesTest Locally with Emulator
# Start functions emulator
cd functions
npm run serve
# In another terminal, run the app
cd ..
npm run devThe functions will be available at http://localhost:5001/YOUR_PROJECT_ID/us-central1/createFeatureRequest
3. Firestore Security Rules
Add rules for the featureRequests collection:
// In firestore.rules
match /featureRequests/{requestId} {
// Anyone authenticated can read their own requests
allow read: if request.auth != null &&
(resource.data.submittedBy == request.auth.uid ||
resource.data.submittedBy == 'anonymous');
// Only Cloud Functions can write
allow create, update: if false;
// Only admins can delete
allow delete: if request.auth.token.admin == true;
}Deploy rules:
firebase deploy --only firestore:rules4. Testing
Manual Testing
- Start the app:
npm run dev - Navigate to feedback form:
http://localhost:5173/#/feedback - Fill out and submit
- Check:
- ✅ GitHub issue created
- ✅ Discord notification sent (if configured)
- ✅ Firestore document created
- ✅ Success message with issue link
Test Duplicate Detection
- Submit a request with title "Test Feature"
- Start another request with similar title
- You should see a warning about similar requests
For Discord Integration
Setting Up Discord Bot
Instead of the web form, you can also allow submissions from Discord using a bot.
Option 1: Slash Command (Recommended)
Create a Discord bot with slash command /feature-request:
// Discord bot code (separate project)
client.on('interactionCreate', async interaction => {
if (!interaction.isCommand()) return
if (interaction.commandName === 'feature-request') {
// Show modal with form fields
await interaction.showModal({
title: 'Submit Feature Request',
customId: 'featureRequestModal',
components: [
{
type: 1,
components: [{
type: 4,
customId: 'title',
label: 'Title',
style: 1,
maxLength: 100,
required: true
}]
},
// ... more fields
]
})
}
})Option 2: Webhook Submission
Users can post requests to a specific Discord channel, and a bot parses them and calls the Firebase function.
AI Refinement with GitHub Copilot
How It Works
Users can ask GitHub Copilot to help refine their request before submission.
Using Copilot for Refinement
- In the form: User clicks "Refine with AI" button
- Copilot analyzes:
- Title clarity
- Description completeness
- Use case specificity
- Priority/impact appropriateness
- User reviews suggestions and can accept/reject
Implementation (Future)
This requires:
- GitHub Copilot API access
- Additional Cloud Function for refinement
- UI updates to show suggestions
Currently documented but not implemented - marked as Phase 5 in roadmap.
Troubleshooting
"GitHub token not configured" Error
Solution: Set the GitHub token in Firebase Functions config:
firebase functions:config:set github.token="ghp_YOUR_TOKEN""Rate limit exceeded" Error
Cause: User has submitted 5+ requests in 24 hours
Solution: Wait 24 hours or contact admin to reset
Duplicate Check Not Working
Check:
checkDuplicatesfunction is deployed- Firestore has existing requests to check against
- Browser console for errors
Discord Notification Not Sending
Check:
- Discord webhook URL is configured
- Webhook is still active in Discord
- Function logs for errors:
firebase functions:log
Function Deployment Fails
Common issues:
- Node version mismatch (requires Node 20)
- Missing dependencies:
cd functions && npm install - Invalid config:
firebase functions:config:get
Security Notes
⚠️ Never commit:
- GitHub tokens
- Discord webhook URLs
.runtimeconfig.json- Any API keys
✅ Always:
- Use Firebase Functions config for secrets
- Add sensitive files to
.gitignore - Rotate tokens if compromised
- Use least-privilege tokens (only
reposcope needed)
Monitoring
View Submissions
Firestore Console:
- Go to Firebase Console → Firestore Database
- Navigate to
featureRequestscollection - View all submissions with metadata
GitHub Issues:
- Filter by label:
user-submitted - Sort by creation date
- Check
needs-triagelabel for new requests
Discord Channel:
- All submissions appear in configured channel
- Includes direct link to GitHub issue
Analytics
Track metrics:
- Submissions per day
- Request types distribution
- Priority breakdown
- Duplicate detection rate
Query Firestore for analytics:
// Get submissions in last 7 days
const snapshot = await db.collection('featureRequests')
.where('submittedAt', '>', sevenDaysAgo)
.get()Next Steps
- ✅ Set up GitHub token and Discord webhook
- ✅ Deploy functions to Firebase
- ✅ Test submission flow end-to-end
- ✅ Add navigation item in app
- ⏳ Implement AI refinement (Phase 5)
- ⏳ Add voting system (Future)
- ⏳ Create admin dashboard (Future)
Related Documentation
Support
Issues? Open a GitHub issue with label feature-request-system
Questions? Ask in Discord #dev-questions channel