The SOBIE Conference Bug Reporting System provides a comprehensive solution for users to report bugs in the application, which automatically creates GitHub issues in the sobieNode repository. This system integrates with the existing communication system to notify administrators and keep users informed about bug resolution progress.
POST /api/bug-reports
Request Body:
{
"title": "Login button not working on mobile",
"description": "When I tap the login button on my phone, nothing happens. The page doesn't respond.",
"category": "mobile",
"severity": "medium",
"priority": "normal",
"stepsToReproduce": [
"Open the app on mobile browser",
"Navigate to login page",
"Enter credentials",
"Tap login button"
],
"expectedBehavior": "Should log in and redirect to dashboard",
"actualBehavior": "Button doesn't respond to taps",
"additionalContext": "Issue only occurs on mobile devices",
"environment": {
"browser": "Safari",
"browserVersion": "17.0",
"operatingSystem": "iOS 17.1",
"screenResolution": "390x844",
"url": "https://sobie.example.com/login"
},
"userCanContact": true,
"contactPreference": "in_app",
"createGithubIssue": true
}
Response:
{
"success": true,
"message": "Bug report submitted successfully",
"data": {
"bugReport": {
"id": "65f8b12c45d6e7f8a9b0c1d2",
"title": "Login button not working on mobile",
"category": "mobile",
"severity": "medium",
"status": "submitted",
"githubIssue": {
"issueNumber": 42,
"issueUrl": "https://github.com/thesobie/sobieNode/issues/42",
"status": "created"
},
"createdAt": "2024-03-15T10:30:00Z"
}
}
}
GET /api/bug-reports/my-reports?status=submitted&page=1&limit=10
GET /api/bug-reports/{reportId}
GET /api/bug-reports/admin/all?status=submitted&severity=high&page=1
PUT /api/bug-reports/{reportId}/status
Request Body:
{
"status": "resolved",
"resolution": "Fixed in version 1.2.0 - login button touch events now properly handled on mobile devices",
"assignedTo": "dev_user_id"
}
GET /api/bug-reports/admin/statistics?timeframe=30d
Response:
{
"success": true,
"data": {
"current": {
"totalBugs": 15,
"byStatus": {
"submitted": 5,
"in_progress": 7,
"resolved": 3
},
"byCategory": {
"functionality": 8,
"ui_ux": 4,
"mobile": 3
},
"bySeverity": {
"low": 2,
"medium": 10,
"high": 3
},
"avgTimeToResolve": 48.5
}
}
}
GET /api/bug-reports/admin/github-status
GET /api/bug-reports/categories
GET /api/bug-reports/severity-levels
GET /api/bug-reports/template
Add to your .env
file:
# GitHub Integration
GITHUB_TOKEN=your_personal_access_token_here
The GitHub token needs the following permissions:
repo
(Full control of private repositories)write:discussion
(Write access to discussions).env
fileThe system automatically creates these labels in your repository:
Category Labels:
category:ui_ux
- User interface issuescategory:functionality
- Feature problemscategory:performance
- Speed/loading issuescategory:data
- Data consistency issuescategory:security
- Security vulnerabilitiescategory:mobile
- Mobile-specific issuescategory:integration
- Third-party integration issuescategory:other
- Uncategorized issuesSeverity Labels:
severity:low
- Minor issuesseverity:medium
- Moderate issuesseverity:high
- Significant issuesseverity:critical
- Severe/blocking issuesPriority Labels:
priority:high
- High priority itemspriority:urgent
- Urgent itemsSystem Labels:
bug
- Bug reportsuser-reported
- Reported by application usersCategory | Description | Examples |
---|---|---|
UI/UX | User interface or experience issues | Layout problems, confusing navigation, styling issues |
Functionality | Features not working as expected | Buttons not working, forms not submitting, broken workflows |
Performance | Speed, loading, or responsiveness issues | Slow page loads, timeouts, memory issues |
Data | Data inconsistency or corruption | Missing data, incorrect calculations, sync issues |
Security | Security vulnerabilities or concerns | Authentication bypasses, data exposure, XSS vulnerabilities |
Mobile | Mobile-specific issues | Touch problems, responsive design issues, mobile browser bugs |
Integration | Third-party service problems | API failures, payment processing issues, email delivery problems |
Other | Issues that donβt fit other categories | Configuration problems, deployment issues |
Severity | Description | Response Time | Examples |
---|---|---|---|
Low | Minor issue, workaround available | 7-14 days | Cosmetic issues, minor typos |
Medium | Affects functionality but not blocking | 3-7 days | Form validation errors, broken links |
High | Significant impact on user experience | 1-3 days | Login issues, data not saving |
Critical | Blocks core functionality or security risk | Same day | App crashes, security vulnerabilities |
// Frontend code example
const reportBug = async (bugData) => {
const response = await fetch('/api/bug-reports', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${userToken}`
},
body: JSON.stringify({
title: bugData.title,
description: bugData.description,
category: bugData.category,
severity: bugData.severity,
stepsToReproduce: bugData.steps,
environment: {
browser: navigator.userAgent,
screenResolution: `${screen.width}x${screen.height}`,
url: window.location.href
}
})
});
const result = await response.json();
if (result.success) {
showNotification('Bug report submitted! GitHub issue #' + result.data.bugReport.githubIssue.issueNumber);
}
};
// Admin dashboard example
const updateBugStatus = async (bugId, newStatus, resolution) => {
const response = await fetch(`/api/bug-reports/${bugId}/status`, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${adminToken}`
},
body: JSON.stringify({
status: newStatus,
resolution: resolution
})
});
// This automatically:
// - Updates bug in database
// - Syncs status to GitHub issue
// - Notifies user of status change
// - Closes GitHub issue if resolved
};
When a bug report is submitted, it creates a GitHub issue like this:
## Bug Report
**Reported by:** John Doe (john.doe@example.com)
**Category:** MOBILE
**Severity:** MEDIUM
**Priority:** NORMAL
## Description
Login button not working on mobile devices. When I tap the login button on my phone, nothing happens.
## Steps to Reproduce
1. Open the app on mobile browser
2. Navigate to login page
3. Enter credentials
4. Tap login button
## Expected Behavior
Should log in and redirect to dashboard
## Actual Behavior
Button doesn't respond to taps
## Environment
- **Browser:** Safari 17.0
- **OS:** iOS 17.1
- **Screen Resolution:** 390x844
- **URL:** https://sobie.example.com/login
- **Timestamp:** 2024-03-15T10:30:00Z
---
**Internal ID:** 65f8b12c45d6e7f8a9b0c1d2
**Contact User:** Yes
**Contact Preference:** in_app
Labels: bug
, user-reported
, category:mobile
, severity:medium
, browser:safari
, os:ios
{
// Basic information
reporterId: ObjectId, // User who reported
title: String, // Bug title
description: String, // Detailed description
category: String, // Bug category
severity: String, // Severity level
priority: String, // Priority level
// Reproduction details
stepsToReproduce: [{
step: Number,
description: String
}],
expectedBehavior: String,
actualBehavior: String,
additionalContext: String,
// Environment information
environment: {
browser: String,
browserVersion: String,
operatingSystem: String,
screenResolution: String,
userAgent: String,
url: String,
timestamp: Date
},
// GitHub integration
githubIssue: {
issueNumber: Number,
issueUrl: String,
createdAt: Date,
status: String // 'pending', 'created', 'failed'
},
// Status tracking
status: String, // Workflow status
assignedTo: ObjectId, // Assigned developer
resolution: String, // Resolution description
resolvedAt: Date,
resolvedBy: ObjectId,
timeToResolve: Number, // Hours to resolve
// Contact preferences
userCanContact: Boolean,
contactPreference: String, // 'email', 'in_app', 'none'
// Relations
relatedConference: ObjectId,
relatedSession: ObjectId,
relatedSubmission: ObjectId,
// Metadata
createdAt: Date,
updatedAt: Date
}
node src/tests/bugReportTests.js
# Set your GitHub token
export GITHUB_TOKEN="your_token_here"
# Run the tests
node src/tests/bugReportTests.js
/api/bug-reports
/api/bug-reports/{id}/status
GitHub token not working:
Issues not being created:
Labels not appearing:
GET /api/bug-reports/admin/github-status
# Test GitHub connection
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/thesobie/sobieNode
# Check repository permissions
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/thesobie/sobieNode/issues
# Test label creation
curl -X POST \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"test-label","color":"ff0000"}' \
https://api.github.com/repos/thesobie/sobieNode/labels
This comprehensive bug reporting system provides a seamless way for users to report issues while automatically creating GitHub issues for development tracking, ensuring no bugs fall through the cracks!