A full-stack web application for reporting, tracking, and managing software bugs with role-based access control.
- Bug Reporting: Users can report bugs with title, description, and severity levels
- Bug Tracking: Track bug status through Open β In Progress β Closed workflow
- Search & Filter: Filter bugs by status, severity, and search by title
- Role-based Access:
- Reporter: Can submit bugs and view/update only their own bugs
- Admin: Can view and update all bugs, access admin dashboard with statistics
- JWT-based authentication
- RESTful API with Express.js
- MongoDB database with Mongoose ODM
- React frontend with Tailwind CSS
- Responsive design
- Real-time updates
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- JWT - Authentication
- bcryptjs - Password hashing
- express-validator - Input validation
- React - UI library
- React Router - Client-side routing
- Tailwind CSS - Styling
- Axios - HTTP client
- Context API - State management
- One-to-Many: User β Bugs (A user can report multiple bugs)
- One-to-Many: User β Comments (A user can make multiple comments)
- One-to-Many: Bug β Comments (A bug can have multiple comments)
- Many-to-One: Bug β User (A bug is reported by one user, can be assigned to one user)
- Node.js (v14 or higher)
- MongoDB (local or cloud instance)
- npm or yarn
-
Navigate to server directory
cd server
-
Install dependencies
npm install
-
Environment Configuration Create a
.env
file in the server directory:MONGODB_URI=mongodb://localhost:27017/bug_tracking JWT_SECRET=your_super_secret_jwt_key_here_change_in_production PORT=5000 NODE_ENV=development
-
Start the server
# Development mode with auto-restart npm run dev # Production mode npm start
-
Navigate to client directory
cd client
-
Install dependencies
npm install
-
Start the development server
npm run dev
-
Build for production
npm run build
-
Local MongoDB
- Install MongoDB locally
- Start MongoDB service
- Update
MONGODB_URI
in.env
file
-
MongoDB Atlas (Cloud)
- Create a free account at MongoDB Atlas
- Create a new cluster
- Get connection string and update
MONGODB_URI
in.env
file
POST /api/auth/register
- Register new userPOST /api/auth/login
- Login userGET /api/auth/me
- Get current user
-
POST /api/bugs
- Create new bug (authenticated) -
GET /api/bugs
- Get bugs with filters (authenticated) -
GET /api/bugs/:id
- Get specific bug (authenticated) -
PUT /api/bugs/:id
- Update bug (authenticated) -
POST /api/bugs/:id/comments
- Add comment to bug (authenticated)
GET /api/users
- Get all users (admin only)GET /api/users/:id
- Get user by ID (authenticated)
- Register as a new user (automatically gets reporter role)
- Use "Report New Bug" button to create bug reports
- View and update status of your own bugs
- Add comments to your bugs
- Login with admin credentials:
- Email:
ashafak04@gmail.com
- Password:
ashafak123
- Email:
- View dashboard with bug statistics
- View and manage all bugs in the system
- Update bug status and assign bugs to users
- Add comments to any bug
Note: Admin account is pre-configured and cannot be registered through the normal registration process for security reasons.
-
Database Schema Design: AI helped design the MongoDB schema with proper relationships and validation
-
UI/UX Design: AI helped create responsive layouts and component structures
- Efficiency: Accelerated development by generating standard CRUD operations and authentication flows
- Best Practices: AI helped implement security best practices for authentication and data validation
- Code Quality: Ensured consistent code structure and error handling patterns
- Modern React Patterns: Context API for state management, custom hooks, and component composition
- Security Implementation: JWT token handling, password hashing, and input validation
- Database Design: MongoDB schema design with proper indexing and relationships
- API Design: RESTful API design with proper error handling and status codes
- Deployment: Understanding of full-stack deployment processes and environment configuration
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request