A comprehensive Bug Tracking and Quality Assurance system built with MERN stack that demonstrates both software development and testing practices.
- About the Project
- Key Features
- Tech Stack
- System Architecture
- Installation
- Usage Guide
- Testing
- QA Metrics
- Syllabus Coverage
- Project Structure
- API Documentation
- Screenshots
- Future Enhancements
- Contributing
- License
- Author
Meta Bug Tracker is not just another bug tracking system - it's a meta application that tests itself, demonstrating the complete Software Testing Life Cycle (STLC) and Software Development Life Cycle (SDLC) in action.
- π Self-Testing: The application tests its own features
- π Real QA Metrics: Calculates Defect Density, Test Coverage, and Resolution Time
- π Role-Based Access: Supports Tester, Developer, and Manager roles
- β Complete Bug Lifecycle: Enforces valid status transitions
- π§ͺ Integrated Testing: Manual + Automated testing in one system
Traditional bug tracking systems are separate from the applications they test. This project integrates bug tracking, test case management, and quality metrics into a single cohesive system, making it ideal for learning and demonstrating software testing concepts.
- User registration with role selection (Tester/Developer/Manager)
- Secure JWT-based authentication
- Password encryption using BCrypt
- Session persistence with localStorage
- Role-based access control
- Create, Read, Update, Delete (CRUD) operations for bugs
- Detailed Bug Information:
- Title, Description
- Severity (Low, Medium, High, Critical)
- Priority (Low, Medium, High)
- Status (New, Open, In Progress, Resolved, Closed, Reopened)
- Steps to Reproduce
- Expected vs Actual Behavior
- Bug Lifecycle Management:
- Enforced status transitions
- Status history tracking with timestamps
- Invalid transition prevention
- Collaboration Features:
- Assign bugs to users
- Add comments with timestamps
- Team collaboration
- Advanced Filtering:
- Filter by status, severity, assignee
- Search by title/description
- Real-time search
- Create comprehensive test cases
- Execute tests (Pass/Fail/Blocked/Skipped)
- Track test execution history
- Link test cases to bugs
- Test case types: Functional, UI, API, Performance, Security
- Feature-based organization
- Priority-based execution
- Bug Metrics:
- Total bugs count
- Open vs Closed bugs
- Bugs by severity distribution
- Bugs by status distribution
- Average resolution time (in hours)
- Test Metrics:
- Total test cases
- Passed/Failed/Not Executed counts
- Test coverage percentage
- Quality Metrics:
- Defect Density (bugs per 1000 LOC)
- Open/Closed Ratio
- Real-time Updates: Metrics update automatically
- Manual Testing: Execute test cases through UI
- Automated Testing: Jest + Supertest for API testing
- Test Reporting: Execution logs with timestamps
- Meta-Testing: Test the application itself
| Technology | Purpose |
|---|---|
| React.js | UI library for building interactive interfaces |
| Tailwind CSS | Utility-first CSS framework for styling |
| Lucide React | Beautiful icon library |
| Context API | State management for authentication |
| Fetch API | HTTP requests to backend |
| Technology | Purpose |
|---|---|
| Node.js | JavaScript runtime environment |
| Express.js | Web application framework |
| MongoDB | NoSQL database for flexible data storage |
| Mongoose | ODM for MongoDB schema validation |
| JWT | Stateless authentication |
| BCrypt | Password hashing and encryption |
| CORS | Cross-origin resource sharing |
| Technology | Purpose |
|---|---|
| Jest | JavaScript testing framework |
| Supertest | HTTP assertion library |
| Istanbul/NYC | Code coverage reporting |
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT LAYER β
β βββββββββββββββββββββββββββββββββββββββββββββ β
β β React Application β β
β β β’ Components (Login, Dashboard, etc.) β β
β β β’ Context API (Authentication) β β
β β β’ Tailwind CSS (Styling) β β
β β β’ Local Storage (Token Management) β β
β βββββββββββββββββ¬ββββββββββββββββββββββββββββ β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β
HTTP/REST API
(JWT Token in Headers)
β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β SERVER LAYER β
β βββββββββββββββββββββββββββββββββββββββββββββ β
β β Express.js REST API β β
β β β’ Routes (auth, bugs, tests, metrics) β β
β β β’ Middleware (JWT verification) β β
β β β’ Controllers (Business logic) β β
β β β’ Validators (Input validation) β β
β βββββββββββββββββ¬ββββββββββββββββββββββββββββ β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β
Mongoose ODM
(Schema Validation)
β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β DATABASE LAYER β
β βββββββββββββββββββββββββββββββββββββββββββββ β
β β MongoDB Collections β β
β β β’ users (User accounts & roles) β β
β β β’ bugs (Bug reports & history) β β
β β β’ testcases (Test cases & results) β β
β βββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
1. User fills bug form in React
β
2. POST /api/bugs with bug data + JWT token
β
3. Express receives request
β
4. Middleware validates JWT token
β
5. Controller validates bug data
β
6. Mongoose saves to MongoDB bugs collection
β
7. Response sent back with created bug
β
8. React updates UI and shows success message
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher) - Download
- MongoDB - Choose one:
- Local: Download MongoDB Community
- Cloud: MongoDB Atlas (Free tier)
- Git - Download
- Code Editor (VS Code recommended) - Download
git clone https://github.com/YOUR-USERNAME/meta-bug-tracker.git
cd meta-bug-tracker- Navigate to backend folder:
cd backend- Install dependencies:
npm install- Create
.envfile:
# Create .env file in backend folder
touch .envAdd the following configuration:
# MongoDB Connection
MONGO_URI=mongodb://localhost:27017/bug-tracker
# For MongoDB Atlas, use:
# MONGO_URI=mongodb+srv://username:password@cluster0.xxxxx.mongodb.net/bug-tracker?retryWrites=true&w=majority
# JWT Secret (Change in production!)
JWT_SECRET=your-super-secret-jwt-key-change-in-production
# Server Port
PORT=5000
# Environment
NODE_ENV=development- Start MongoDB:
For Local MongoDB:
# Windows (Run as Administrator)
net start MongoDB
# macOS
brew services start mongodb-community
# Linux
sudo systemctl start mongodFor MongoDB Atlas: Ensure your cluster is running on cloud.mongodb.com
- Start backend server:
# Development mode (with auto-reload)
npm run dev
# Production mode
npm startYou should see:
π Server running on port 5000
β
MongoDB Connected
- Navigate to frontend folder:
cd ../frontend- Install dependencies:
npm install- Start frontend:
# For Vite
npm run dev
# For Create React App
npm startFrontend will open at:
- Vite: http://localhost:5173
- Create React App: http://localhost:3000
- Open the application in your browser
- Click "Register" to create a new account
- Fill in the registration form:
- Name: Your name
- Email: Your email
- Password: Minimum 6 characters
- Role: Select Tester, Developer, or Manager
- Click "Register" - You'll be automatically logged in
- Dashboard loads showing initial metrics (all zeros)
- Click "Bugs" in the sidebar
- Click "New Bug" button
- Fill in bug details:
Title: Login page validation issue Description: The login form accepts empty password field Severity: High Priority: High Status: New Steps to Reproduce: 1. Go to login page 2. Enter email only 3. Leave password empty 4. Click login Expected: Error message shown Actual: Form submits - Click "Create Bug"
- Bug appears in the bugs list!
- Click on a bug to view details
- Click "Edit" to modify
- Change status following the workflow:
- New β Open
- Open β In Progress
- In Progress β Resolved
- Resolved β Closed
- Assign to a user (if you have multiple accounts)
- Add comments for collaboration
- View status history to see complete audit trail
- Click "Test Cases" in sidebar
- Click "New Test Case"
- Fill in test details:
Test ID: TC-001 Title: Login with empty password Description: Verify error shown for empty password Feature: Authentication Type: Functional Priority: High Expected Result: Error message displayed - Click "Create Test Case"
- View test cases in the list
- Click "Pass" if test passes
- Click "Fail" if test fails
- System records:
- Execution timestamp
- Who executed it
- Test result
- Click "Dashboard" in sidebar
- View real-time metrics:
- Bug counts and distributions
- Test execution results
- Quality metrics
- Analyze trends for project health
cd backend
npm testnpm test -- --coverage PASS tests/auth.test.js
Authentication API Tests
POST /api/auth/register
β should register a new user successfully (142ms)
β should fail with missing fields (38ms)
β should fail with duplicate email (76ms)
POST /api/auth/login
β should login with valid credentials (108ms)
β should fail with invalid password (82ms)
β should fail with empty credentials (29ms)
Test Suites: 1 passed, 1 total
Tests: 6 passed, 6 total
Snapshots: 0 total
Time: 2.456 s
Coverage: 85.4%
Positive Test:
it('should register a new user successfully', async () => {
const userData = {
name: 'Test User',
email: 'test@example.com',
password: 'password123',
role: 'Tester'
};
const response = await request(app)
.post('/api/auth/register')
.send(userData)
.expect(201);
expect(response.body.success).toBe(true);
expect(response.body.data.token).toBeDefined();
});Negative Test:
it('should fail with invalid password', async () => {
const response = await request(app)
.post('/api/auth/login')
.send({
email: 'test@example.com',
password: 'wrongpassword'
})
.expect(401);
expect(response.body.success).toBe(false);
expect(response.body.message).toBe('Invalid credentials');
});Formula:
Defect Density = (Total Bugs / Lines of Code) Γ 1000
Example:
3 bugs / 5000 LOC Γ 1000 = 0.60 bugs per 1000 LOC
Industry Standard: < 2.0 is considered good quality
What it measures: Code quality and testing effectiveness
Formula:
Test Coverage = (Executed Tests / Total Tests) Γ 100
Example:
8 executed / 10 total Γ 100 = 80%
Industry Standard: > 80% is considered good coverage
What it measures: How much of the application is tested
Formula:
Avg Resolution Time = Ξ£(Resolved Date - Created Date) / Total Resolved Bugs
Example:
(24h + 48h + 12h) / 3 bugs = 28 hours average
What it measures: Team efficiency in fixing bugs
Formula:
Open/Closed Ratio = Open Bugs / Closed Bugs
Example:
5 open / 10 closed = 0.5
Interpretation:
- < 1.0: Good - Bugs being fixed faster than reported
- = 1.0: Neutral - Bug creation and resolution balanced
- > 1.0: Warning - Bugs accumulating faster than being fixed
This project comprehensively covers Software Testing & QA syllabus topics:
| STLC Phase | Implementation in Project |
|---|---|
| Requirement Analysis | Understanding bug tracker requirements |
| Test Planning | Creating test strategy and test cases |
| Test Case Development | TC-AUTH-001, TC-BUG-001, etc. |
| Test Environment Setup | MongoDB + Node + React setup |
| Test Execution | Manual execution via UI |
| Test Cycle Closure | Metrics and reporting |
NEW β OPEN β IN PROGRESS β RESOLVED β CLOSED
β β
βββββββββββββββREOPENEDβββββββββββββββββ
Enforced Transitions:
- β New β Open (Valid)
- β Open β In Progress (Valid)
- β New β Closed (Invalid - Blocked by system)
| Type | How Covered |
|---|---|
| Black Box Testing | Testing UI without knowing code internals |
| White Box Testing | Unit tests with Jest covering code paths |
| Integration Testing | API tests with Supertest |
| System Testing | End-to-end workflows (Register β Create Bug β Test) |
| Regression Testing | Re-running tests after changes |
| Smoke Testing | Basic health checks (login, create bug) |
| Sanity Testing | Quick verification of specific functionality |
Equivalence Partitioning:
Valid Email: test@example.com β
Invalid Email: testexample.com β
Boundary Value Analysis:
Title Length:
- 4 chars β (Below minimum of 5)
- 5 chars β
(Boundary - Valid)
- 100 chars β
(Valid)
Decision Table Testing:
| Email | Password | Expected Result |
|--------|----------|-----------------|
| Valid | Valid | Login Success |
| Valid | Invalid | Login Fail |
| Invalid| Valid | Login Fail |
| Invalid| Invalid | Login Fail |
- β Test Plan (Project report)
- β Test Cases with steps
- β Test Execution logs
- β Bug reports with details
- β Metrics and reports
- β Defect logging
- β Defect tracking
- β Defect lifecycle
- β Defect metrics
- β Defect reporting
meta-bug-tracker/
β
βββ backend/ # Backend server
β βββ models/ # Mongoose schemas
β β βββ User.js # User model with auth
β β βββ Bug.js # Bug model with lifecycle
β β βββ TestCase.js # Test case model
β β
β βββ routes/ # API routes
β β βββ auth.js # Auth endpoints (register, login)
β β βββ bugs.js # Bug CRUD endpoints
β β βββ tests.js # Test case endpoints
β β βββ metrics.js # Dashboard metrics
β β
β βββ middleware/ # Custom middleware
β β βββ auth.js # JWT verification
β β
β βββ tests/ # Automated tests
β β βββ auth.test.js # Authentication tests
β β
β βββ .env # Environment variables
β βββ .gitignore # Git ignore rules
β βββ server.js # Express server entry point
β βββ package.json # Dependencies & scripts
β
βββ frontend/ # React frontend
β βββ public/ # Static files
β β βββ index.html # HTML template
β β
β βββ src/ # Source code
β β βββ App.jsx # Main React component
β β βββ main.jsx # React entry point
β β βββ index.css # Tailwind CSS
β β
β βββ .gitignore # Git ignore rules
β βββ package.json # Dependencies
β βββ tailwind.config.js # Tailwind configuration
β βββ vite.config.js # Vite configuration
β
βββ .gitignore # Root git ignore
βββ README.md # This file
http://localhost:5000/api
POST /auth/register
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com",
"password": "password123",
"role": "Tester"
}
Response: 201 Created
{
"success": true,
"data": {
"id": "64a1b2c3d4e5f6g7h8i9j0k1",
"name": "John Doe",
"email": "john@example.com",
"role": "Tester",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}POST /auth/login
Content-Type: application/json
{
"email": "john@example.com",
"password": "password123"
}
Response: 200 OK
{
"success": true,
"data": {
"id": "64a1b2c3d4e5f6g7h8i9j0k1",
"name": "John Doe",
"email": "john@example.com",
"role": "Tester",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}GET /auth/me
Authorization: Bearer <token>
Response: 200 OK
{
"success": true,
"data": {
"id": "64a1b2c3d4e5f6g7h8i9j0k1",
"name": "John Doe",
"email": "john@example.com",
"role": "Tester"
}
}GET /bugs?status=Open&severity=High&search=login
Authorization: Bearer <token>
Response: 200 OK
{
"success": true,
"count": 5,
"data": [...]
}POST /bugs
Authorization: Bearer <token>
Content-Type: application/json
{
"title": "Login validation issue",
"description": "Password field accepts empty input",
"severity": "High",
"priority": "High",
"status": "New",
"stepsToReproduce": "1. Go to login\n2. Leave password empty\n3. Click submit",
"expectedBehavior": "Show error message",
"actualBehavior": "Form submits"
}
Response: 201 Created
{
"success": true,
"data": { ... }
}PUT /bugs/:id
Authorization: Bearer <token>
Content-Type: application/json
{
"status": "In Progress",
"assignedTo": "64a1b2c3d4e5f6g7h8i9j0k1"
}
Response: 200 OK
{
"success": true,
"data": { ... }
}POST /bugs/:id/comments
Authorization: Bearer <token>
Content-Type: application/json
{
"text": "Working on fixing this issue"
}
Response: 200 OK
{
"success": true,
"data": { ... }
}POST /tests
Authorization: Bearer <token>
Content-Type: application/json
{
"testId": "TC-001",
"title": "Login with empty password",
"description": "Verify error shown",
"feature": "Authentication",
"type": "Functional",
"priority": "High",
"expectedResult": "Error message displayed"
}
Response: 201 Created
{
"success": true,
"data": { ... }
}PUT /tests/:id/execute
Authorization: Bearer <token>
Content-Type: application/json
{
"status": "Failed",
"actualResult": "No error shown"
}
Response: 200 OK
{
"success": true,
"data": { ... }
}GET /metrics/dashboard
Authorization: Bearer <token>
Response: 200 OK
{
"success": true,
"data": {
"bugs": {
"total": 10,
"open": 5,
"closed": 3,
"resolved": 2,
"avgResolutionTime": "24.50"
},
"tests": {
"total": 15,
"passed": 10,
"failed": 3,
"coverage": "86.67"
},
"quality": {
"defectDensity": "2.00",
"openClosedRatio": "1.67"
}
}
}[Screenshot of login/register interface]
[Screenshot of dashboard with metrics]
[Screenshot of bug list with filters]
[Screenshot of bug details page]
[Screenshot of test cases table]
- Email notifications for bug assignments
- File upload for screenshots
- Export reports to PDF
- Advanced search with filters
- Bulk operations (assign multiple bugs)
- Cypress for E2E testing
- Test automation framework integration
- Bug templates
- Custom workflows
- API rate limiting
- CI/CD pipeline integration
- Jira/GitHub integration
- Real-time notifications (WebSockets)
- Advanced analytics and charts
- Mobile app (React Native)
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow ESLint rules
- Write meaningful commit messages
- Add tests for new features
- Update documentation
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 [Your Name]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
[Your Name]
- Email: your.email@example.com
- GitHub: @yourusername
- LinkedIn: Your Profile
- Portfolio: yourwebsite.com
- Professors and Mentors for guidance on Software Testing concepts
- MongoDB for excellent NoSQL database
- React Team for the amazing UI library
- Express.js for simple and flexible backend framework
- Tailwind CSS for beautiful styling utilities
- Open Source Community for inspiration and learning resources
If you have any questions or need help with the project:
- π§ Email: your.email@example.com
- π¬ Open an issue on GitHub
- π Check the Wiki for detailed guides
Give a βοΈ if this project helped you learn Software Testing and MERN stack development!
Made with β€οΈ for Software Testing & QA Course
Last Updated: October 2025