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