🌐 Live Demo: https://bugverse-app-1.onrender.com (Frontend)
🔧 Backend API: https://bugverse-app.onrender.com
A professional, real-time bug reporting and tracking system for efficient team collaboration. Built with modern web technologies to streamline development workflows.
- 🏗️ Architecture
- 🚀 Features
- 🛠️ Tech Stack
- ⚙️ Installation
- 🔧 Configuration
- 📡 API Documentation
- 👥 User Roles
- 🔄 Real-Time Features
- 📂 Project Structure
- 🗄️ Database Schema
- 🚀 Deployment
- 🤝 Contributing
- 📄 License
graph TB
subgraph "Client Layer"
UI[React UI]
Auth[Auth Context]
BugCtx[Bug Context]
Socket[Socket.IO Client]
end
subgraph "API Layer"
API[Express API]
AuthRoutes[Auth Routes]
BugRoutes[Bug Routes]
UserRoutes[User Routes]
CommentRoutes[Comment Routes]
end
subgraph "Middleware Layer"
AuthMW[Auth Middleware]
RoleMW[Role Middleware]
UploadMW[Upload Middleware]
Passport[Passport OAuth]
end
subgraph "Business Logic Layer"
AuthCtrl[Auth Controller]
BugCtrl[Bug Controller]
UserCtrl[User Controller]
end
subgraph "Data Layer"
MongoDB[(MongoDB)]
UserDB[User Model]
BugDB[Bug Model]
end
subgraph "External Services"
Cloudinary[Cloudinary]
Email[Nodemailer/Resend]
Google[Google OAuth]
end
subgraph "Real-Time Layer"
SocketIO[Socket.IO Server]
SocketEvents[Event Handlers]
end
UI --> Auth
UI --> BugCtx
UI --> Socket
Auth --> API
BugCtx --> API
Socket --> SocketIO
API --> AuthRoutes
API --> BugRoutes
API --> UserRoutes
API --> CommentRoutes
AuthRoutes --> AuthMW
BugRoutes --> AuthMW
UserRoutes --> AuthMW
CommentRoutes --> AuthMW
AuthRoutes --> RoleMW
AuthRoutes --> Passport
AuthRoutes --> AuthCtrl
BugRoutes --> BugCtrl
UserRoutes --> UserCtrl
AuthCtrl --> UserDB
BugCtrl --> BugDB
UserCtrl --> UserDB
UserDB --> MongoDB
BugDB --> MongoDB
BugCtrl --> Cloudinary
AuthCtrl --> Email
AuthRoutes --> Google
BugCtrl --> SocketIO
SocketIO --> SocketEvents
SocketEvents --> Socket
style UI fill:#61DAFB
style API fill:#68A063
style MongoDB fill:#47A248
style SocketIO fill:#010101
style Cloudinary fill:#3448C5
sequenceDiagram
participant User as 👤 User
participant UI as 🖥️ React UI
participant API as 🔌 Express API
participant Auth as 🔐 Auth Middleware
participant Controller as 🎮 Controller
participant DB as 🗄️ MongoDB
participant Socket as ⚡ Socket.IO
User->>UI: Login/Signup
UI->>API: POST /api/auth/login
API->>Auth: Verify JWT
Auth->>Controller: Process request
Controller->>DB: Find/Create user
DB-->>Controller: User data
Controller-->>API: Token + User
API-->>UI: Authentication success
UI->>UI: Store token in localStorage
User->>UI: Create bug
UI->>API: POST /api/bugs
API->>Auth: Verify token
Auth->>Controller: Authorized
Controller->>DB: Save bug
DB-->>Controller: Bug created
Controller->>Socket: Emit bug:created
Socket->>UI: Real-time update
Controller-->>API: Success response
API-->>UI: Bug created
- 📝 Bug Reporting: Testers can report bugs with detailed descriptions, severity levels, and video attachments
- 🎯 Bug Assignment: Admins can assign bugs to specific developers for resolution
- 📊 Status Tracking: Track bug progress through statuses: Open → In Progress → Testing → Resolved
- 💬 Real-time Comments: Add comments to bugs for team collaboration with instant updates
- 🏆 Leaderboards: View top bug resolvers and team performance metrics
- 🔐 JWT Authentication: Secure token-based authentication
- 👤 Role-Based Access Control: Three distinct roles with specific permissions
- 🔑 Google OAuth: Optional Google authentication for quick signup
- 📧 Email Verification: Email verification system for account security
- 🔄 Session Management: Secure session handling with MongoDB store
- 🧪 Tester Dashboard: View reported bugs, track status, add comments
- 💻 Developer Dashboard: View assigned bugs, update status, mark as resolved
- 👑 Admin Dashboard: Full bug oversight, user management, advanced filtering
- ⚡ Socket.IO Integration: Instant updates without page refresh
- 🔔 Live Notifications: Real-time notifications for bug updates and comments
- 👥 User Presence: Track online users and their activities
- 🎥 Video Upload: Upload bug reproduction videos via Cloudinary
- 📈 Analytics Dashboard: Comprehensive bug statistics and team performance
- 🔍 Advanced Filtering: Filter bugs by status, severity, assignment, and search
- 📱 Responsive Design: Mobile-friendly interface using Tailwind CSS
- 🎨 Modern UI: Clean, intuitive interface with Lucide icons
- Framework: React 18.3.1 with Vite
- Styling: Tailwind CSS 3.4.1
- State Management: React Context API
- Routing: React Router DOM 7.13.0
- HTTP Client: Axios 1.11.0
- Real-time: Socket.IO Client 4.8.1
- Icons: Lucide React 0.344.0
- Charts: Recharts 3.1.2, Chart.js 4.5.0
- Build Tool: Vite 5.4.21
- Language: JavaScript (ES6+)
- Runtime: Node.js 20+
- Framework: Express.js 5.1.0
- Database: MongoDB with Mongoose 8.16.3
- Authentication: JWT (jsonwebtoken 9.0.2), Passport.js 0.7.0
- Session Management: Express Session 1.19.0 with MongoDB store
- Real-time: Socket.IO 4.8.1
- File Upload: Multer 2.0.2
- Cloud Storage: Cloudinary 2.7.0
- Email: Nodemailer 8.0.1, Resend 6.9.2
- Password Hashing: bcryptjs 3.0.2
- Validation: express-validator 7.2.1
- Environment: dotenv 17.2.0
- CORS: cors 2.8.5
- Dev Tool: Nodemon 3.1.10
- Platform: Render (Production)
- Version Control: Git
- Frontend Port: 5174 (dev), 443 (prod)
- Backend Port: 5000 (dev), 80/443 (prod)
- Node.js 20+ and npm
- MongoDB instance (local or cloud)
- Git
git clone https://github.com/your-username/bugverse.git
cd Bugverse-Appcd server
npm installCreate a .env file in the server directory:
# Server Configuration
PORT=5000
NODE_ENV=development
# Database
MONGO_URI=mongodb://localhost:27017/bugverse
# Authentication
JWT_SECRET=your_super_secret_jwt_key_min_32_chars
# Cloudinary (for video uploads)
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# Email Configuration (choose one)
# Option 1: Nodemailer
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password
# Option 2: Resend
RESEND_API_KEY=your_resend_api_key
# Google OAuth (optional)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_CALLBACK_URL=http://localhost:5000/api/auth/google/callback
# Frontend URL
FRONTEND_URL=http://localhost:5174Start the backend server:
npm run devcd ../client
npm installCreate a .env file in the client directory:
VITE_API_URL=http://localhost:5000
VITE_SOCKET_URL=http://localhost:5000Start the frontend development server:
npm run dev- Frontend: http://localhost:5174
- Backend API: http://localhost:5000
- Health Check: http://localhost:5000/health
| Variable | Description | Required | Default |
|---|---|---|---|
PORT |
Server port | No | 5000 |
NODE_ENV |
Environment | No | development |
MONGO_URI |
MongoDB connection string | Yes | - |
JWT_SECRET |
JWT signing secret | Yes | - |
CLOUDINARY_CLOUD_NAME |
Cloudinary cloud name | Yes* | - |
CLOUDINARY_API_KEY |
Cloudinary API key | Yes* | - |
CLOUDINARY_API_SECRET |
Cloudinary API secret | Yes* | - |
GOOGLE_CLIENT_ID |
Google OAuth client ID | No | - |
GOOGLE_CLIENT_SECRET |
Google OAuth client secret | No | - |
*Required for video upload functionality
| Variable | Description | Required | Default |
|---|---|---|---|
VITE_API_URL |
Backend API URL | Yes | - |
VITE_SOCKET_URL |
Socket.IO server URL | Yes | - |
- Development:
http://localhost:5000 - Production:
https://bugverse-app.onrender.com
Register a new user account.
Request Body:
{
"name": "John Doe",
"email": "john@example.com",
"password": "securePassword123",
"role": "tester"
}Response (201):
{
"msg": "Signup successful. Please verify your email within 5 minutes."
}Authenticate user and receive JWT token.
Request Body:
{
"email": "john@example.com",
"password": "securePassword123"
}Response (200):
{
"user": {
"_id": "user_id",
"name": "John Doe",
"email": "john@example.com",
"role": "tester"
},
"token": "jwt_token_here"
}Verify user email with token.
Resend verification email.
Initiate Google OAuth flow.
Google OAuth callback handler.
Complete Google signup with role selection.
Create a new bug report.
Headers:
Authorization: Bearer <jwt_token>
Content-Type: multipart/form-data
Request Body:
{
"title": "Bug title",
"description": "Detailed bug description",
"severity": "critical",
"module": "Authentication",
"tags": ["frontend", "urgent"],
"assignedTo": "developer_name_or_id"
}Response (201):
{
"_id": "bug_id",
"title": "Bug title",
"status": "open",
"createdBy": { "_id": "user_id", "name": "John Doe", "role": "tester" },
"createdAt": "2024-01-01T00:00:00.000Z"
}Get bugs based on user role.
Headers:
Authorization: Bearer <jwt_token>
Response (200):
[
{
"_id": "bug_id",
"title": "Bug title",
"status": "open",
"severity": "critical",
"createdBy": { "_id": "user_id", "name": "John Doe", "role": "tester" },
"assignedTo": { "_id": "dev_id", "name": "Jane Dev", "role": "developer" }
}
]Update bug details.
Headers:
Authorization: Bearer <jwt_token>
Request Body:
{
"status": "in-progress",
"description": "Updated description",
"severity": "high"
}Get comprehensive bug statistics and analytics.
Headers:
Authorization: Bearer <jwt_token>
Response (200):
{
"overall": {
"total": 100,
"open": 30,
"closed": 50,
"critical": 10
},
"me": {
"assigned": 15,
"open": 5,
"closed": 8,
"critical": 2
},
"team": {
"topResolvers": [
{ "developer": "Jane Dev", "closed": 25 }
],
"pendingByDev": [
{ "developer": "John Dev", "open": 8 }
]
}
}Add a comment to a bug.
Headers:
Authorization: Bearer <jwt_token>
Request Body:
{
"text": "This is a comment"
}Get all users (admin only).
Update user details (admin only).
Delete user (admin only).
- Permissions: Create bugs, view own bugs, add comments
- Dashboard: View reported bugs, track status updates
- Access:
/tester-dashboard
- Permissions: View assigned bugs, update bug status, add comments, mark bugs as resolved
- Dashboard: View assigned bugs, update progress, manage workload
- Access:
/developer-dashboard
- Permissions: Full access to all bugs, user management, bug assignment, system oversight
- Dashboard: View all bugs, manage users, advanced filtering, analytics
- Access:
/admin-dashboard
- connection: Establish WebSocket connection
- disconnect: Close connection
- bug:created: New bug created
{ bug: { /* bug object */ } }
- bug:updated: Bug status updated
{ bugId: "bug_id", updates: { /* updated fields */ } }
- newComment: New comment added
{ bugId: "bug_id", comment: { /* comment object */ } }
- Instant bug creation notifications
- Live status updates across all connected clients
- Real-time comment additions
- User presence tracking
Bugverse-App/
├── client/ # React Frontend
│ ├── public/
│ │ └── index.html
│ ├── src/
│ │ ├── components/
│ │ │ ├── Auth/ # Authentication components
│ │ │ │ ├── AuthPage.jsx
│ │ │ │ ├── LoginForm.jsx
│ │ │ │ ├── SignupForm.jsx
│ │ │ │ ├── OAuthCallback.jsx
│ │ │ │ ├── RoleSelection.jsx
│ │ │ │ └── VerifyPage.jsx
│ │ │ ├── BugDetail/ # Bug detail components
│ │ │ │ └── BugDetailPage.jsx
│ │ │ ├── Common/ # Shared components
│ │ │ │ ├── BugCard.jsx
│ │ │ │ ├── BugsSummary.jsx
│ │ │ │ ├── LeaderBoardPage.jsx
│ │ │ │ ├── developerLeaderBoard.jsx
│ │ │ │ ├── PriorityBadge.jsx
│ │ │ │ └── StatusBadge.jsx
│ │ │ ├── Dashboard/ # Dashboard components
│ │ │ │ ├── AdminDashboard.jsx
│ │ │ │ ├── DeveloperDashboard.jsx
│ │ │ │ ├── TesterDashboard.jsx
│ │ │ │ ├── ReportBugForm.jsx
│ │ │ │ └── UserManagement.jsx
│ │ │ ├── Navigation.jsx
│ │ │ ├── RoleRedirect/
│ │ │ │ └── RoleRedirect.jsx
│ │ │ └── ui/
│ │ │ └── card.jsx
│ │ ├── contexts/ # React Context
│ │ │ ├── AuthContext.jsx
│ │ │ └── BugContext.jsx
│ │ ├── data/
│ │ │ └── mockData.js
│ │ ├── App.jsx
│ │ ├── axios.js # Axios configuration
│ │ ├── socket.js # Socket.IO client
│ │ ├── main.jsx
│ │ └── index.css
│ ├── .env.example
│ ├── .gitignore
│ ├── eslint.config.js
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── tailwind.config.js
│ └── vite.config.js
├── server/ # Express Backend
│ ├── config/
│ │ └── passport.js # Passport OAuth configuration
│ ├── controllers/ # Business logic
│ │ ├── authController.js
│ │ ├── bugController.js
│ │ └── userController.js
│ ├── middleware/ # Express middleware
│ │ ├── authMiddleware.js
│ │ ├── roleMiddleware.js
│ │ └── uploadMiddleware.js
│ ├── models/ # Mongoose models
│ │ ├── bug.js
│ │ └── userModel.js
│ ├── routes/ # API routes
│ │ ├── authRoutes.js
│ │ ├── bugRoutes.js
│ │ ├── commentRoutes.js
│ │ └── userRouters.js
│ ├── sockets/ # Socket.IO setup
│ │ └── socket.js
│ ├── utils/ # Utility functions
│ │ └── sendEmail.js
│ ├── .env.example
│ ├── .gitignore
│ ├── index.js # Server entry point
│ └── package.json
├── .gitignore
└── README.md
{
_id: ObjectId,
name: String,
email: String (unique),
password: String (hashed),
role: String (enum: ['tester', 'developer', 'admin']),
isVerified: Boolean (default: false),
verificationToken: String,
verificationExpires: Date,
googleId: String,
createdAt: Date,
updatedAt: Date
}{
_id: ObjectId,
title: String,
description: String,
severity: String (enum: ['low', 'medium', 'high', 'critical']),
module: String,
videoUrl: String,
tags: [String],
status: String (enum: ['open', 'in progress', 'testing', 'resolved'], default: 'open'),
createdBy: ObjectId (ref: 'User'),
assignedTo: ObjectId (ref: 'User'),
resolvedBy: ObjectId (ref: 'User'),
comments: [{
text: String,
user: ObjectId (ref: 'User'),
createdAt: Date
}],
createdAt: Date,
updatedAt: Date
}- Create Render Account: Sign up at render.com
- Connect Repository: Link your GitHub repository
- Configure Build Settings:
- Build Command:
npm install && npm run build - Publish Directory:
client/dist - Environment Variables: Add all frontend env variables
- Build Command:
- Create Web Service: Select "Node.js" as runtime
- Configure Build Settings:
- Build Command:
cd server && npm install - Start Command:
cd server && node index.js - Environment Variables: Add all backend env variables
- Build Command:
Option 1: MongoDB Atlas (Recommended)
- Create account at mongodb.com/cloud/atlas
- Create a cluster
- Get connection string
- Add
MONGO_URIto environment variables
Option 2: Local MongoDB
# Install MongoDB locally
# Windows: Download from mongodb.com
# Mac: brew install mongodb-community
# Linux: sudo apt-get install mongodb
# Start MongoDB service
# Windows: net start MongoDB
# Mac/Linux: brew services start mongodb-community- Create account at cloudinary.com
- Get API credentials from dashboard
- Add credentials to environment variables
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow existing code style and conventions
- Write meaningful commit messages
- Test your changes thoroughly
- Update documentation as needed
- Ensure all tests pass before submitting
This project is licensed under the MIT License - see the LICENSE file for details.
Team BugVerse
Ayush Jha - Full Stack Developer
- React - Frontend framework
- Express.js - Backend framework
- MongoDB - Database
- Socket.IO - Real-time communication
- Tailwind CSS - Styling
- Cloudinary - Cloud storage
- Render - Hosting platform
For support, email support@bugverse.com or open an issue in the repository.
⭐ Star this repository if you find it helpful!
Made with ❤️ by Team BugVerse